Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Looking for as much help as possible. Thank you! CS 202-Computer Science II Finals Sample Release date: Wednesday, 12/6/2017 Test Objectives: A comprehensive evaluation of

image text in transcribed

image text in transcribed

Looking for as much help as possible. Thank you!

CS 202-Computer Science II Finals Sample Release date: Wednesday, 12/6/2017 Test Objectives: A comprehensive evaluation of the course material Everywhere, the use of pointers, bracket-notation, and the buil-in C-sting librarystringh> functions are allowed Program 1 (60 pts) You are given the working definitions and implementations of two Classes (description-only shown here): class Cover public: //Coverdefault conatructor, seta m hard to false //Cover (bool hard) parametrized constructor, sets m hard to hard /operatores overload, outputs m hard to the calling obiect (cout,etc //operator>> overload, assigna n hard 0/1 value r? calling object input(cin,etc..) //GetValue) method, returns m hard by value and does not modify calling object private bool m hard, class client pubiic /client default construetor, 1eaves m name uninitialized //client (const char name) parametrized conatructor, copie c-string name to m nane //client(const Client& other) copy constructor, deep-copies data -Client) destructor, deallocates memory as necessary //operator= overload, d@ep-copies data and returns reference to caling object //operatorse overload, outputa m to the calling object (cout,ete //operatoroverload, grabs and copies to m name input trom calling object(cin,etc) //GetName() method, returns m name by address and does not modify calling object private char* m nane (Partl Grading Scheme: 20pts, 10pts Class Declaration -10pts Class Implementation) (Hint: A smaller subset of such specifications will be required for the actual Finals) For the first part of this program you are required to implement a Book class, which will has to adhere by these specifications: Each Book should have the members (all privatej: e mtitle: a Cstring pointer-not array representing the book title. . mcover a Cover class obiec which represents the book cover e mclient: a Client class const pointer, the person (renter) who currently has the book in their possession. If the book is not rented out to someone this pointer should be NULL Hint Remember const pointer means the mclient variable can be assigned to pointed to different objects, but it cannot be used to modify the object it points to). . m_serial: a consan size_t number, representing a unique identifier for each Book object and the Book class will also have a private as well: count: a static size t, keeping track of the last greaest unique Book id (as generated via a constructor). CS 202-Computer Science II Finals Sample Release date: Wednesday, 12/6/2017 Test Objectives: A comprehensive evaluation of the course material Everywhere, the use of pointers, bracket-notation, and the buil-in C-sting librarystringh> functions are allowed Program 1 (60 pts) You are given the working definitions and implementations of two Classes (description-only shown here): class Cover public: //Coverdefault conatructor, seta m hard to false //Cover (bool hard) parametrized constructor, sets m hard to hard /operatores overload, outputs m hard to the calling obiect (cout,etc //operator>> overload, assigna n hard 0/1 value r? calling object input(cin,etc..) //GetValue) method, returns m hard by value and does not modify calling object private bool m hard, class client pubiic /client default construetor, 1eaves m name uninitialized //client (const char name) parametrized conatructor, copie c-string name to m nane //client(const Client& other) copy constructor, deep-copies data -Client) destructor, deallocates memory as necessary //operator= overload, d@ep-copies data and returns reference to caling object //operatorse overload, outputa m to the calling object (cout,ete //operatoroverload, grabs and copies to m name input trom calling object(cin,etc) //GetName() method, returns m name by address and does not modify calling object private char* m nane (Partl Grading Scheme: 20pts, 10pts Class Declaration -10pts Class Implementation) (Hint: A smaller subset of such specifications will be required for the actual Finals) For the first part of this program you are required to implement a Book class, which will has to adhere by these specifications: Each Book should have the members (all privatej: e mtitle: a Cstring pointer-not array representing the book title. . mcover a Cover class obiec which represents the book cover e mclient: a Client class const pointer, the person (renter) who currently has the book in their possession. If the book is not rented out to someone this pointer should be NULL Hint Remember const pointer means the mclient variable can be assigned to pointed to different objects, but it cannot be used to modify the object it points to). . m_serial: a consan size_t number, representing a unique identifier for each Book object and the Book class will also have a private as well: count: a static size t, keeping track of the last greaest unique Book id (as generated via a constructor)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions