Saturday, July 26, 2014

Board Exam Phobia

Board Exam Phobia
We in Nepal have given more importance to the Board Examinations than is actually necessary. The Board exams has become almost the first indicator of education. Obviously, a huge fear and anxiety is associated with the Board exams. Because of our social schooling, we have a propensity to judge a student on the basis of the grades he or she secures in the examination but not on the basis of his or her competency.
In the process of moving up from school to bachelors, one has likely accumulated lots of experience of appearing in examinations. Students are usually frightened, intimidated and even terrorised by the words like ‘terminal examinations’ and ‘final examinations’ in one way or the other. There is tough and sometimes cut-throat competition at present in the education sector. Different colleges and students prepare for the Board Exams differently. The expectations of parents, the student’s own ambition and norms of the society open up different paths of progress, but at the same time, that may create huge tension and contradictions. Psychologically, exam-phobia is such a problem that affects the tender mind of the youth both physically and mentally. Students who have set goals to do well in the Board Exam work hard months-long. But examination time brings about the feelings of fear, tension, anxiety and uncertainty. Students often lose their appetite and suffer from other problems like insomnia, headache, fatigue and fever. Anxiety actually makes the filter that is inside our brain, in between the receiving and production areas, more active in blocking the channels between star shaped cells and pyramid shaped cells. As a result, the students’ memory power may become even weaker.
Many students become the victim of depression when they do not score high marks in the examination in spite of their hard work. Our social structure and schooling is such that one is considered to be an intelligent or a dull student on the basis of the marks one obtains in examinations. This mounts a huge pressure on students. Examinations thus become a factor of intense fear for the students and not a means to evaluate what they've learnt.
To combat Exam phobia, first of all, it is essential to control the fear of examinations. No external factor can help the students in this respect. How can one control this fear? The best way to do it is through preparation. If one is well prepared and confident, then worries and anxiety will take up less room in the mind. A balanced and nutritious diet is also really important. An empty stomach only fuels fear and anxiety. Food rich in iron and protein (amala, chana- gram, raharko daal, dry fruits, including almonds) should be included in the diet as they are considered ‘brain foods’. A glass of cold water after every hour of study can act as a quick refreshing agent. Recently, it has been proved scientifically that water can be regarded as brain food too.
Self confidence is the main key to success in life. That also goes for examinations. Now the question arises: how can one build up self confidence? As far as concerned, the best and the only way to gain self-confidence is to study the curriculum deeply and fully by strictly following a timetable set by the students themselves. A through understanding of the entire curriculum will go much further in giving students the confidence boost they need. Otherwise, they will forever be worrying about whether the questions in the question collection will appear in the actual examination or not.
Once one actually makes it to the exam hall then how do you solve the problems and answer the questions? This is a million dollar question. Prior to writing answers students should properly understand the questions first. Reading all the questions with a cool mind (perhaps take several long breaths from the nose) is very important so you know what it is exactly you are being asked to. Another really important thing is always to start with questions that are easy or which the student feels comfortable answering. Trying to tackle the hard ones first means that there might not be enough time at the end to answer the easy ones or that all the mental energy is already spent trying to answer the long and hard questions first.
Board exams are not that difficult. It is simply an exam and the sooner students can internalise this, the better they are likely to perform in it.
Author: Hem Rai, originally written for SLC exam.
Source: Ekantipur

Thursday, July 17, 2014

C++ LAB ASSIGNMENT-5 (inheritance and polymorphism)

1.       Design a class student with data members roll, name and age. Use three arguments constructor to initialize student object, and also use member function to read and display student detail.
Also design a class foreignstudent that inherits student with its own data member country. Use member function to display detail of foreign student.
Write a main program to test above implementation.

#include<iostream>#include<cstring>#include<conio.h>using namespace std;

class Student{ protected:  int roll;  char name[40];  int age; public:  Student(){}  Student(int r,char *n, int a)  {   roll=r;   strcpy(name,n);   age=a;  }  void read_data()  {   cout<<"Roll = ";cin>>roll;   cout<<"Name = ";cin>>name;   cout<<"Age = ";cin>>age;  }  void put_data()  {   cout<<"Roll = "<<roll<<endl;   cout<<"Name = "<<name<<endl;   cout<<"Age = "<<age<<endl;  }};class Foreignstudent:public Student{ private:  char country[40]; public:  Foreignstudent():Student(){}  Foreignstudent(int r,char *n,int a, char *c):Student(r,n,a)  {   strcpy(country,c);  }  void read_data()  {   Student::read_data();   cout<<"Country = ";   cin>>ws;   cin.getline(country,40);  }  void put_data()  {   Student::put_data();   cout<<"Country = "<<country<<endl;  }};int main(){ Foreignstudent fs1(101,"Prashant",22,"Nepal"); Foreignstudent fs2; cout<<"Enter detail of Foreignstudent fs2:\n"; fs2.read_data(); cout<<endl<<endl<<"================================="<<endl; cout<<"Details of students are"<<endl; cout<<"================================="<<endl; fs1.put_data(); cout<<"================================="<<endl; fs2.put_data(); cout<<"================================="<<endl; getch(); return 0;}

