Build the program based on the skeleton code provided

Assignment Help Programming Languages
Reference no: EM132316031

Assignment -

The course registration system maintains information of courses, students and the course registered. There are two Class Course and Student (defined in Course.h and Student.h respectively)

class course

{

private:

char name50;

char codel9];

int credit

public:

//Constructor member funct ions

course();

course(const char n[50], const char cI9], int cre);

// ACCESSOR member funct ions

void print_course_detail() const;

int get credit() const;

void get_code(char+ output) const;

// MUTATOR member funct ions

void set_credit (int cre) ;

};

 

class student

{

private:

char name[20];

char id[9];

int num_registered_course;

course courses[MAX_COURSES];

public:

// CONSTRUCTOR member function

student();

student (const char n[20], const char i[9]);

// ACCESSOR member funct ions void list_registered_courses) const;

void print_name_id() const;

int get total_credit() const

//MUTATOR member functions

bool registerCourse(const course &c);

bool dropCourse(const course &c);

};

YOUR TASKS - You are required to build the above program based on the skeleton code provided.

You may define additional function if necessary. There are three files, course,h, student.h and main.cpp in the zipped folder. To build them in eclipse, you should first "New" a empty C++ project, and then copy these files directly to the project (or drag them into project folder).

Functions are declared in .h file and you should complete the implementation of the following functions in Student.cpp and Course.cpp:

In Course.cpp,

1. course() - a constructor member function that initialize course's name and code to "N/A" and set the credit to 0

2. course(const char n[50], const char c[9], int cre) a constructor member function that initialize course's name to n and code to c and set the credit to cre

3. void print_course_detail() const prints the course name, code and credit in the format "Course Code: course_codej Course Name: scourse_namej Credit: credit!"

4. int get_credit() const - return the credit of the course

5. void get_code(char* output) const - return the course code to the char output

6. void set_credit (int cre) - a mutator member function that set credit of the course to cre

In Student.cpp

1. student() a constructor member function that initialize student's name and id to "N/A" and num_registered_course to 0

2. student(const char n[20], const char i[9]) a constructor member function that initialize student's name to n, id to i, and num_registered_course to 0

3. void list_registered_courses() const lists courses registered by the student.

4. void print_name_id) const - prints the student name and id in format "Name: (student_name ID: {student id} endl"

5. int get_total_credit() const - return the sum of earned credit from all the registered course of the student

6. bool registerCourse(const course &c) - a mutator member function that register the course c for the student.

You should check if the student's course quota if full. If it is not full, add this course and increment the number of registered courses.

If the student successfully registered the course, return true return false otherwise

7. bool dropCourse(const course &c) - drops course c for the student. You should check if the course c is registered.

If it is registered, drop it and decrement the number of registered courses. If the drop successful, return true, return false otherwise

To compare two C strings, you can use the function int strcmp (const char str1, const char str2) It returns value 0 when contents of both strings are equal, value str1 greater than str2 0 when str1 smaller than str2, and value > 0 when when str1 greater than str2.

Reference no: EM132316031

Questions Cloud

Illustrative of unobtrusive observations : Which of the following is (are) illustrative of unobtrusive observations? In which of the following analyses is content analysis LEAST likely to be useful?
Describe the break-even point and its importance : Describe the use of internal rate of return (IRR), net present value (NPV), and the payback method in evaluating project cash flows.
Determine the main financial statement effects of exposure : Albert, CEO of XYZ, Inc., desires to expand the company's sales through exports to three (3) foreign subsidiaries. Albert knows that the target subsidiaries.
Generates a website about australian road fatalities : ICT112 - Creative Problem Solving with Programming - University of the Sunshine Coast, Queensland - write a Python program that generates an informative
Build the program based on the skeleton code provided : YOUR TASKS - You are required to build the above program based on the skeleton code provided. You may define additional function if necessary
Examine the importance of the audit committee : Internal Control 1. Examine the importance of the audit committee oversight related to the quality of the internal controls of an organization.
How often would the cycle turn over in a year : Pretty Lady Cosmetic Products has an average production process time of 40 days. Finished goods are kept on hand for an average of 15 days before they are sold.
How does the fed manage the money supply : What is the FED's job and how does the FED manage the money supply? How do banks create money? Let's explore these questions as we talk about the role.
How profit could be improved by specific production decision : Describe in your own words how a job order cost system facilitates understanding how much it cost to produce a given unit of product - for example.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd