Question: Note a java class must be defined in a java file named same as the class name. Lab 4: Create a java file for class

Note a java class must be defined in a java file named same as the class name.

Lab 4: Create a java file for class Rectangle with data members width and height, and member method getArea() and constructors, and save it as Rectangle.java. Then create another java file with main program to create two Rectangle objects (you specify the widths and heights) and display the areas of these two rectangles.

Homework 4: Design a class SavingAccount, with data members account_id, amount, and interest_rate, and member method getMontlyInterest(). Then write a main program to set up account and display the monthly interest amount.

I am having problem with Homework 4, please help me solve it.

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!