Object Oriented System Development 2016
Object Oriented System Development 2016
com)
UNIVERSITY OF RUHUNA
1)
a) What is the difference between a class and an object in object oriented system
development?
b) State the four fundamental principles of object oriented design. Briefly explain each
of them.
d) You are asked to design software to manipulate graphics objects. Draw the
corresponding class diagram based on the following details.
2)
c) There are three types of students in an educational institute. They are internal
students, external students and part-time students. Three methods are used to evaluate
a course offered by the institute. They are quiz exam, assignment and end exam. The
final marks of internal students should be calculated only from the end exam. For the
external students, the final marks are calculated from both the end exam and the quiz
1
Kasun Ranga Wijeweera ([email protected])
exam. The final marks of the part-time students are calculated from the end exam, the
quiz exam and the assignment. The students of the institute have unique identification
numbers. Draw a class diagram with only three classes to model this scenario. Show
only the attributes of the classes.
d) Write java programming code to implement the class diagram you have drawn in (2)
(c). You should include a suitable method in each class to compute final marks of the
students. The final marks are calculated as shown in the following table. If the end
exam mark of an internal student is between 39 and 40 then his or her final mark is
considered as 40. The final marks of different student groups should be calculated by
using method overriding.
Student group Quiz exam marks Assignment marks End exam marks
Internal student 0% 0% 100%
External student 40% 0% 60%
Part-time student 40% 10% 50%
3)
a) What is Unified Modeling Language? State three types of UML diagrams used in
system development processes and briefly explain each of them.
c) The students of a university can register for any number of courses. There may be
several students following a particular course. The grade obtained by each student for
each course need to be stored. Draw a suitable class diagram for this scenario using
association class concept. You do not have to show attributes and methods.
d) Write java code fragment to implement the class diagram given below. The class
Course is responsible for enrolling students to the course. Assume that the class
Student records name of each student. Use only the required attributes and methods.
Course 1 * Student
4)
a) What is a use case?
2
Kasun Ranga Wijeweera ([email protected])
The bank of Ceylon has many ATM branches all over the island. The customers of the
bank use these machines mainly for withdrawing money. Further they can transfer
money from one account to another using these machines. Also they can deposit any
amount of money into their accounts. The customers can contact a banking assistant
through the system if any error occurred during a transaction. The ATM can be filled
only by cashier. The system should authenticate the users before they are allowed to
use it for the transactions mentioned above.
5)
a) Briefly explain the three basic notations used for modeling concurrency between
activities in activity diagrams.
c) Write two possible situations where an interface (interface class) should be created
instead of a super class.
The patients are admitted to the hospital depending on the availability of the beds.
When a patient arrives, the receptionist first checks whether a bed is available and if
so it will be allocated for the patient. The patient has to provide a new date if a bed is
not available and again the new date will be checked for availability by the
receptionist. After the bed is allocated, the details should be provided to the patient
and the information of the ward should be updated.
Draw an UML activity diagram for the above scenario showing swim lanes
(partitions).