Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with my EllipsoidApp.java Program. I received inputs that I do not how to fix. please see below for input and for my

I need help with my EllipsoidApp.java Program. I received inputs that I do not how to fix. please see below for input and for my code.

he following hint(s) may help you locate some ways in which your solution may be improved:

Error in method main of class EllipsoidApp: Line number 1 of your output is incorrect (line numbers begin at 1). Your output was missing line 1. Your main method doesn not work when the input is as the FIRST screenshot on page 4 of the project instructions. [A run-time error occurred when running the EllipsoidApp program: student.testingsupport.ExitCalledException: System.exit(0). Please test your program and fix the error before resubmitting. ]

Error in method main of class EllipsoidApp: Line number 1 of your output is incorrect (line numbers begin at 1). Your output was missing line 1. Your main method doesn not work when the input is as the SECOND screenshot on page 4 of the project instructions. [A run-time error occurred when running the EllipsoidApp program: student.testingsupport.ExitCalledException: System.exit(0). Please test your program and fix the error before resubmitting. ]

Error in method main of class EllipsoidApp: Line number 1 of your output is incorrect (line numbers begin at 1). Your output was missing line 1. Your main method doesn not work when the input is as the THIRD screenshot on page 4 of the project instructions. [A run-time error occurred when running the EllipsoidApp program: student.testingsupport.ExitCalledException: System.exit(0). Please test your program and fix the error before resubmitting. ]

Error in method main of class EllipsoidApp: Line number 1 of your output is incorrect (line numbers begin at 1). Your output was missing line 1. Your main method doesn not work for a secret testing Ellipsoid. [A run-time error occurred when running the EllipsoidApp program: student.testingsupport.ExitCalledException: System.exit(0). Please test your program and fix the error before resubmitting. ]

import java.util.Scanner;

/** * * * Project 4. * Author Ronald Funes. * Version 02/13/2023 */

public class EllipsoidApp { /** * Prints value for a, b and c. * @param args Command line arguments (not used). * */

public static void main(String[] args) { Ellipsoid myObj = new Ellipsoid("", 0, 0, 0); Scanner input = new Scanner(System.in); //Prompt user for enter label,a b, and c System.out.println("Enter label and axes a, b, c for an ellipsoid. "); System.out.print("\tlabel: "); String label = input.nextLine(); System.out.print("\ta: "); double a = Double.parseDouble(input.next()); if (!myObj.setA(a)) { System.err.println("Error: axis value must be positive."); System.exit(0); } System.out.print("\tb: "); double b = Double.parseDouble(input.next()); if (!myObj.setB(b)) { System.err.println("Error: axis value must be positive."); System.exit(0); } System.out.print("\tc: "); double c = Double.parseDouble(input.next()); if (!myObj.setC(c)) { System.err.println("Error: axis value must be positive."); System.exit(0); } myObj = new Ellipsoid(label, a, b, c); System.out.println(" " + myObj); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions