Question: I need the answer with toy as real time object Instructions Identify a real-world object such as car, house, toy, computer; or intangible things such

I need the answer with toy as real time objectI need the answer with toy as real time object Instructions Identifya real-world object such as car, house, toy, computer; or intangible thingssuch as profiles, events. Then, design a class which represents the categoryof that object. Finally, implement it in C++. Class requirements The name

Instructions Identify a real-world object such as car, house, toy, computer; or intangible things such as profiles, events. Then, design a class which represents the category of that object. Finally, implement it in C++. Class requirements The name of the class must be related to the category of the object such as car, house, toy, computer, event, profile, etc. The class must contain at least 3 attributes (member variables). These must be private. Each attribute must have at least one accessor and one mutator. These must be public. Accessors must have the const access modifier At least one mutator must have a business rule which limits the values stored in the attribute. Examples: a) The attribute can only store positive numbers. b) The attribute can only store a set of values such as "True", "False", "NA". c) The maximum value for the attribute is 100. The class must have at least 2 constructors. The class must have one destructor. The destructor will display "An X object has been removed from memory." where X is the name of the class. Additional private and public member functions can be implemented if needed in the class. Implementation Create h and cpp files to implement the design of the class. Format In a PDF file, present the description of the class. The description must be a paragraph with 50-250 words which explains the class idea or concept. Also, in this document, define the class using a UML diagram. In a h file, present the header of the class. In a cpp file, present the source file of the class. Submission Submit the pdf, cpp, and h files. Example of expected submission GroupCohesiveness.pdf This class design is related to a survey of group cohesiveness where a person (or group of persons) answers 4 questions using a 1-5 Likert scale. The average of the answers is considered the value of group cohesiveness. Group Cohesiveness -answero: int -answer1: int -answer2:int -answer 3: int +setAnswer(int a): void +setAnswer1(int a): void +setAnswer2(int a): void + setAnswer3(int a): void +getAnswerol) const: int +getAnswer1() const: int +getAnswer2) const: int +getAnswer3() const: int +getGroupCohesiveness() const: float GroupCohesiveness() GroupCohesiveness(int a, int a1, int a2, int a3) -GroupCohesiveness) GroupCohesiveness.h #include class GroupCohesiveness { private: int answere, answeri, answer2, answers; public: void setAnswere(int a); ve void setAnswer1(int a); vo void setAnswer2(int a); void setAnswer(int a); int getAnswer() const; ut Set Aneu const const; int getAnswer3() const; float getGroupCohesiveness() const; GroupCohesiveness(); GroupCohesiveness(int ab, int al, int az, int a3); GroupCohesiveness(); }; GroupCohesiveness.cpp #include "GroupCohesivness.h" void GroupCohesivness::setAnswer(int a) { if (a>=1 && a=1 && a=1 && a=1 && a

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!