2.       Design a program as specified below:
                                 i.            Design a class student with data members roll and name, and two member function to read and display data members.
                               ii.            Derive a class Exam from student with its own data members to stores marks in three subjects and member function to read and display marks.
                              iii.            Design a third class result that inherits class Exam, with its own data member total  and member function display() to display roll, name, marks and total..


#include<iostream>
#include<conio.h>
#include<cstring>
using namespace std;
class Student
{
protected:
int roll;
string name;
public:
void getdata()
{
cout<<"Roll=";cin>>roll;
cout<<"Name=";cin>>name;
}
void putdata()
{
cout<<"Roll= "<<roll<<endl;
cout<<"Name= "<<name<<endl;
}
};
class Exam: public Student
{
protected:
int oop;
int os;
int nm;
public:
void getmark()
{
cout<<"Enter marks in OOP:";cin>>oop;
cout<<"Enter marks in OS:";cin>>os;
cout<<"Enter marks in NM:";cin>>nm;
}
void putmark()
{
cout<<"Marks in OOP="<<oop<<endl;
cout<<"Marks in OS="<<os<<endl;
cout<<"Marks in NM="<<nm<<endl;
}
};
class Result: public Exam
{
private:
int total;
public:
void display()
{
total=oop+os+nm;
putdata();
putmark();
cout<<"Total Marks="<<total<<endl;
}
};
int main()
{
Result stu1;
cout<<"Enter details of stu1:"<<endl<<endl;
stu1.getdata();
stu1.getmark();
cout<<"\n\nDetails of stu1"<<endl;
cout<<"_______________"<<endl<<endl;
stu1.display();
getch();
return 0;
}



3.       Write a program as specified as below:
                                                         i.            Design a class staff with data member staff_id and level, and member function to read display detail of staff.
                                                       ii.            Also design another class teacher with data members teacher_id, subject and member function to read and display detail of teacher.
                                                      iii.            Again design another class coordinator that inherits teacher and staff with own data member program. Use member function to read and display detail of coordinator.
Design a main program to test above design.


#include<iostream>#include<conio.h>using namespace std;
class staff{ protected: int staff_id; int level; public: void get_staff_data() { cout<<"Staff ID=";cin>>staff_id; cout<<"Level=";cin>>level; } void put_staff_data() { cout<<"staff ID="<<staff_id<<endl; cout<<"Level="<<level<<endl; }};class teacher{ protected: int teacher_id; char subject[40]; public: void get_teacher_data() { cout<<"Teacher ID=";cin>>teacher_id; cout<<"Subject=";cin>>subject; } void put_teacher_data() { cout<<"Teacher ID="<<teacher_id<<endl; cout<<"Subject="<<subject<<endl; }};class coordinator:public staff,public teacher{ private: char program[40]; public: void get_coordinator_data() { get_staff_data(); get_teacher_data(); cout<<"Program=";cin>>program; } void put_coordinator_data() { put_staff_data(); put_teacher_data(); cout<<"Program="<<program<<endl; }};
int main(){ coordinator c; cout<<"Enter details of coordinator"<<endl; c.get_coordinator_data(); cout<<"\nDetails of coordinator\n_____________________\n"<<endl; c.put_coordinator_data(); getch(); return 0;}

4.       Write a program as specified below:
                                 i.            Design a class student with data members roll and name, and two member function to read and display data members.
                               ii.            Derive a class Exam from student with its own data members to stores marks in three subjects and member function to read and display marks.
                              iii.            Derive another class sport from student with its own data member score in sport and function to read and display score.
                             iv.            Design another class result from exam and sport, with its own data member total and average, and member function compute() to compute total and average and display() to display detail.



