You are on page 1of 8

COMSATS University Islamabad, Lahore Campus

Terminal Lab- Answer Sheet – Semester Spring 2021


Course Credit
Course Title: Object Oriented Software Engineering (Lab) CSE304 3(2,1)
Code: Hours:
Course Yella Mehroze Programme BSE
Semester: 4th Batch: FA19 - BSE Section: A,B Date: June 14, 2021
Time Allowed: 3 Hrs Maximum Marks: 50
Student’s Name: Ali Raza Reg. No. FA19-BSE-099

Important Instructions / Guidelines:


 Attempt all questions
 Switch off your mobile phones
 Download the solution format document and solve your paper in according to the template given in that
document
 Upload the answer sheet (Solution format.docx (MS Word document)) on Google class room
 Only 1 document should be uploaded
 Rename the solution format document with your roll number and section (e.g fa19-bse-001-A)
 Turn in the document once it has been uploaded successfully
 Your presence in the Google Meeting is mandatory throughout the examination
 Your videos must remain ON

Total Obtained Marks [ / 50]

Question 1[Marks 5] Obtained Marks [ / 5]

Answer:

Description goes here Example goes here Obtained Marks


[ / 5]

Java Package  Only contain classes There are many built-in packages / 2.5
 Need UML package to such as java, lang, awt, javax,
represent itself. swing, net, io, util, sql etc.

UML Package  A package in the A package of use cases inside have / 2.5
Unified Modeling nested use case packages and java
Language is used "to packages.
group elements, and to
provide a namespace for
the grouped elements".
 A package may contain
other packages classes,
other packages, use
cases, and so on..
 Provide hierarchical
organization of
packages

Question 2 [Marks 12] Obtained Marks [ / 12]

Question 2-Part – I [Marks 6]


Constraint Conversion into OCL Obtained Marks

The buyers of a prize bond Context Prize bond [ / 6]


have at least one win
situation. Inv : minwin > = 1

Question 2-Part – II [Marks 6]


Constraint Conversion into OCL Obtained Marks

Number of edges in a context Triangle inv : [ / 6]


triangle are always equal to
three. Edge-> Number() = 3

Question 3 [Marks 10] Obtained Marks [ / 10]

[COMPONENT DIAGRAM]

Answer
Question 4[Marks 8] Obtained Marks [ / 8 ]

Answer

Identification of Design pattern (Pattern name goes here) Obtained Marks

Singleton Pattern [ / 3]
JAVA CODE Obtained Marks [ /5]

PASTING JAVA CODE FILES

Classes:

SingletonPattern

BiometricAttendance

public class SingletonPattern {

public static void main(String[] args) {

BiometricAttendance object = BiometricAttendance.getInstance();

object.setEmployee("Instance Created Successfully");

object.showMessage();

class BiometricAttendance

private static BiometricAttendance biometric;

private String Employee;

private BiometricAttendance()

}
public static BiometricAttendance getInstance()

if(biometric==null)

biometric= new BiometricAttendance();

return biometric;

public void showMessage(){

System.out.printf("Roll No : FA19-BSE-099 %s" ,getEmployee());

public void setEmployee(String Employee)

this.Employee = Employee;

public String getEmployee()

return Employee;

OUTPUT
Question 5 [Marks 15] Obtained Marks [ /
15 ]

State Transition Table Obtained Marks [ / 7 ]


State Valid Invalid

Loan issuing scheme Apply for the loan ----------

Apply for loan Receive Application Not Receive Application

Received Application HOD sign it Loan issuing scheme

sign it Confirmed Application Not Confirmed Application

Confirmed Application Check credit card balance ----------

Check credit card balance Limit less than 50,000 Limit greater than 50,000

Limit less than 50,000 Approved Apply Again

Apply again Apply for loan =====

State Machine Diagram


Obtained Marks [ / 7 ]

You might also like