Classes: Main, Circle, Rectangular
Computers and Technology, 20.11.2020 20:50 nmg9
Project 15A - Math Application
package: proj15A
Classes: Main, Circle, Rectangular
Using your new knowledge of methods and classes create a program with an interface. The program must allow a user to enter values and calculate: Areas, Perimeters, Surface Area, and Volumes for circular and rectangular shapes.
The program must have three classes. A main class, circle class and a rectangular class.
Submit all code one after the other as text into Canvas in the following order.
• main. class
• circle. class
• rect. class
I have it all done just need to finish this code
package math;
import java. util. Scanner;
public class Main
{
public static void main(String[] args)// main method
{
Scanner nScan = new Scanner(System. in);
DecimalFormat mf = new DeciamlFormat("0.0");
Circle cir1 = new Circle(0,0);
Rectangle rec1 = new Rectangle (0,0,0);
//variables
boolean runProg = true;
int choice =0;
while(runProg)
{
System. out. print("Math calculator 3000 ver1");
System. out. print("choose a mode. \n"
+ "1 circle mode \n"
+ "2 Rectangle mode \n"
+ "3 End program");
choice = nScan. nextInt();
if(choice==1) //circle mode
{
}
else if(choice == 2) //Rectangle Mode
{
}
else if(choice == 3) //Program Shutdown
{
}
else
{
System. out. println("You may only choose 1-3. Try again.");
}
}
nScan. close();
}
}
Answers: 2
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
Computers and Technology, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
Project 15A - Math Application
package: proj15A
Classes: Main, Circle, Rectangular
Classes: Main, Circle, Rectangular
History, 19.11.2019 13:31
English, 19.11.2019 13:31
Physics, 19.11.2019 13:31
Chemistry, 19.11.2019 13:31
English, 19.11.2019 13:31
History, 19.11.2019 13:31
Mathematics, 19.11.2019 13:31
English, 19.11.2019 13:31
History, 19.11.2019 13:31
Mathematics, 19.11.2019 13:31
Geography, 19.11.2019 13:31
Mathematics, 19.11.2019 13:31