Question: I need help with completely this program. I am not sure how to go from here. Instructions: https://imgur.com/a/YAc1B my code so far: import java.util.Random; public

I need help with completely this program. I am not sure how to go from here.

Instructions: https://imgur.com/a/YAc1B

my code so far:

import java.util.Random;

public class Teacher { private int numOf_UnreadEmails; private int theAge; private int numOf_Eccentricities; public Teacher() { //def constructor numOf_Eccentricities = 0; numOf_UnreadEmails = 0; theAge = 0; } public Teacher(int emails, int age, int eccentricities) { //arg constructor 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 double respect(double respectLevel) { respectLevel = theAge - numOf_Eccentricities; return respectLevel; } public void receiveMail(int newMail) { double stressLevel = 0; double respectLevel = 0; numOf_UnreadEmails += newMail; //First double randomVar = Math.random(); double randomVar2 = Math.random(); if (randomVar <= .20){ if (randomVar2 <= .50) { numOf_Eccentricities += 2; } else if(randomVar2 > .50) { numOf_Eccentricities -= 2; } } if(stress(stressLevel) > respect(respectLevel)){ //got stuck here } }

public class Professor extends Teacher{ public Professor(int emails,int age, int eccentricities){ super(numOf_UnreadEmails, theAge, numOf_Eccentricities); } public int respect(int respectLevel) { //overrides super class respect method respectLevel = theAge + numOf_Eccentricities; 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!