Answered step by step
Verified Expert Solution
Question
1 Approved Answer
// // main.cpp //struct homework #include #include using namespace std; struct book { string title; string author; string numPages; }; int main () { cout
//
// main.cpp
//struct homework
#include
#include
using namespace std;
struct book
{
string title;
string author;
string numPages;
};
int main ()
{
cout
cout
cout
cout
book novel;
novel.title = "Beginning of the END";
novel.author = "John Hagee";
novel.numPages = "196";
cout
cin.get();
return 0;
}
that's my struct.
how do I transform my struct into class
code need to be in c++
Data Structures Class Homework - Due date: 28 Feb Transform your Struct into a Class Your class must have at least: one setter for each field one getter for each field two fields (variables) Crate an instance of your class and demonstrate its featuresStep 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