CSCI 201 Homework Assignment 2

Written Assignment

Write solutions to Review Questions 2.5, 2.8, 2.9, and 2.10 on page 60 to 61 of the textbook.

Due Date

Students in the evening lecture sections should turn in their written homework at class on Monday, 11 September. Students in the day-time lecture sections should turn in their written homework at class on Wednesday, 13 September.

Programming Project

Write a computer program to solve Programming Exercise 2.5 on page 63 of your textbook.

Create a NetBeans project called Homework2 to solve this problem. Use NetBeans' defaults in creating your project just as was done in the first week's lab. This will result in your code being placed in a class called Main within a package called homework2. Be sure to insert your Java statements within the main method!

Your program should use the nextInt method to read its input, as was shown in the examples of the second week's lab. Your program should use System.out.println to write its results.

Turning in

Your completed program must be stored within a subdirectory csci/201/Homework2 of your Linux home directory. If you create a project named Homework2 at project location csci/201 as was done in the first week's lab this will happen automatically.

If you complete this assignment on your "home" system, you still must create a csci/201/Homework2 directory within your Linux account to store your work. You can copy to that directory either (1) a jar file containing your NetBeans project or (2) the java file for your Main class.

Due date

Programming assignments will be copied from student directories at 9:00 am on Friday, 15 September. It is your responsibility to have your assignment in place at that time.

Late assignments will also be copied at 9:00 am each of the following three days. There is a 10% penalty for each day the assignment is late.