Question: // The language is java and please documentation.// Part I: Design a Sum class that uses loop to sum of all in the integers from

// The language is java and please documentation.//

Part I: Design a Sum class that uses loop to sum of all in the integers from 1 up to the number entered by user and passed to the constructor, code methods to compute the sum and display the result of the sum. Code a test program SumApp to create object of Sum and call its methods to perform the tasks described above. Your program should continue to run until the user enters -99 to stop. Must code an operation class called Sum and code a driver class called SumApp to test the Sum class, separately. Must use required/meaningful names for fields, variables, methods, and classes. Must document each of your source code surely very clear.

Part II: Design an Area Class that has three overloaded static methods Computing to calculate the areas of circles, rectangles, and cylinders. Assume that data for circles and cylinders are all doubles and data for rectangles are integers. Code a test program AreaApp by calling at least two times with different hard-coded data at your choice for each overloaded method for testing. Must understand what method overloading is before you start to work on this part. Must use required/meaningful names for fields, variables, methods and classes. (Must document each of your source code (see example in the next slide)

The steps on how to work on your labs with Eclipse Step 1. Open Eclipse you have installed, click on the triangle icon under the File menu, and you will see a dropdown menu. Step 2. Click on Java Project and you will see a new window to create a Java project since Eclipse organizes all programs as projects, so does for your labs. Step 3. Type in your project name, say, Lab2 in the Project name: field, and then click on Finish button. The eclipse will create a project named Lab2for you. Step 4. Click on Lab2, highlight the src folder, click on the triangle icon under the File menu, and you will see a drop-down menu. Step 5. Click on Class, a window let you create a new class will be displayed. Type in the class name you are going to code, say, test scores, and click on the Finish button. If you are creating a driver class, say, TestScoresApp, after you type in this class name, select the box public static void main(String[] args), and then click on Finish button. Now you can type your code in this editing window and execute your code by clicking Run menu or the play icon shown under menu bar. Steps to make your project as a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!