Home / Expert Answers / Computer Science / write-code-in-c-consider-the-class-called-student-which-models-the-following-states-and-behaviors-pa975

(Solved): WRITE CODE IN C++ Consider the class called student which models the following states and behaviors ...



Consider the class called student which models the following states and behaviors of a student:
- States:
Name, Roll Number,WRITE CODE IN C++

Consider the class called student which models the following states and behaviors of a student: - States: Name, Roll Number, Marks, Grade - Behaviors: 1. Read_data() 2. Display grade () 3. Compute_grade () - Perform the following operations: Create an object of student type and reads its data. Write the object onto a file (say "student.dat"). Read the object from the file. Display the data onto the screen. Hint: ofstream Myfile; Myfile . open ("student.dat", ios::app); Myfile.write((char*)this, sizeof(* this)); Myfile.close();


We have an Answer from Expert

View Expert Answer

Expert Answer


#include #include #include using namespace std;// Class definition for Studentclass Student{private: // States or member variables of the class
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe