There are two types of courses offered at the Faculty of Computing of Universiti Teknologi Malaysia, lectured and non-lectured. A l
ectured course is a regular course which has a lecturer teaching the class; whereas a non-lectured course does not require a lecturer, for example final year undergraduate projects, and internship courses. Besides that, a nonlectured course has a prerequisite minimum credit hour, indicating that the student needs to earn at least the minimum credit hour before he or she can enrol for the course. Each course, regardless lectured or non-lectured, is assigned with a code and name.
(a) Draw the UML class diagram for the above problem. Your design should include the classes and their attributes and methods as specified in Table B1; as well as relationships between the classes. Then, write the C++ code to implement the design. Your implementation should apply the concept of data hiding in which all the attributes are inaccessible from outside of the class.
(b) Finally, use the classes to create a program that helps the faculty to manage two types of courses, subject-based and project-based courses. You need to create
two arrays named
subjects which is of type LecturedCourse and
projects of type NonLecturedCourse, respectively. Also, the program should provide the user a menu-driven interaction with the options as described in Table B2. The program repeats until the user chooses to exit. Refer to Figure B1 for the example run of the program.
Solution
0 Comments