[go: up one dir, main page]

0% found this document useful (0 votes)
89 views6 pages

Lab Guides: Java SE 8 Programming Language

This document provides guidelines for a Java programming lab on object-oriented programming concepts. The lab involves creating an abstract Employee class with subclasses for different employee types (DailyStaff, ProductionStaff, Manager) that override a calculate salary method. An EmployeeManagement class will create an array of employees to display their input data and salaries. The objectives are to practice inheritance, polymorphism, and encapsulation. Screen designs show inputting and displaying employee data. Project structure guidelines explain setting up the classes.

Uploaded by

Le Doan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views6 pages

Lab Guides: Java SE 8 Programming Language

This document provides guidelines for a Java programming lab on object-oriented programming concepts. The lab involves creating an abstract Employee class with subclasses for different employee types (DailyStaff, ProductionStaff, Manager) that override a calculate salary method. An EmployeeManagement class will create an array of employees to display their input data and salaries. The objectives are to practice inheritance, polymorphism, and encapsulation. Screen designs show inputting and displaying employee data. Project structure guidelines explain setting up the classes.

Uploaded by

Le Doan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Java SE 8 Programming Language

Lab G ui des

Contents
Unit 5: Basic OOP............................................................................................................................ 2
Lab Guide 1: Abstract class, Inheritance, Polymorphism..............................................................2
Objectives: JPL-9......................................................................................................................... 2
Lab Guides Mr Tuan Cat
CODE: JPL.M.L005
TYPE: Medium
LOC:
DURATION: 90 MINUTES

Unit 5: Basic OOP


Lab Guide 1: Abstract class, Inheritance, Polymorphism

Objectives:
 Able to create Java-based applications that take advantage of Java object-oriented features, including
encapsulation, inheritance, and polymorphism.
 Understand the static components in java

Problem Descriptions:
Create a new package named lab5.
 Create an abstract class Employee with: employee name, date of birth, address, company name,
calcSalary() abstract method, inputData() method to input employee information, display() method
to show all information. This class contains constructor and getter/setter if needs.
 There are three employee type:
o Production staff: amount of product, salary = amount of product * 20$;

o Daily staff: number of workdays, salary = number of workdays * 15$;

o Manager: basic salary, wage, salary = basic salary * wage;

 Create class ProductionStaff, DailyStaff and Manager that extends Employee class. Override
calcSalary to calculate salary for each employee type.
 Create another class named EmployeeManagement that creates an array contains 3 employees of
above type, loop to calls the display() method to print the outputs.

Screen Designs:
Screen 1: input data Screen 2: display data

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 2/6


Lab Guides Mr Tuan Cat
Guidelines:
Project struture:

 Employee class

 DailyStaff class

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 3/6


Lab Guides Mr Tuan Cat

 ProductionStaff class:

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 4/6


Lab Guides Mr Tuan Cat

 Manager class:

 EmployeeManagement class

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 5/6


Lab Guides Mr Tuan Cat

-- THE END -

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 6/6

You might also like