Subscribe For Free Updates!

We'll not spam mate! We promise.

Friday, 22 December 2017

Write a java program that contains classes Date, Employee and EmployeeTest

QN. (Composition)Write a java program that contains classes Date, Employee and EmployeeTest. Class Date declares instance variables month, day and year to represent a date. Create a constructor that receives three int parameters for initializing the objects. Provide a toString method to obtain the object’s String representation. Class Employee has...

Thursday, 21 December 2017

Saving Account To calculate monthly interest

QN. Create a class Saving Account. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount the saver currently has on deposit.Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying...

Monday, 18 December 2017

(Abstraction) Payroll calculations polymorphically.

QN A company pays its employees on a weekly basis. The employees are of four types: Salaried employees are paid a fixed weekly salary regardless of the number of hours worked, hourly employees are paid by the hour and receive overtime pay (i.e., 1.5 times their hourly salary rate) for all hours worked in excess of 40 hours, commission employees are...

Implementation the Shape hierarchy(Java )

Implement the Shape hierarchy shown in Figure below. Each Two-DimensionalShape should contain method getArea to calculate the area of the two-dimensional shape. Each ThreeDimensionalShape should have methods getArea and getVolume to calculate the surface area and volume, respectively, of the three-dimensional shape. Create a program that uses an array...