Jump to content

Calling Happyness, Sitara, Barfi, Ronit And All


mahesh1

Recommended Posts

                                               Lab 3 Final Exam  
1] Use the MoveMessageDemo program shown in the class as an example. Create a GUI  Application called MoveCircle.java that does the followings:   
• Display a filled circle of radius 50 in the panel  • The user can press the left-button of the mouse and drag the circle around inside the panel  • The program looks something like this      
2]  Create a class named Room that has the following properties (variables): roomsType: string roomsSize: double NumberOfRooms : int  
Include appropriate constructors, getters and setters and appropriate print methods if required .   
Create a class named House that has the following properties(variables): HouseSqFoot  HouseRate      marketPrice   RoomProperties    
Include appropriate constructors, getters and setters and appropriate print methods if required .   
Output : Print the properties of the house. (Object composition should be achieved)  
3]   A ] Declare a CommissionEmployee Interface that represents an employee paid a percentage of gross sales. Declare a public  static final  variables a first name, last name, social security number, commission rate and gross (i.e., total) sales amount.   
Add a method earning that calculates and returns the earnings .   
B] Declare class BasePlusCommissionEmployee, which implements  interface  CommissionEmployee and has an instance variable baseSalaryPerWeek.  
Add set and get methods for baseSalaryPerWeek . Override earning methos with the formula as follows:  
baseSalaryPerWeek + ( commissionRate * grossSales );  
Override toString method to display all information first name, last name, social security number, commission rate and gross (i.e., total) sales amount and also earnings.  
Write a test code to test them.  
Output :  First_name=John, Last_name=Mathew, Ssn=988777, Commisionrate=4.5, Totalsales=78.0 , earnings=354.0,salaryperweek=3.0  
 
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...