実験課題5

Exercise 5(課題5) See the section 1.9.1. "Class Method". Then create the sample program with the class method to calculate the summation: \(\sum_{i=1}^{n} (3i-1)\) by creating the project chapter1kadai5. In this program, \(n\) is should inputted from keyboard. Further, show the sourcecode and execution result as the screenshot. Hint. see Figure 63.

(1.9.1.節をよく読み、プロジェクト名chapter1kadai5のJavaアプリケーションプロジェクトを作成して、1から引数で与えられた数字\(n\)について総和\(\sum_{i=1}^{n} (3i-1)\)を求めるクラスメソッドを作成しなさい。そしてクラスメソッドを利用した実行例を独自に作成して、ソースコードと実行結果を報告しなさい。)