Wednesday, March 10, 2010

Thinking about the “Faculty of Applied Sciences”.

Activity

1. Try to identify different objects in this faculty. Clearly describe the states and behaviors of each object.

2. Can you group them in to classes according to the common states and behaviors?

3. Try to identify the Inheritance of above mentioned classes and try to show the inheritance relationship?

4. Try to identify polymorphic behavior of defined inheritance relationship in the previous step?

Observation

As you do, you'll notice that real-world objects vary in complexity; your desktop lamp may have only two possible states (on and off) and two possible behaviors (turn on, turn off), but your desktop radio might have additional states (on, off, current volume, current station) and behavior (turn on, turn off, increase volume, decrease volume, seek, scan, and tune). You may also notice that some objects, in turn, will also contain other objects. These real-world observations all translate into the world of object-oriented programming.


Write your Ideas .......


3 comments:

  1. Faculty of Applied Sciences

    Supper class : Applied Science
    Sub classes :Staff, Student
    • The staff is a supper class for academic staff and non academic staff.
    • The student is a supper class for 1st, 2nd, 3rd, 4th year student.
    • Student 1,student2,student3….etc are objects of 1st,2nd,3rd,4th year student
    • Professor, Senior Lecturer, Junior Lecturer, Demonstrator, Tutor, Lad assistance are objects for academic staff.
    • Clark, Technical Operator, Security member, cleaning service members objects for Nonacademic staff.
    • Name, Age, Gender, Experience, salary, duty are state of staff and GetAge,GetGender,GetExperience,GetSalary,GetDuty are behaviors of staff.
    • State and Behaviors of Academic Staff:
    Name,Age,Gender,Degree,Experience,Teaching Method,Salary,Duty are state of academic staff. GetName,GetAge,GetGender,GetExperience,GetTeachingMethod,GetSalary,GetDegree,GetDuty are behaviors of academic staff.
    • State and Behaviors of Nonacademic Staff:
    Name,Age,Gender, Experience,Salary,Duty,Laboratory are state of Nonacademic staff. GetName,GetAge,GetGender,GetExperience GetSalary,GetDuty,GetLaboratory are behaviors of Nonacademic staff.
    • State and Behaviors of Student:
    Name,Age,Gender, Reg.No,Year,Course,Oriantation,Programme are state of student.GetName,GetAge,Getgender,GetReg.No,GetYear,GetCourse,GetOriantation,Getprogramme are Behaviors of Student.
    • Common State and Behaviors of Academic Staff:
    Experience,Teaching Method,Salary,Duty are state of Acaademic staff. GetExperience,GetTeachingMethod,GetSalary,GetDegree,GetDuty are behaviors of academic staff.
    • Common State and Behaviors of NonAcademic Staff:
    Experience,Salary,Duty are state of Nonacademic staff.GetExperience,GetSalary,GetDuty are behaviors of Nonacademic staff.
    • Common State and Behaviors of Student:
    Reg.No,Year,Course are state of student. GetReg.No,GetYear,GetCourse are Behaviors of Student.
    • Inheritance of Academic staff,Nonacademic staff & Student: Name,Age,Gender,GetName,GetAge,GetGender,GetData,SetData
    • Polymorphic behavior:
    Academic Staff: Don’t consider the Over Time
    Non Academic Staff: Consider Over T Time
    Student: Have a constant prices


    Created By 9 Vision Group Members

    ReplyDelete
  2. Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages). Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication. Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation — a fundamental principle of object-oriented programming.

    ReplyDelete