[Solved] CSCI204 Assignment 1 SOLVED

30 $

File Name: CSCI204_Assignment_1_SOLVED.zip
File Size: 254.34 KB

SKU: [Solved] CSCI204 Assignment 1 SOLVED Category: Tag:

Or Upload Your Assignment Here:


5/5 – (11 votes)

This assignment aims to establish a basic familiarity with C++ classes. The assignment introduces increasingly object-based, C++ style of solution to a problem.

General Requirements Observe the common principles of OO programming when you design yourclasses. Put your name, student number at the beginning of each source file. Make proper documentation and implementation comments in your codes where they are necessary. Logical structures and statements are properly used for specific purposes.ObjectivesOn completion of these tasks you should be able to: Code and run C++ programs using the development environment. Make effective use of the on-line documentation system that supports thedevelopment environment. Code programs using C++ in a hybrid style (procedural code using instances ofsimple classes) and in a more object-based style. Manipulate string data.Task:In this task, you will implement a C++ program to simulate students’ lab enrollment. The UML diagrams are shown as following:Note: The attributes that marked ID, ID1, ID2 are the key attributes that canidentify an object of those classes.You will define the classes Subject, Student, Lab, associated classes Enrolment and Allocation according to the UML diagrams above.Define a class Subject in a file Subject.h with data members shown in the UMLdiagrams above. Implement necessary member functions (such as constructors, set and get functions, print function) in a file Subject.cpp.Define a class Student in a file Student.h with data members shown in the UMLdiagrams above. Implement necessary member functions in a file Student.cpp.Define a class Lab in a file Lab.h with data members shown in the UML diagramsabove. Implement necessary member functions in a file Lab.cpp.Define a class Enrolment in a file Enrolment.h with data member student number,subject code, enrolled date. Implement necessary member functions in a fileEnrolment.cpp.Define a class Allocation in a file Allocation.h with data member student number, lab ID and subject code. Define a class AllocationNode with an object of Allocation, and a pointer of AllocationNode in the file Allocation.h. Define a class AllocationList with two pointers of AllocationNode in the file Allocation.h. One pointer points to the head, another pointer points to the tail of a linked list. The classes AllocationNode and AllocationList will be used to make a linked list to store the lab enrolments.Implement necessary member functions in a file Allocation.cpp for the classesAllocation, AllocationNode and AllocationList. The member functions allow the program to create Allocation, AllocationNode objects (constructors or set functions), add new node at the end of the linked list (e.g. push_back(const Allocation &)), search lab allocation information by using pointers of the linked list.Define a class Admin in a file Admin.h with data members: A pointer points to a dynamic array of Student objects; An integer stores the total number of Student objects; A pointer points to a dynamic array of Subject objects; An integer stores the total number of Subject objects; A pointer points to a dynamic array of Lab objects; An integer stores the total number of Lab objects; A pointer points to a dynamic array of Enrolment objects; An integer stores the total number of Enrolment objects; An object of a linked list for students’ lab allocations.Implement member functions described below in a file Admin.cpp: A function loads student’s records from a given text file into a dynamic array ofstudents. A function loads subject’s records from a given text file into a dynamic array ofsubjects. A function loads lab’s records from a given text file into a dynamic array of labs. A functions loads enrolment’s records from a given text file into a dynamic arrayof enrolments. A function prints all students’ information that loaded. A function prints all subjects’ information that loaded. A function prints all labs’ information that loaded. A function prints all enrolments’ information that loaded. A function displays subjects’ codes for a student. A function displays labs’ IDs for a subject. A function manipulates lab allocations for students. A function prints out lab allocation list for each lab. Other necessary member functions.Implement main() in a file main.cpp that gets command line inputs, declares an object of Admin, then call the member functions of Admin to load all records for students, subjects, labs and enrolments, display loaded records, manipulates students lab allocations by student’s number, subject code and lab / tutorial ID. The manipulation function should verify the input values for the student’s number, subject code and lab / tutorial ID. At the end, the program will print lab enrolment list for each lab. The details can be found at Testing section.Note: Do not put statement “using namespace std;” in the head files. Do not define public data members for the classes.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI204 Assignment 1 SOLVED
30 $