Friday, 30 August 2013

What kind of things can become objects in OOP?

When we start programming in OOP(Object Oriented Programming) the things which have some attributes and have some functions will become objects.Here is a example to check that what will become a object:-

Example :-

       Let say you are going to develop a software for the School to take attendance on computers ,so you will start programming in object oriented .You will analyse that in attendance what are the things which have attributes and some functionality.These things will come in your mind like Student,Teacher,Register etc.
    You will analyse that when attendance is taken the teacher take the attendance ,student speak that I am present and register is used to mark the attendance.





So the Program will have following things:-


class Student
{
     string  sName ;
     int      sRollNo;

}
class Teacher
{
      string TeacherName;
}

class Register
{
        Student   StudentList[20];
}