h property. b. Your class should have two constructors: one that takes all properties, and one that takes only first name, last name, university name, and subject and sets both of the ratings to an appropriate default value. c. You should provide accessors (getters) and mutators (setters) for first name, last name, university name, and subject. d. Your class should provide a method to add a new rating for the professor. It should take two arguments: one for overall rating and one for level of difficulty, with values from 1 (awful) to 5 (aweso

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

You are designing an application to rate your professors.
a. Professors have the following properties: first name, last name, university
name, subject, and ratings for overall quality (1.0-5.0) and level of difficulty
(1.0-5.0). Your class should have instance variables of the appropriate
type for each property.
b. Your class should have two constructors: one that takes all properties, and
one that takes only first name, last name, university name, and subject
and sets both of the ratings to an appropriate default value.
c. You should provide accessors (getters) and mutators (setters) for first
name, last name, university name, and subject.
d. Your class should provide a method to add a new rating for the professor.
It should take two arguments: one for overall rating and one for level of
difficulty, with values from 1 (awful) to 5 (awesome). Each time a new
rating is provided, your class should calculate the average rating for the
professor and update the appropriate variable for each.
e. Your class should provide two methods to retrieve the averages for overall
rating and level of difficulty.
f. Your class should have an informative toString method.
g. Update your main method to create at least two professors and apply
several ratings to each. You should print the initial state of each professor
using your toString method as well as the change in state each time any
of the state is changed (e.g. a mutator is used to modify the subject or a
new rating is applied).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT