Question: Please help!! im so confused on how to properly code this!! im using java and I would appreciate any help! Ellipsoid App.java Requirements: Create an

Please help!! im so confused on how to properly code this!! im using java and I would appreciate any help!  Please help!! im so confused on how to properly code this!!
im using java and I would appreciate any help! Ellipsoid App.java Requirements:
Create an Ellipsoid App class with a main method that reads in

Ellipsoid App.java Requirements: Create an Ellipsoid App class with a main method that reads in values for label and the axes a, b, and e. After the values have been read in, the main method creates an Ellipsoid object and then prints a new line and the object. Design: The main method should prompt the user to enter the label, a, b, and c. After each axis value is read in, if the value is less than or equal to zero, an appropriate message (see examples below) should be printed followed by a return from main. Assuming a, b, and care positive, an Ellipsoid object should be created and printed. Page 3 of 5 Project: Ellipsoid App Page 4 of 5 Below are examples where the user has entered a non-positive value for cach axes a, b,c. Your program input/output should be exactly as follows Line Program input/output Enter label and axes a, b, c for an ellipsoid. labelu bad value for a Error: axis value must be positive. Line Program input/output Enter label and axes a, b, c for an ellipsoid. labelt bad value forb Error: axis value must be positive. Line # Program input/output Enter label and axes a, b, e for an ellipsoid. label bad value torc at 12.5 bu 10.1 CH -8.4 Error axis value must be positive. Below is an example where the user has the values from exl, the first example, above for label, a, b, and c. Your program input/output should be exactly as follows. Line Program input/output Enter label and axes a, b, c for an ellipsoid. label. EX 1 b C: 2.0 3.0 Ellipsoid "Ex 1" with axes a -1.0, - 2.0, e-3.0 units has volume - 25.1327 cubie units surface area 48.9366 square units Code: Your program should use the nextLine method of the Scanner class to read user input Note that this method returns the input as a String. Whenever necessary, you can use the Double.parseDouble method to convert the input String to a double. For example: Double.parseDouble(sl) will return the double value represented by String sl. For the printed lines requesting input for label, a, b, and use a tab rather than three spaces. After you have created the object, it can be printed simply by using its variable name, i.e., when the object's variable name is evaluated in the printin statement, its toString method is automatically called. Thus, printing the object reference variable myob) is equivalent to printing the return value of the myObj.toString) method call. In your printin statement, be sure to prepend the newline character (eg, " " + myobj) to skip the line as shown in the examples. Page 4 of 5 Project: Ellipsoid App Page 5 of 5 Test: You should test several sets of data to make sure that your program is working correctly Although your main method may not use all the methods in Ellipsoid, you should ensure that all of your methods work according to the specification. You can use interactions in GRASP or you can write another class and main method to exercise the methods. The viewer canvas should also be helpful, especially using the "Basic" viewer and the "ToString" viewer for an Ellipsoid object. Web-CAT will test all of the methods specified above for Ellipsoid to determine your project grade. General Notes I. All input from the keyboard and all output to the screen should done in the main method. Only one Scanner object on System.in should be created and this should in the main method. All printing (ie, using the System.out.print and System.out.println methods) should be in the main method. Hence, none of your methods in the Ellipsoid class should do any input/output (10) 2. When a method has a return value, you can ignore the return value if it is no interest in the current context. For example, when setA(3.5) is invoked, it retums true to let the caller know ficld a was set; whereas setA(-3.5) will return false indicating field a was not set. If the caller knows that is positive, then the return value of setA(x) can safely be ignored since it can be assumed to be true. 3. Even though your main method (or other methods) may not be using the return value of a method such as setA(x), you can ensure that the retum type is correct by using interactions. Page 5 of 5

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!