Question
Q1) Define a class student with the following specification Private members of class student admno integer ( admission number or idnumber of student) sname string
Q1) Define a class student with the following specification Private members of class student admno integer ( admission number or idnumber of student) sname string (student name) eng. math, science float variables to store scroes in english, math and science ( out of 100) total float ctotal() a function to calculate eng + math + science with float return type. Public member function of class student Takedata() Function to accept values for admno, sname, eng, science, math scores and invoke ctotal() to calculate total. Showdata() Function to display all the data members on the screen.
Implement the class functions and write a program to test it. Turn in the .h and .cpp file for Q1
Q2) Page 731from D. S. Malik - C++ Programming Program Design 2015, Q5 & Q6. ( Q5 - you create the class and Q6 - you implement the functions of the class and create a program to test it. Combine both the questions in one - so you will turn in a datType.h and a .cpp file). Turn in the .cpp and .h file for Q2.
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