subject

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();
}

}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
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
You know the right answer?
Project 15A - Math Application package: proj15A

Classes: Main, Circle, Rectangular
Questions
question
Mathematics, 16.07.2019 16:00
question
Advanced Placement (AP), 16.07.2019 16:00
Questions on the website: 13722360