Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Introduction The main focus of this project is to develop an application written in java. This project is a group project ( group of two
Introduction
The main focus of this project is to develop an application written in java. This project is a group project group of two The project must satisfy the requirements given in this document. Further, going beyond these requirements is highly encouraged, so be creative as much you can.
Requirements
Design a system to model different types of employees in a company. Each employee has a unique identification number and a method to calculate their monthly salary. Some employees are fulltime, while others are parttime. You need to implement this system using abstract classes and interfaces.
Define an abstract class Employee with the following properties and methods: Properties:
id: A unique identification number for the employee.
Methods:
abstract double calculateMonthlySalary: Calculates and returns the monthly salary of the employee.
void displaylnfo: Displays information about the employee eg ID
Define an interface PartTime with the following method:
double calculateHourlyRate: Calculates and returns the hourly rate of the parttime employee.
Create a concrete class FullTimeEmployee that extends Employee. The FullTimeEmployee class should have the following properties and methods: Properties:
name: A string representing the name of the fulltime employee.
salary: A double representing the monthly salary of the employee.
Methods:
Constructors to initialize the id and name.
void displayInfo: Overrides the method to display information about the fulltime employee including their ID name, and monthly salary.
Create a concrete class PartTimeEmployee that implements Employee and PartTime. The PartTimeEmployee class should have the following properties and methods:
Properties:
name: A string representing the name of the parttime employee.
hourlyRate: A double representing the hourly rate of the employee.
hoursWorked: An integer representing the number of hours worked by the employee.
Methods:
Constructors to initialize the id name, hourlyRate, and hoursWorked.
void displayInfo: Overrides the method to display information about the parttime employee including their ID name, hourly rate, and monthly salary. Write the Java code to implement the above scenario. Ensure that the code is properly structured and demonstrates the usage of abstract classes and interfaces.
Note: You can assume appropriate data types and accessor modifiers for properties and methods as needed.
Explain almost every line in a comment after each line please
Submission Guidelines:
Due date: May
Submit your course project java files and a screenshot of your run to the Blackboard Hint output should be something like this.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started