Section outline
-
Course Instructor: Esraq Humayun
Lecturer, SWE Department
Phone:01770137655,email:esraq.swe@diu.edu.bd
https://faculty.daffodilvarsity.edu.bd/profile/swe/esraq.html
-
- Design a class hierarchy rooted in the class
Employee
that includes subclasses forHourlyEmployee
andSalaryEmployee
. The attributes shared in common by these classes include the name, and job title of the employee, plus the accessor and mutator methods needed by those attributes. The salaried employees need an attribute for weekly salary, and the corresponding methods for accessing and changing this variable. The hourly employees should have a pay rate and an hours worked variable. There should be an abstract method calledcalculateWeeklyPay()
, defined abstractly in the superclass and implemented in the subclasses. The salaried worker’s pay is just the weekly salary. Pay for an hourly employee is simply hours worked times pay rate.
2..Write a Java program to create a class Vehicle with a method called speedUp(). Create two subclasses Car and Bicycle. Override the speedUp() method in each subclass to increase the vehicle's speed differently
-
Opened: Sunday, 4 June 2023, 12:00 AMDue: Tuesday, 6 June 2023, 12:00 AM