Chapter 7: Data Handling Programming Questions Solutions


TYPE B: Short Answer Questions

Que.9.Write declaration for a class that holds properties of a branch. The class holds information like branch-number, area, number of employees, head and the operations associated like branch report printing, branch data modification, pending works reporting, forecasting reporting.

class Branch
{
 int branch_no;
 char area[20];
 int no_of_emp;
 char head[20];
 print( );
 modify( );
 pending( );
 forecast( );
}

Que.10. Write declaration for a structure that holds same information as that of the class mentioned in question 9.

struct Branch
{
 int branch_no;
 char area[20];
 int no_of_emp;
 char head[20];
 void print( );
 void modify( );
 void pending( );
 void forecast( );
}

Que.11. Write declaration for a structure that holds information of a student like roll no, name, class, marks and grade.

struct Student
{
 int roll_no;
 char name[15];
 int class;
 float marks;
char grade;
}

Que.12.Write declaration for a class that holds the information of Q.11. For associated operations, make suitable assumptions.

class Student
{
 int roll_no;
 char name[15];
 int class;
 float marks;
 char grade;
 void enter_details( );
 void display_details( );
}

Updating more...

Reviews for "Chapter 7: Data Handling Programming Questions Solutions"

Post a Comment