Question: // // 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

// // main.cpp //struct homework #include #include using namespace std; struct book

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 features

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!