Answered step by step
Verified Expert Solution
Question
1 Approved Answer
just need help beginning the problem so I just put the first page For this problem, you will design classes suitable for storing information about
just need help beginning the problem so I just put the first page
For this problem, you will design classes suitable for storing information about University Teachers. The goal of the exercise is to demonstrate arranging class definitions in an inheritance hierarchy for maximum code-sharing. The problem A. You are to model the three types of University Teacher: Professor, Lecturer, and Grad student by writing appropriate classes At any time, the state of a University Teacher can be described by three quantities, implemented as private instance variables: number of unread e-mail messages, age, number of eccentricities A Teacher class should have a constructor with two parameters, age and unread mail. The eccentricities should be set to zero. There are two measures of a Teacher's current mood: Stress and Respect. Stress-a Teacher's stress level is the number of unread messages. However, Stress is never more than 1000. Grad students are the exception. Their stress is 1.5 times the number of unread messages and their maximum stress is 1500. Respect-generally a Teacher's level of respect in the community is their age minus the number of eccentricities. Respect can never be negative. Professors are the exception-(Professor eccentricities are regarded as "signs of a troubled genius" thereby increasing respect). So for Professors, respect is age plus number of eccentricities. Everything in a Teacher's life is driven by receiving e-mail. This is done by a call to the receiveMail O method. For example Drx.receiveMail(200); makes the Teacher Drx receive 200 new E-mailsStep 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