//multipath inheritance
#include<iostream>
#include<conio.h>
using namespace std;
class student
{
private:
int roll_no;
char name[20];
public:
void getdata()
{
cout<<"Roll N0.= ";cin>>roll_no;
cout<<"Name= ";cin>>name;
}
void putdata()
{
cout<<"Roll N0.= "<<roll_no<<endl;
cout<<"Name= "<<name<<endl;
}
};
class exam:virtual public student
{
protected:
double sub1,sub2,sub3;
public:
void getmark()
{
cout<<"Mark in sub1= ";cin>>sub1;
cout<<"Mark in sub2= ";cin>>sub2;
cout<<"Mark in sub3= ";cin>>sub3;
}
void putmark()
{
cout<<"Mark in sub1= "<<sub1<<endl;
cout<<"Mark in sub2= "<<sub2<<endl;
cout<<"Mark in sub3= "<<sub3<<endl;
}
};
class sport:virtual public student
{
protected:
double sport_score;
public:
void getscore()
{
cout<<"Score in Sport= ";cin>>sport_score;
}
void putscore()
{
cout<<"Score in Sport= "<<sport_score<<endl;
}
};
class result:public exam,public sport
{
private:
double total,avg;
public:
void compute()
{
total=sub1+sub2+sub3+sport_score;
avg=total/4;
}
void display()
{
        putdata();
putmark();
        putscore();
        cout<<"Total= "<<total<<endl;
cout<<"Average= "<<avg<<endl;
}
};
int main()
{
result r;
cout<<"Enter details of a student"<<endl<<endl;
r.getdata();
r.getmark();
r.getscore();
r.compute();
cout<<"\nDetail of result r is :\n";
cout<<"________________________\n";
r.display();
getch();
return 0;
}



5.       Design a class employee with data members id and name, and member functions getdata() and putdata() to read and display data members. Design another class company with data members company_id, company_name and employee and member function getdata() and putdata() to read and display detail of company. Write a main program in C++ to test above design.


#include<iostream>
#include<conio.h>
using namespace std;
class Employee
{
private:
int employee_id;
char employee_name[40];
public:
void getdata()
{
cout<<"Employee ID= ";cin>>employee_id;
cout<<"Employee Name= ";cin>>employee_name;
}
void putdata()
{
cout<<"ID= "<<employee_id<<endl;
cout<<"Name= "<<employee_name<<endl;
}
};
class Company
{
private:
int company_id;
char company_name[40];
Employee E;
public:
void getdata()
{
cout<<"Company ID= ";cin>>company_id;
cout<<"Company Name= ";cin>>company_name;
E.getdata();
}
void putdata()
{
cout<<"Company ID= "<<company_id<<endl;
cout<<"Company Name= "<<company_name<<endl;
E.putdata();
} };
int main()
{
Company C;
cout<<"Enter Details of company C"<<endl<<endl;
C.getdata();
cout<<"\nDetails of company C\n____________________\n"<<endl;
C.putdata();
getch();
return 0;
}



6.      Imagine a publishing company that markets both book and audio cassette version of it works.  Create a class publication that stores the title and a price of a publication. From this class derive twp classes : book, which adds page count, and a tape, which adds a time in minutes. Each of these three classes should have a getdata() function to get its data from user at the keyboard, and putdata()  function to display its data.
In the base class these member functions have to be defined as virtual functions. Write a main program models the class hierarchy for the company and processes objects of these classes using pointers the base class.


#include<iostream>
#include<conio.h>
using namespace std;
class publication
{
protected:
char title[40];
float price;
public:
virtual void getdata()
{
cout<<"Title=";cin>>title;
cout<<"Price=";cin>>price;
}
virtual void putdata()
{
cout<<"Title="<<title<<endl;
cout<<"Price="<<price<<endl;
}
};
class book:public publication
{
private:
int page_count;
public:
void getdata()
{
cout<<"Page Count=";cin>>page_count;
}
void putdata()
{
cout<<"Page Count="<<page_count<<endl;
}
};
class tape:public publication
{
private:
int time;
public:
void getdata()
{
cout<<"Time in minutes=";cin>>time;
}
void putdata()
{
cout<<"Time in minutes="<<time<<endl;
}
};

int main()
{
book objB;
tape objT;
publication *ptr,objP;
cout<<"Enter Details of publication company"<<endl<<endl;
ptr=&objP;
ptr->getdata();
cout<<"\nEnter Details of the book"<<endl<<endl;
ptr=&objB;
ptr->getdata();
cout<<"\nEnter Details of the tape"<<endl<<endl;
ptr=&objT;
ptr->getdata();
cout<<"\nDetails of publication company\n==============================\n"<<endl;
ptr=&objP;
ptr->putdata();
cout<<"\nDetails of the book\n===================\n"<<endl;
ptr=&objB;
ptr->putdata();
cout<<"\nDetails of the tape\n===================\n"<<endl;
ptr=&objT;
ptr->putdata();
getch();
return 0;
}