For one set of inputs, this is what you will see on your screen:
Enter 1st side: 3 Enter 2nd side: 4 Enter 3rd side: 5 The triangle is right angled triangle.
For another set of inputs, this is what you will see on your screen:
Enter 1st side: 5 Enter 2nd side: 6 Enter 3rd side: 7 The triangle is not right angled triangle.
The class that you will be writing will be called RightTriangle. We will be looking at good documentation, descriptive variable names, and adherence to the coding convention mentioned below. Your file RightTriangle.java will have the following header:
/* File: RightTriangle.java Description: Student Name: Student UT EID: Course Name: CS 303E Unique Number: TA: Date Created: Date Last Modified: */
For one set of inputs, your output on the screen will look like:
Enter a number (Type 0 to quit): 1 Enter a number (Type 0 to quit): 2 Enter a number (Type 0 to quit): 3 Enter a number (Type 0 to quit): 0 You have entered 3 numbers. The sum is 6 The average is 2
For another set of inputs, your output on the screen will look like:
Enter a number (Type 0 to quit): 0 You have entered 0 numbers. The sum is 0 The average is 0
The class that you will be writing will be called SimpleSum. We will be looking at good documentation, descriptive variable names, and adherence to the coding convention mentioned below. Your file SimpleSum.java will have the following header:
/* File: SimpleSum.java Description: Student Name: Student UT EID: Course Name: CS 303E Unique Number: TA: Date Created: Date Last Modified: */
You will follow the standard Java Coding Conventions. You can either view the HTML page or download the PDF or Postscript and print it out. There is a modification that I would like to make to the standard coding conventions. Please align the opening and closing braces vertically so that you can easily make out the blocks of code. For example:
if ( x > 5 ) {
a = b + c;
}
vs.
if ( x > 5 )
{
a = b + c;
}
Use the turnin program to submit your RightTriangle.java and SimpleSum.java files. The TAs should receive your work by 5 PM, Friday, 20 February 2004.