Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Examine the following UML Class Diagram. Please notice that bold italic stands for abstract in UML Class diagrams. ror consistency purposes, please accept the followings
Examine the following UML Class Diagram. Please notice that bold italic stands for abstract in UML Class diagrams. ror consistency purposes, please accept the followings in this question. 1 week =7 days 1 month =30 days 1 year is 365 days Additionally, remember that the income of an Employee is the salary, and the income of a student is the allowance. a-) Create the class hierarchy using Java programming languages. Notice that the content of the methods must also be completed at this stage. As an example, calculateBirthYear() should have a body that calculates the birthYear of student. Please use super() in the constructors when creating new Student and new Employee. b-) Create a test harness/run class named Test.java. c-) Within Test.java, create an Employee named Jack who is 30 years old. Jack works as a Computer Engineer and gets 70 (pounds) per day. d-) Within Test.java, create a Student named Suzan who is 19 years old. Suzan goes to Cyprus International University (CIU). She gets a daily allowance of 20 (pounds). e-) Calculate and display the weekly and monthly income of Jack and Suzan in a JOptionPane window. f-) Calculate and display the yearly income of Jack, and the BirthYear of Suzan in a JOptionPane window
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