Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i dont know if i am doing this right. or where to go from here. any help would be nice. here are the instructions: https://imgur.com/a/Rzzv2

i dont know if i am doing this right. or where to go from here. any help would be nice.

here are the instructions: https://imgur.com/a/Rzzv2

here is my code so far:

public class Teacher { private int numOf_UnreadEmails; private int theAge; private int numOf_Eccentricities; public Teacher(int emails, int age, int eccentricities) { eccentricities = 0; numOf_UnreadEmails = emails; theAge = age; numOf_Eccentricities = eccentricities; } public double stress(double stressLevel) { stressLevel = numOf_UnreadEmails; if (stressLevel <= 1000){ return stressLevel; } if (stressLevel >= 1000){ stressLevel = 1000; } return stressLevel; } public int respect(int respectLevel) { respectLevel = theAge - numOf_Eccentricities; return respectLevel; }

public class Professor extends Teacher{ public Professor(int emails,int age, int eccentricities){ super(numOf_UnreadEmails, theAge, numOf_Eccentricities); } public int respect(int respectLevel) { respectLevel = theAge + numOf_Eccentricities; //professors are age + eccentricities (overrides) return respectLevel; } public class Lecturer extends Teacher{ public Lecturer(int emails, int age, int eccentricities) { super(numOf_UnreadEmails, theAge, numOf_Eccentricities); } } public class gradStudent extends Teacher{ public gradStudent(int emails, int age, int eccentricities){ super(numOf_UnreadEmails, theAge, numOf_Eccentricities); } public double stress(double stressLevel) { //overrides superclass method stressLevel = numOf_UnreadEmails; if (stressLevel <= 1000){ return stressLevel*1.5; } if (stressLevel >= 1000){ stressLevel = 1000; } return stressLevel*1.5; } } public static void main(String[] args) { // TODO Auto-generated method stub

}

}

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

4. Describe cultural differences that influence perception

Answered: 1 week ago