Create a java application called ratecalculator


Homework

Details

Create a Java application called "RateCalculator." In this application, create a custom class named "Calculator." In the Calculator class, create a method called "Multiply" which accepts two incoming integer variables. Within the Multiply method, create an integer variable to store the total, then calculate the total based on the two incoming variables. Return the total.

In the project class, within the main() method, declare integer variables named "firstNum" and "secondNum" and set their initial values to any number between 1 and 9. Create an additional integer variable called "output." Then write code to declare a member of the Calculator class called "myCalc" and then utilize myCalc to call the Multiply method to calculate the result of firstNum times secondNum. Store the result in "output", and present the result on screen.

Within the Calculator class, create methods similar to Multiply called "Add", "Subtract", and "Divide." Create appropriate logic within these methods, and display their use in the main method of the project class. (These methods will not be utilized when the program runs, but the code must be present.)

Write appropriate in-line comments in both the project class and the Calculator class to explain each line of code in your program.

Summary:

1. Create an application called "RateCalculator"

2. Create a custom class with the name and features listed above

3. Create methods within the Calculator class to perform the calculations

4. Write code in the Calculator class (in the main() method) to execute the methods from the Calculator class

Format your homework according to the give formatting requirements:

• The answer must be using Times New Roman font (size 12), double spaced, typed, with one-inch margins on all sides.

• The response also includes a cover page containing the student's name, the title of the homework, the course title, and the date. The cover page is not included in the required page length.

• Also include a reference page. The references and Citations should follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a java application called ratecalculator
Reference No:- TGS03116375

Now Priced at $40 (50% Discount)

Recommended (93%)

Rated (4.5/5)