DATA MINING TUTORIAL
64 Posts
NUMBER SYSTEM
274 Posts
POLITICS
120 Posts
JAVASCRIPT INTERVIEW QUESTIONS
59 Posts
Can’t find an answer?
Ask us to get the answer
- This forum has 0 topics, and was last updated 1 year ago by .
Define a class Student with the following specification: private members:
roll_no | integer |
name | 20 characters |
class | 8 characters |
marks[5] | integer |
percentage | float |
Calculate() function that calculates overall percentage of marks and returns the percentage of marks.
public members:
Readmarks() a function that reads marks and invokes the calculate functio Displaymarks() a function that prints the marks.
Define a class worker with the following specification: Private members of class worker
wname | 25 characters |
hrwrk | float (hors worked and wagerate per hour |
totwage | float(hrwrk*wgrate) |
calcwg | A fuction to find hrerk* wgrate with float return type |
Public members of class worker
in_data() | a function to accept values for wno, wname, hrwrk, wgrate and invoke calcwg() to calculate totwage. |
out_data() | a function to display all the data members on the screen you should give definations of functions |
Considering the following specifications:
Structure name | Data | Type | Size |
Name | first | array of characters | 60 |
mid | array of characters | 40 | |
last | array of characters | 60 | |
phone | area | array of characters | 4 |
exch | array of characters | 4 | |
numb | array of characters | 6 |
class name | Date | Type |
p-rec | name | Name |
phone | Phone |
with member functions constructors and display_rec.
(i) Declare structures in C++ for Name and Phone.
(ii) Declare a class for P_rec.
(iii) Define the constructor (outside the class P_rec) that gathers information from the user for the above two structures Name and Phone.
(iv) Define the display_rec (outside the class P_rec) that shows the current values.
- You must be logged in to create new topics.