Write solutions to Review Questions 3.2, 3.5, 3.9, 3.10, and 3.18 on pages 89 to 92 of the textbook.
Students in the evening lecture sections should turn in their written homework at class on Monday, 18 September. Students in the day-time lecture sections should turn in their written homework at class on Wednesday, 20 September.
Write a computer program to solve Programming Exercise 3.9 on page 94 of your textbook. Where the exercise calls for the "three edges for a triangle", this should be interpreted as the "lengths of the three edges of the triangle".
Create a NetBeans project called Homework3
to solve
this problem. We suggest you start with the skeleton
NetBeans project contained in
the Homework 3 ZIP file.
If you prefer starting from scratch,
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 homework3
.
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.
Your completed program must be stored within
a subdirectory
csci/201/Homework3 of your Linux home
directory. If you create a project named Homework3
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/Homework3
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 to the system disk failure, the due date for this assignment is postponed until 9:00 am on Monday, 25 September.
Programming assignments will be copied from student directories at 9:00 am on Friday, 22 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.