0% found this document useful (0 votes)
2 views2 pages

Java Class Relationships and Methods Guide

The document outlines a Java tutorial that identifies classes like Company and Employee, relationships between the classes, and attributes and methods for each class like getName() and getSalary().

Uploaded by

Soumallya Hazra
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)
2 views2 pages

Java Class Relationships and Methods Guide

The document outlines a Java tutorial that identifies classes like Company and Employee, relationships between the classes, and attributes and methods for each class like getName() and getSalary().

Uploaded by

Soumallya Hazra
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

Java Tutorial

Here is the Java tutorial:

a) Identify the classes

• Company

• Employee

• Manager

• Contractor

b) Identify the relationships between each classes

• Company → Super class

• Class Employee extends Company

• Class Manager extends Employee

• Class Contractor extends employee

c) Identify the attributes and methods

• Company

➢ Attributes

▪ Name

▪ Employee

➢ Methods

▪ getName()

▪ getEmployees

• Employee

➢ Attributes

▪ Name

▪ employeeNumber

▪ salary

▪ manager
➢ Methods

▪ getName()

▪ getEmployeeNumber()

▪ getSalary()

▪ getManager()

• Manager

➢ Attributes

▪ Manages[]:Employee

➢ Methods

▪ addTeamMembers()

▪ getTeamMembers()

• Contractor

➢ Attributes

▪ lengthOfContract

➢ Methods

▪ getLengthofContract(

You might also like