This question's due date has already passed. You may post a tutorial, but there's no guarantee that the original asker will purchase the tutorial. But other people might!

Question

$25.00 OOP Teacher classes

Asked by :
gokusonx
gokusonx Not confirmed
Rating :No Rating
Questions Asked: 28
Tutorials Posted: 0
 
 
Q:

This is a program for C# that innvolves Classes and composition. This program creates a teacher.

With this you have to make a teacher. A teacher should have (at a minimum) a name, a Dnumber, and a date of hire. Make a default contructor, and one (1) overloaded constructor that initializes all the attributes of a teacher. In addition to gets and sets, Teacher has a DispalyTeacher method that prints out all the attributes of the teacher.

Teacher also has a method HireTeacher that asks (using Console.WriteLine and Console.ReadLine) for all the information about a teacher and sets it in the Teacher. Also, Teacher has a method TeachClass for the Teacher.

No Teacher should be without a Classroom. Make a Classroom. A Classroom has a room number, a number of seats, and one Teacher. A classroom has a maximum of 30 seats.

Classroom has a default constructor.

Class also has a constructor that initializes all attributes.

A Classroom has a method, MakeClassroom, that sets all attributes EXCEPT the Teacher.

A Classroom has a DisplayClassroom method that prints out all the information about the classroom. including the Teacher. (hint: using the Teacher method DisplayTeacher.)

Classroom also has a method HoldClass, in which the Teacher has a lecture in it for 2 hours.

 

Use Classroom as a base class to make a ComputerLab.

A ComputerLab, in addition to everything that a Classroom has, has a number of computers.

A ComputerLab has a DisplayComputerLab method that prints out all the information about the ComputerLab.

The method HoldClass is overriden so that the Teacher demos code in it for 2 hours.

 

Write a test program that tests your Teacher, Classroom, and a ComputerLab.

Run HireTeacher to set a Teacher.

Make a Classroom. Run MakeClassroom to set a Classroom.

Make a ComputerLab.

Display the Teacher, Classroom, and ComputerLab.

Finally, make an array of 2 classrooms, one "plain" base Classroom and one ComputerLab.

Needs to be Nicely Commented on the code.