Problem: Create the classes on the UML class diagram. Set Inheritance relationship between the classes.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Java it must be in more then one class

Problem: Create the classes on the UML class diagram. Set Inheritance relationship between
the classes.
Lecturer
* name: String
+ surname: String
+ salary: double
calculateExtrafee (int extrahours): double
Extends
Extends
HourlyPaidLecturer
FullTimeLecturer
calculateExtraFee (int lessonhours): double
calculateExtraFee (int lessonhours): double
1) Write the classes according to the UML class digram.
2) Create an array of Lecturer objects with 5 members. 3 of them HourlyPaidLecturer
and 2 of them FullTimeLecturer.
3) FullTimeLecturer has a salary and if the lecturer gives extra hours (over 14 hours)
he/she will be paid hour*100 tl. Salary will be defined by you.
4) Hourly paid lecturer will be paid hour*100 tl. Their salary is the Money that they earn
by giving lectures. They are hourly paid.
5) If FullTimeLecturer gives under 14 hours of lectures then he/she will not be paid. If
so, the user should be informed.
6) Salarys must be defined by you. Salary of hourly paid lecturers should be 0. Salary
should be updated by calculateExtraFee method.
7) Write some code to calculate extra fees for your Lecturer objects.
Example:
Lecturers[0].calculateExtraFee(10);//Suppose it is a hourly paid one.
//Write some code to get the result from object and write similar sentence to console
Console: 1000 tl should be given to Dr. Ahmet, Salary=1000;
Lecturers[1].calculateExtraFee(14);//Suppose it is a full time lecturer.
I/Write some code to get the result from object and write similar sentence to console
Console: Extra fee:0, Salary=4000, Full time lecturers should be paid for over 14
hours of lectures.
Write similar codes for your 5 objects in your program to test their extra fees.
Transcribed Image Text:Problem: Create the classes on the UML class diagram. Set Inheritance relationship between the classes. Lecturer * name: String + surname: String + salary: double calculateExtrafee (int extrahours): double Extends Extends HourlyPaidLecturer FullTimeLecturer calculateExtraFee (int lessonhours): double calculateExtraFee (int lessonhours): double 1) Write the classes according to the UML class digram. 2) Create an array of Lecturer objects with 5 members. 3 of them HourlyPaidLecturer and 2 of them FullTimeLecturer. 3) FullTimeLecturer has a salary and if the lecturer gives extra hours (over 14 hours) he/she will be paid hour*100 tl. Salary will be defined by you. 4) Hourly paid lecturer will be paid hour*100 tl. Their salary is the Money that they earn by giving lectures. They are hourly paid. 5) If FullTimeLecturer gives under 14 hours of lectures then he/she will not be paid. If so, the user should be informed. 6) Salarys must be defined by you. Salary of hourly paid lecturers should be 0. Salary should be updated by calculateExtraFee method. 7) Write some code to calculate extra fees for your Lecturer objects. Example: Lecturers[0].calculateExtraFee(10);//Suppose it is a hourly paid one. //Write some code to get the result from object and write similar sentence to console Console: 1000 tl should be given to Dr. Ahmet, Salary=1000; Lecturers[1].calculateExtraFee(14);//Suppose it is a full time lecturer. I/Write some code to get the result from object and write similar sentence to console Console: Extra fee:0, Salary=4000, Full time lecturers should be paid for over 14 hours of lectures. Write similar codes for your 5 objects in your program to test their extra fees.
Expert Solution
steps

Step by step

Solved in 6 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY