Question: Part One Write a C# code for the following UML classes: Course - code : String - title : String - credit : int -
Part One
Write a C# code for the following UML classes:
| Course |
| - code : String - title : String - credit : int - prerequisite_code : Sting |
| + Course (code, title, credit, prereq) + checkPrereq ( ) : Boolean + ToString ( ): string |
|
(10 Marks)
| Student |
| - id : string - name : string + schedule[ ] : Course |
| + Student (id) + Student (id, name) + setName (name: string) + getName ( ) : string + ToString ( ): string |
|
Part Two
Using the classes above, write the statement(s) needed for the following questions (use fictional data):
Create two objects named (maleStudent) and (femaleStudent) using the two different constructors with any values you select.
Set any name for the object created by the first constructor.
Display the names of both objects.
Create 3 different courses for each student and load them in its schedule array.
Demonstrate the work of checkPrereq () method for a couple of courses showing one of them returning true and the other returning false.
Display all the information (fields) of both students including their schedule courses details..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
