Question: Using free UML drawing tools (such as UMLet), a complete UML diagram for both instructor and course classes I don't want to code class Course

Using free UML drawing tools (such as UMLet), a complete UML diagram for both instructor and course classes I don't want to code class Course which contains the following attributes and member methods: name ( dept. short name ( exactly 4 chars long) e.g. Comp = String ) - private Id ( course id e.g. 2310 = integer ) - private Appropriate constructors ( default and non default ) as well as the appropriate setter and getter methods. A printInfo( ) method to print the attributes and their values in an organized manner.

class Teacher which contains the following attributes and member methods: name ( teachers name = String ) - private id ( teachers id number = integer ) - private basicSalary ( double ) - private extraPaymentRate ( double ) - private coursesTaught ( group of courses taught by teacher = Array of type Course ) private Appropriate constructors ( default and non default ) as well as the appropriate setter and getter methods. A printInfo( ) method to print the attributes and their values in an organized manner.

Method countCourseLevel( ) which takes a level ( integer 1-4 ) as an argument and returns the number of courses of that level e.g.: If courses taught by the teacher are: Comp1310, Encs247, Comp2310, Comp233, Comp483 and the level required is level 2 then the number of courses in that level are 3 ( sum of all courses whose id starts with 2)

Method calculateExtraPayment() which returns the value of extra payment calculated as follows (Note: rate in formula = extraPaymentRate): Number of level 1 courses * 1 * rate + Number of level 2 courses * 2 * rate + Number of level 3 courses * 3 * rate + Number of level 4 courses * 4 * rate.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!