Ooose
Ooose
(MCA- 164)
Practical File
Sr.
No. Problem Description Date Sign.
Q.1 Create a Use Case Diagram for a Digital Sound Recorder with the following main
features:
1. The recorder stores up to 10 messages
2. Each message is max. 2 minutes long
3. The user can record message
4. Recording of a message end after 2 minutes or when the user stops recording
5. Recording destroys the original message at chosen slot
6.Sufficient level of battery is checked before recording message
7. Message of a given slot can be replayed
8. Sufficient level of battery is checked before replaying message
9. Messages can be locked/unlocked
10. Locked messages cannot be deleted or over-written by recording to the same slot
User uses LCD display and buttons to interact with recorder.
Q.2 Formulate use case descriptions for 5 major use cases identified in the digital sound
recorder.
Q.3 As the head of Information Technology at Acme Airlines, you are tasked with building
a new booking system to replace the existing system. Acme needs a new system to
allow employees to book ticket electronically and check the status of the booked tickets.
The new system will be state of the art and will have a Windows-based desktop
interface to allow employees to enter booking details and view employee details. The
system will run on individual employee desktops throughout the entire company. For
reasons of security and auditing, employees can access only their data. The employees
would only be able to view their information, and for any changes they would have to
send an E-Mail to the administrator. Administrator would only have the right to make
any changes in the records. For the cost being a factor Acme wants to use their old
server with the existing database. The system will retain information on all employees
in the company. The administrator maintains employee information. He is responsible
for adding new employees, deleting employees and changing all employee information
such as name, address, and paycheck generation, as well as running administrative
reports.
Q.4 Consider the following use-case of a travel agency. Use-Case Name: Ticket Purchasing
Description:
1. The use-case begins when the customer calls the travel agency to ask it to issue a
ticket that (s)he has booked.
2. The travel agency operator asks the customer to give his/her booking number.
3. The customer gives the booking number.
4. The operator types in the booking number and the flight reservation system displays
the details of the reservation made.
5. The operator asks the customer to confirm the details of the reservation made.
6. The customer confirms the reservation made.
7. The operator asks the customer for a credit card number.
8. The customer gives his/her credit card number.
9. The operator types in the customer's credit card number and when the system confirms that
the credit card transaction has been authorized (s)he asks the system to print the tickets, the
details of the flights, and an invoice.
When the system confirms that the requested items have been printed, the operator
informs the customer that the tickets have been issued. Think of at least two alternative
courses of events for this use-case. Describe the alternative courses as separate use-
cases. Modify the description of the original use-case to make evident where exactly
these alternative use-cases may be called and under which conditions. Create a use-case
diagram to illustrate the relationships between the alternative use-cases and the use-case
10. given.
Q.5 Create a Class Diagram for a Digital Sound Recorder with the following main features:
1. The recorder stores up to 10 messages
2. Each message is max. 2 minutes long
3. The user can record message
4. Recording of a message end after 2 minutes or when the user stops recording
5. Recording destroys the original message at chosen slot
6. Sufficient level of battery is checked before recording message
7. Message of a given slot can be replayed
8. Sufficient level of battery is checked before replaying message
9. Messages can be locked/unlocked
10. Locked messages cannot be deleted or over-written by recording to the same slot
User uses LCD display and buttons to interact with recorder
Q.6 Forward engineer the model obtained in Q5 to automatically generate equivalent Java
stub Code?
Q.7 Purpose: Describe major services (functionality) provided by a hospital's reception.
Summary: Hospital Management System is a large system including several
subsystems or modules providing variety of functions.
Hospital Reception subsystem or module supports some of the many job duties of
hospital receptionist. Receptionist schedules patient's appointments and admission to
the hospital, collects information from patient upon patient's arrival and/or by phone.
For the patient that will stay in the hospital ("inpatient") she or he should have a bed
allotted in a ward. Receptionist may also receive and process patient’s payments, record
them and provide receipts. She also is responsible to file insurance claims and generate
medical reports.
a. Make the use case diagram
b. Provide description for at least 04 use cases
c. Make the class diagram
d. Generate Java stub code
e. Create Object Diagram
Q.8 Create an object diagram for a Digital Sound Recorder with the following main features:
1. The recorder stores up to 10 messages
2. Each message is max. 2 minutes long
3. The user can record message
4. Recording of a message end after 2 minutes or when the user stops recording
5. Recording destroys the original message at chosen slot
6. Sufficient level of battery is checked before recording message
7. Message of a given slot can be replayed
8. Sufficient level of battery is checked before replaying message
9. Messages can be locked/unlocked
10. Locked messages cannot be deleted or over-written by recording to the same slot User uses
LCD display and buttons to interact with recorder.
Q.9 Create a package diagram for the Digital Sound Recorder in AP1
Q.10 Create an activity diagram for record message use case of AP1?
Q.11 Create an activity diagram for any two use cases of Hospital Reception Subsystem in
CP1
Q.12 Create a sequence diagram for the playback message use case of AP1?
Q.13 Create a sequence diagram for any two use cases of Hospital Reception Subsystem in
CP1
Q.14 Create a state diagram for any two use cases of Hospital Reception Subsystem in CP1
Q.16 Create a communication diagram for the playback message use case of AP1?
Q.17 Create a communication diagram for any two use cases of Hospital Reception
Subsystem in CP1?
Q.18 Create a component diagram for the Hospital Reception Subsystem?
Q1. Create a Use Case Diagram for a Digital Sound Recorder with the following main features:
1) The recorder stores up to 10 messages
2) Each message is max. 2 minutes long
3) The user can record message
4) Recording of a message ends after 2 minutes or when the user stops recording
5) Recording destroys the original message at chosen slot
6) Sufficient level of battery is checked before recording message
7) Message of a given slot can be replayed
8) Sufficient level of battery is checked before replaying message
9) Messages can be locked/unlocked
10) Locked messages cannot be deleted or over-written by recording to the same slot • User uses LCD
display and buttons to interact with recorder
Q.2 Formulate use case descriptions for 5 major use cases identified in the digital sound recorder.
1. Check Battery: The digital sound recorder will check if it has appropriate battery level before allowing
the user to record a message
2. Record Message: The digital sound recorder will allow the user to record up to 10 messages,
provided the recorder's battery is above a certain threshold.
3. Replay Message: The digital sound recorder will allow the user to replay any message, provided its
battery is above a certain threshold
4. Stop Recording: The digital Sound Recorder will stop recording if the recording time extends 2 minutes.
5. Delete Message: The Digital Sound Recorder will allow the user to delete a message provided the
message is not locked and is unlocked
Q.3 As the head of Information Technology at Acme Airlines, you are tasked with building a new booking
system to replace the existing system. Acme needs a new system to allow employees to book ticket
electronically and check the status of the booked tickets. The new system will be state of the art and will have a
Windows-based desktop interface to allow employees to enter booking details and view employee details. The
system will run on individual employee desktops throughout the entire company. For reasons of security and
auditing, employees can access only their data. The employees would only be able to view their information,
and for any changes they would have to send an E-Mail to the administrator. Administrator would only have the
right to make any changes in the records. For the cost being a factor Acme wants to use their old server with the
existing database. The system will retain information on all employees in the company. The administrator
maintains employee information. He is responsible for adding new employees, deleting employees and
changing all employee information such as name, address, and paycheck generation, as well as running
administrative reports.
Q.4 Consider the following use-case of a travel agency. Use-Case Name: Ticket Purchasing Description:
1) The use-case begins when the customer calls the travel agency to ask it to issue a ticket that (s)he has
booked.
2) The travel agency operator asks the customer to give his/her booking number.
3) The customer gives the booking number.
4) The operator types in the booking number and the flight reservation system displays the details of the
reservation made.
5) The operator asks the customer to confirm the details of the reservation made.
6) The customer confirms the reservation made.
7) The operator asks the customer for a credit card number.
8) The customer gives his/her credit card number.
9) The operator types in the customer's credit card number and when the system confirms that the credit
card transaction has been authorised (s)he asks the system to print the tickets, the details of the flights,
and an invoice.
10) When the system confirms that the requested items have been printed, the operator informs the customer
that the tickets have been issued.
Q.5 Create a Use Case Diagram for a Digital Sound Recorder with the following main features:
1) The recorder stores up to 10 messages
2) Each message is max. 2 minutes long
3) The user can record message
4) Recording of a message ends after 2 minutes or when the user stops recording
5) Recording destroys the original message at chosen slot
6) Sufficient level of battery is checked before recording message
7) Message of a given slot can be replayed
8) Sufficient level of battery is checked before replaying message
9) Messages can be locked/unlocked
10) Locked messages cannot be deleted or over-written by recording to the same slot User uses LCD display
and buttons to interact with recorder
Q.6 Forward engineer the model obtained in Q5 to automatically generate equivalent Java stub Code?
DigitalSoundRecorder.java
import java.util.*;
/**
*
*/
public class DigitalSoundRecorder {
/**
* Default constructor
*/
public DigitalSoundRecorder() {
}
/**
*
*/
private int messageCount;
/**
*
*/
private int availableSlots;
/**
*
*/
private int recorderID;
/**
*
*/
private void recordMessage() {
// TODO implement here
}
/**
*
*/
private void deleteMessage() {
// TODO implement here
}
/**
* @param BID
* @return
*/
private int requestBatteryLevel(int BID) {
// TODO implement here
return 0;
}
/**
*
*/
private void replayMessage() {
// TODO implement here
}
Message.java
import java.util.*;
/**
*
*/
public class Message {
/**
* Default constructor
*/
public Message() {
}
/**
*
*/
private int length;
/**
*
*/
private boolean lock;
/**
*
*/
private int MID;
/**
*
*/
private String Title;
/**
*
*/
private String content;
/**
* @param MID
*/
private void lockMessage(int MID) {
// TODO implement here
}
/**
* @param MID
*/
private void unlockMessage(int MID) {
// TODO implement here
}
/**
* @param MID
* @return
*/
private int getLength(int MID) {
// TODO implement here
return 0;
}
Battery.java
import java.util.*;
/**
*
*/
public class Battery {
/**
* Default constructor
*/
public Battery() {
}
/**
*
*/
private int BID;
/**
*
*/
private int batteryLevel;
/**
*
*/
private String batteryType;
/**
*
*/
private int batteryCapacity;
/**
* @param recorderID
* @return
*/
private int sendBatteryLevel(int recorderID) {
// TODO implement here
return 0;
}
}
Q.7 Purpose: Describe major services (functionality) provided by a hospital's reception.
Summary: Hospital Management System is a large system including several subsystems or modules
providing variety of functions.
Hospital Reception subsystem or module supports some of the many job duties of hospital receptionist.
Receptionist schedules patient's appointments and admission to the hospital, collects information
from patient upon patient's arrival and/or by phone. For the patient that will stay in the hospital ("inpatient") she
or he should have a bed allotted in a ward. Receptionist may also receive and process patient’s payments, record
them and provide receipts. She also is responsible to file insurance claims and generate medical reports.
/**
*
*/
public class Hospital {
/**
* Default constructor
*/
public Hospital() {
}
/**
*
*/
private void HospitalName
String[1];
/**
*
*/
public void RegistrationNoint;
/**
*
*/
public void Attribute2;
/**
*
*/
public void addDepartment
void() {
// TODO implement here
}
}
//Department.java importjava.util.*; /**
**/
/**
*
*/
public String name;
}
//Staff.java importjava.util.*;
/**
*
*/
public class Staff extends Person {
/**
* Default constructor
*/
public Staff() {
}
/**
*
*/
public String reportingTime;
/**
* */
publicintworkExperience;
/**
* */
publicintnoofemployees;
/**
* @return
*/
public void addEmployee() { // TODO implement here return null;
}
/**
* @return
*/
public void removeEmployee() { // TODO implement here return null;
}
}
//Person.java importjava.util.*;
/**
*
*/
public class Person {
/**
* Default constructor
*/
public Person() {
}
/**
*
*/
public String name;
}
//Patient.java importjava.util.*;
/**
*
*/
public class Patient extends Person {
/**
* Default constructor
*/
public Patient() {
}
/**
*
*/
public date dateOfAppointment;
/**
* @return
*/
publicbooleanbookAppointment() { // TODO implement here return false;
}
}
//Inpatient.java importjava.util.*;
/**
*
*/
public class Inpatient extends Patient {
/**
* Default constructor
*/
public Inpatient() {
}
/**
* @return
*/
public void allocatebed() { // TODO implement here return null;
}
}
//Outpatient.java importjava.util.*;
/**
*
*/
public class Outpateint extends Patient {
/**
* Default constructor
*/
publicOutpateint() {
}
/**
*
*/
public date lastCheckUpDate;
}
//Doctor.java importjava.util.*;
/**
*
*/
public class Doctor extends Staff {
/**
* Default constructor
*/
public Doctor() {
}
/**
*
*/
public String specialization;
}
//Nurse.java
importjava.util.*;
/**
*
*/
public class Nurse extends Staff {
/**
* Default constructor
*/
public Nurse() {
}
/**
*
*/
public String nurseId;
}
//Admin Staff.java importjava.util.*;
/**
*
*/
public class Admin Staff extends Staff {
/**
* Default constructor
*/
public Admin Staff() {
}
/**
*
*/
public String designation;
}
//FrontDesk Staff.java importjava.util.*;
/**
*
*/
public class FrontDesk Staff extends Admin Staff {
/**
* Default constructor
*/
publicFrontDesk Staff() {
}
/**
*
*/
/**
*
*/
public class Receptionist extends FrontDesk Staff {
/**
* Default constructor
*/
public Receptionist() {
/**
* @return
*/
public void registerPatient() { // TODO implement here return null;
}
}
//Bed.java importjava.util.*;
/**
*
*/
public class Bed {
/**
* Default constructor
*/
public Bed() {
}
/**
*
*/
public String bedid;
/**
* @return
*/
publicbooleancheckStatus() { // TODO implement here return false;
}
/**
* @return
*/
publicintaddBed() {
// TODO implement here return 0;
}
/**
* @return
*/
public void deleteBed() {
// TODO implement here return null;
}
}
//Finance.java importjava.util.*;
/**
*
*/
public class Finance extends Staff {
/**
* Default constructor
*/
public Finance() {
}
/**
* @return
*/
public void generateExpenseReport() { // TODO implement here
return null;
}
/**
* @return
*/
public void managePatientPayments() { // TODO implement here return null;
}
/**
* @return
*/
public void maintainSalaryreports() { // TODO implement here return null;
}
}
//Payment.java importjava.util.*;
/**
*
*/
public class Payment {
/**
* Default constructor
*/
public Payment() {
}
/**
*
*/
public String transactionid;
/****/
public float amount;
}
Q10 Create an activity diagram for record message use case of AP1?
Q11 Create an activity diagram for any two use cases of Hospital Reception Subsystem in CP1
Q12 Create a sequence diagram for the playback message use case of AP1?
Q13 Create a sequence diagram for any two use cases of Hospital Reception Subsystem in CP1
Q.14 Create a state diagram for any two use cases of Hospital Reception Subsystem in CP1
Q.15 Create a state diagram for a
Q16. Create a communication diagram for the playback message use case of AP1? Diagram:
Q17. Create a communication diagram for any two use cases of Hospital Reception Subsystem in CP1?
Q 23.
Create a GANTT Chart on PowerPoint for the following