Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just wondering if you could help me start this problem. This is only the first page. Thank you For this problem, you will design classes

Just wondering if you could help me start this problem. This is only the first page. Thank you image text in transcribed
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 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 method. For example DrX.receiveMail(200): makes the Teacher DrX receive 200 new E-mails

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

Students also viewed these Databases questions