Question: Description Class design is type design. Defining effective classes can be challenging. For this lab you are to design classes for a school database with

Description

"Class design is type design. Defining effective classes can be challenging. For this lab you are to design classes for a school database with has-a and is-a relationships that have natural syntax, intuitive semantics, and efficient memory allocation. The class objects are populated from parsed input strings. Use object inheritance, polymorphism, and function and operator overloading where needed. All member data and internal functions are private. All classes have a "toString" method with friends for the insertion ("<<") operator."

Lab requirements:

Write your own main() function to read and process lab files. (No driver supplied.)

1.)Use argv[1] to select the input file and argv[2] to select the output file.

2.)Design classes for snaps, csgs, cdhs, and crs. Create an UML diagram of your classes.

3.)Add default and other constructors to each class. (A default constructor is called with no arguments - either defined with an empty parameter list, or with default arguments provided for every parameter. If no user-declared constructors of any kind is provided for a class type (struct, class, or union), the compiler will always declare a default constructor as an in-line public member of its class.)

4.)Use at least one instance of class inheritance.

5.)Override at least one class member function.

6.)Add a toString() method with a friend insertion operator to every class.

7.)Read from the input file the following types of input strings, instantiate and populate the corresponding class objects, and store (push_back) in their class vectors:

snap(studentID,studentName,studentAddress,studentPhone).

csg(courseName,studentID,studentGrade).

cdh(courseName,day,time).

cr(courseName,room).

9.)Use a try-catch construct to handle erroneous input strings. (See C++ Exceptions.)

10.)Output the following four lists:

Input Strings: snap(12345,C. Brown,12 Apple St.,555-1234). csg(CS101,12345,A). ...

Vectors: snap(12345,C. Brown,12 Apple St.,555-1234) snap(67890,L. Van Pelt,34 Pear Ave.,555-5678) ...

Course Grades: CS101 MWF, 1170 TMCB C. Brown 12345, A CS101 MWF, 1170 TMCB L. Van Pelt 67890, B ...

Student Schedules:

Charlie Brown, 12345, Manager, 555-1234 CS101 MWF 9AM, 1170 TMCB EE200 TTh 10AM, B92 JFSB ...

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!