Question
C++ Write the definition for a class where you could be an object in the class. So your name would end up being a variable
C++
Write the definition for a class where you could be an object in the class. So your name would end up being a variable name if someone were to use this class. Your class must have at least 2 member variables and at least one member function with its corresponding definition.
The obvious example would be a student class, with member variables like gpa, and number of credits received. The member function could be a gpa calculator. You can't use this example.
You don't need to actually write an executable program, just write a class that someone else could use to write a program. You should try to imagine a program that would use your class while writing the class definition.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started