Answered step by step
Verified Expert Solution
Link Copied!

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.
2. 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 full-time, while others are part-time. 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 (e.g., 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 full-time employee.
salary: A double representing the monthly salary of the employee.
Methods:
Constructor(s) to initialize the id and name.
void displayInfo(): Overrides the method to display information about the full-time 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 part-time employee.
hourlyRate: A double representing the hourly rate of the employee.
hoursWorked: An integer representing the number of hours worked by the employee.
Methods:
Constructor(s) to initialize the id, name, hourlyRate, and hoursWorked.
void displayInfo(): Overrides the method to display information about the part-time 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: 17 May 2024
Submit your course project (.java files) and a screenshot of your run to the Blackboard Hint output should be something like this.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

ISBN: 0262660709, 978-0262660709

More Books

Students also viewed these Databases questions