Object Oriented System Development 2016

May 30, 2017 | Autor: K. Wijeweera | Categoria: Programming Languages, Object Oriented Programming, Education
Share Embed


Descrição do Produto

Kasun Ranga Wijeweera ([email protected])

UNIVERSITY OF RUHUNA BACHELOR OF SCIENCE (GENERAL) DEGREE LEVEL II (SEMESTER I) EXAMINATION – JULY 2016 COM212β – Object Oriented System Development

Duration: 2 hours

______________________________________________________________________________ Answer four questions only 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. c) Briefly explain the difference between aggregation and composition relationships. d) You are asked to design software to manipulate graphics objects. Draw the corresponding class diagram based on the following details. i. ii. iii. iv. v. vi. vii.

A polygon is a collection of line segments. A line segment is created by using two points which represent its end points. Line segments can exist without being its end points attached to a polygon. Points do not exist without being attached to a line segment. There are two special types of polygons: simple and convex. The convex polygon is a special case of simple polygon. You do not have to show attributes or methods.

2) a) What is meant by the default constructor of a class? b) What is meant by driver class? 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 Internal student External student Part-time student

Quiz exam marks 0% 40% 40%

Assignment marks 0% 0% 10%

End exam marks 100% 60% 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. b) Write the suggested sequence of activities in designing a class diagram. 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? b) Briefly explain inclusion, extension and generalization relationships between use cases in use case diagrams. c) Write three benefits of writing use cases in software development process. 2

Kasun Ranga Wijeweera ([email protected])

d) Consider the following scenario: 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. Draw use case diagram for the above scenario. 5) a) Briefly explain the three basic notations used for modeling concurrency between activities in activity diagrams. b) Write the four development phases of the rational unified process. c) Write two possible situations where an interface (interface class) should be created instead of a super class. d) Consider the following scenario: 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).

3

Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.