This is C++. For the following file ( Student.csv), output a tabular style repor
ID: 3805913 • Letter: T
Question
This is C++. For the following file ( Student.csv), output a tabular style report student to standard output. Include in your report the appropriate headers for each column. You may assume that the report will print in portrait mode on a standard 8.5 x 11 sheet of paper. Center the titles in each header. Left justify the data in each column with the exception of the floating point columns which are right justified. Floating point numbers should be displayed to two decimal places. The data should fit on in the portrait format. (Index, student’s name, student id, address, city, state, postcode, percentage)
Student.csv
1,cristiano,333-432,add1,city1,state1,123456,87.65
2,messi,376-42l,add2,city2,state2,654321,77.43
3,kaka,365-80l,add3,city3,state3,876321,91.33
Explanation / Answer
#include #include #include #include class student { int id; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; string address; string city; string state; int postcode; void calculate(); public: void getdata(); //function to accept data from user void showdata(); //function to show data on screen void show_tabular(); }; void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; } void student::getdata() { coutrollno; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.