0% found this document useful (0 votes)
330 views27 pages

Chapter-1 Implementation of Use Case Diagram 1.1 Description

The document describes the implementation of a use case diagram for a car rental system. It includes 14 use cases such as login, registration, setting a rental period, reservation, and generating a bill. It also provides descriptions of the basic components of a use case diagram, including actors, use cases, and associations. Finally, it includes an example use case diagram for the car rental system with actors like a customer and use cases like checking availability and making a reservation.

Uploaded by

Ankit Chatterjee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views27 pages

Chapter-1 Implementation of Use Case Diagram 1.1 Description

The document describes the implementation of a use case diagram for a car rental system. It includes 14 use cases such as login, registration, setting a rental period, reservation, and generating a bill. It also provides descriptions of the basic components of a use case diagram, including actors, use cases, and associations. Finally, it includes an example use case diagram for the car rental system with actors like a customer and use cases like checking availability and making a reservation.

Uploaded by

Ankit Chatterjee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

​CHAPTER-1

IMPLEMENTATION OF USE CASE DIAGRAM

1.1 DESCRIPTION

The Car Rental System is used by the intended user or the administrator.

Actor name: Customer/Employee/Manager/Accountant/Insurance Company


Description: The actor must be able to enter the data and perform a reservation operation.
Package name: Car Rental System. It includes the following use cases.

Use Case Name: Login


Description: The customer needs to login before booking the car.

Use Case Name: Registration


Description: If the customer doesn’t have an account, he/she needs to create a new registration.

Use Case Name: Set Location


Description: The customer needs to set location before searching the car.

Use Case Name: Check Availability


Description: The Customer needs to check if the car is available or not.

Use Case Name: Set Rental Period


Description: The customer needs to set the rental period.

Use Case Name: Reservation


Description: If car is available the customer car do reservation.

Use Case Name: View Monthly Reports


Description: The manager of the company can view the monthly car Rental reports.

Use Case Name: Maintain Car Information


Description: The Employee can maintain the car information.

Use Case Name: View Daily Rental Report


Description: The Employee can view daily car rental reports.

1
Use Case Name: Generate Bill
Description: The Employee generates the bill when customer reserves a car.

Use Case Name: Verify Payment


Description: The Accountant will verify the payment of the customer.

Use Case Name: View Revenue


Description: The Accountant can view revenue of rented cars and calculates all the Profit and
Loss.

Use Case Name: Bill Payment


Description: The customer gets the bill after successful payment of car booking and the Insurance
Company also verifies it.

1.2 FUNCTIONALITIES

USE CASE DIAGRAM


Use Case diagrams identify the functionality provided by the system (use cases), the
users who interact with the system (actors), and the association between the users and the
functionality. Use Cases are used in the Analysis phase of software development to articulate the
high-level requirements of the system. The primary goals of Use Case diagrams include:

· Providing a high-level view of what the system does


· Identifying the users ("actors") of the system
· Determining areas needing human-computer interfaces.

GRAPHICAL NOTATION
The basic components of Use Case diagrams are the Actor, the Use Case, and The association.

ACTOR
An Actor, as mentioned, is a user of the system, and is depicted using a stick figure. The
role of the user is written beneath the icon. Actors are not limited to humans. If a system
communicates with another application, and expects input or delivers output, then that
application can also be considered an actor.

2
USE CASE –
A Use Case is functionality provided by the system, typically described as verb +object
(e.g. register Car, Delete User). Use Cases are depicted with an ellipse. The name of the use case
is written within the ellipse.

ASSOCIATION –
Associations are used to link Actors with Use Cases, and indicate that an Actor participates in
the Use Case in some form. Associations are depicted by a line connecting the Actor and the Use
Case.

The following image shows how these three basic elements work together to form a use case
diagram.

1.3 USE CASE DIAGRAM

Use case diagrams describe what a system does from the standpoint of an external observer. The
emphasis is on ​what a system does rather than ​how. Use case diagrams are helpful in three areas.
Determining features (requirements). New use cases often generate new requirements as the system is
analyzed and the design takes shape. Communicating with clients. Their notational simplicity makes
use case diagrams a good way for developers to communicate with clients. Generating test cases. The
collection of scenarios for a use case may suggest a suite of test cases for those scenarios.

3
Figure 1.1 USE CASE DIAGRAM

4
CHAPTER-2

IMPLEMENTATION OF CLASS DIAGRAM

2.1 DESCRIPTION

The Below diagram shows how a customer book Car easily. The customer selects the
cost of renting the car directly on the home page. After that they select the required car. After
they made the selection, they entered their details which directly goes to Car Rental Company’s
database. These details are used to book the car and print the bill. The Accountant also manages
all the reports and the payments that are being booked by the customers. The payment
verification will be verified by the administrator or the accountant then the insurance company
will also verify the payment made by the customer, and finally the selected car of customer will
be confirmed and booked. This class diagram will show all the relationships between them.

2.2 FUNCTIONALITIES

ASSOCIATION
A relationship between instances of the two classes. There is an association between two classes
if an instance of one class must know about the other in order to perform its work. In a diagram,
an association is a link connecting two classes.

AGGREGATION
An association in which one class belongs to a collection. An aggregation has a diamond
end pointing to the part containing the whole.

GENERALIZATION
An inheritance link indicating one class is a superclass of the other.

MULTIPLICITY
It is an association end is the number of possible instances of the class associated with a single
instance of the other end. Multiplicities are single numbers or ranges of numbers.

5
2.3 CLASS DIAGRAM

FIGURE 2.1 CLASS DIAGRAM

6
CHAPTER-3

IMPLEMENTATION OF INTERACTION DIAGRAM

3.1 DESCRIPTION

Interaction diagrams are also collaboration diagrams. They convey the same
information as sequence diagrams, but they focus on object roles instead of the times that
messages are sent. In a sequence diagram, object roles are the vertices and messages are the
connecting links. An Interaction diagram represents a collaboration, which is a set of objects
related to a particular context, and interaction, which is a set of objects within the
collaboration, to achieve a desired outcome.

3.2 FUNCTIONALITIES

Purpose of Interaction diagram-


● Model message passing between objects or roles that deliver the functionalities of use
cases and operations

● Model mechanisms within the architectural design of the system


● Capture interactions that show the past messages between objects and roles within the
collaboration scenario
● Model alternative scenarios within use cases or operations that involve the collaboration
of different objects and interactions
● Support the identification of objects, and their attributes (parameters of message) and
operations (messages) that participate in use cases.
● The connecting lines drawn between objects in a communication diagram are links.
● These links are what set communication diagrams apart from sequence diagrams. They
enable you to see the relationships between objects.
● Each link represents a relationship between objects and symbolizes the ability of objects
to send messages to each other.
● If an object sends messages to itself, the link carrying these messages is represented as a
loop icon. This loop can be seen on both the UI object and the Transaction object.

3.3 INTERACTION DIAGRAM

Messages in communication diagrams are shown as arrows pointing from the Client
object to the Supplier object. Typically, messages represent a client invoking an operation on a
supplier object. They can be modeled along with the objects in the following manner:

7
FIGURE 3.1 INTERACTION DIAGRAM

The above diagram shows how a customer book reservation for car easily and the customer
select the car and the rental period and Payment is done. If the details and payment are success,
car is reserved and bill is generated. It has six states each states are connecting to each other and
the connection is made between every state.

8
CHAPTER-4
IMPLEMENTATION OF STATE MACHINE DIAGRAMS

4.1 DESCRIPTION

The above diagram shows how a customer book car reservation easily and the customer
select the duration of rental or rental period directly in the home page. After that they select type
of car needed. After they made the selection they entered their detail which directly goes to car
Rental Company’s database. These details is used to book the car and print the bill.

4.2 FUNCTIONALITIES

Objects have behaviors and state. The state of an object depends on its current activity or
condition. SMD shows the possible states of the object and the transitions that cause a change in
state. States are rounded rectangles. Transitions are arrows from one state to another. Events or
conditions that trigger transitions are written beside the arrows. The initial state (black circle) is a
dummy to start the action. Final states are also dummy states that terminate the action.

State machine diagram is one of the five UML diagrams used to model dynamic nature of
a system. They define different states of an object during its lifetime. And these states are
changed by events. So State chart diagrams are useful to model reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.

State machine diagram describes the flow of control from one state to another state.
States are defined as a condition in which an object exists and it changes when some event is
triggered. So the most important purpose of State chart diagram is to model life time of an object
from creation to termination. State chart diagrams are also used for forward and reverse
engineering of a system. But the main purpose is to model reactive system.

9
Following are the main purposes of using State machine diagrams:
❖ To model dynamic aspects of a system.
❖ To model life time of a reactive system.
❖ To describe states of an object during its life time.
❖ Define a state machine to model states of an object.

4.3 STATE MACHINE DIAGRAM

FIGURE 4.1 STATE MACHINE DIAGRAM

10
CHAPTER-5
​IMPLEMENTATION OF ACTIVITY DIAGRAM

5.1 DESCRIPTION​:

Activity diagrams are used to document workflows in a system, from the business level
down to the operational level. When looking at an Activity diagram, you'll notice elements from
State diagrams. In fact, the Activity diagram is a variation of the state diagram where the "states"
represent operations, and the transitions represent the activities that happen when the operation is
complete.

The general purpose of Activity diagrams is to focus on flows driven by internal


processing vs. external events. The basic purposes of activity diagrams is similar to other four
diagrams.

It captures the dynamic behavior of the system. Other four diagrams are used to show the
message flow from one object to another but activity diagram is used to show message flow from
one activity to another.

Activity is a particular operation of the system. Activity diagrams are not only used for
visualizing the dynamic nature of a system, but they are also used to construct the executable
system by using forward and reverse engineering techniques.

The only missing thing in the activity diagram is the message part. It does not show any
message flow from one activity to another. Activity diagram is sometimes considered as the
flowchart. Although the diagrams look like a flowchart, they are not. It shows different flows
such as parallel, branched, concurrent, and single.

11
5.2 FUNCTIONALITIES:

ACTIVITY STATES –

Activity states mark an action by an object. The notations for these states are rounded
rectangles, the same notation as found in State chart diagrams.

TRANSITION –

​ hen an Activity State is completed, processing moves to another Activity State.


W
Transitions are used to mark this movement. Transitions are modeled using arrows.

SWIM LANE -

Swim lanes divide activities according to objects by arranging objects in column format
and placing activities by that object within that column. Objects are listed at the top of the
column, and vertical bars separate the columns to form the swim lanes.

12
INITIAL STATE -

The Initial State marks the entry point and the initial Activity State. The notation for the
Initial State is the same as in State chart diagrams, a solid circle. There can only be one Initial
State on a diagram.

FINAL STATE -

Final States mark the end of the modeled workflow. There can be multiple Final States
on a diagram, and these states are modeled using a solid circle surrounded by another circle.

SYNCHRONIZATION BAR –

Activities often can be done in parallel. To split processing ("fork"), or to resume


processing when multiple activities have been completed ("join"), Synchronization Bars are
used. These are modeled as solid rectangles, with multiple transitions going in and/or out.

5.3 ACTIVITY DIAGRAM

The below diagram shows that how a customer book a Car. If a person reserves car then
the user detail has to login or register by the customer, after successful login the user reserves the
car then the booking is confirmed and bill is prepared. If the payment failed then the booking
will be cancelled. It doesn’t do all the tasks randomly; it will do all the tasks step by step in a
proper way/method. It also shows if any car is not available which are selected by the customer,
so that the customer can select some other cars which are available and it is finally booked after
the successful payment made by the customer. It acts like a workflow which starts from initial
point to the end point and all the tasks are done properly in the activity diagram.

13
FIGURE 5.1 ACTIVITY DIAGRAM

14
CHAPTER-6

IMPLEMENTATION OF COMPONENT DIAGRAM

6.1 DESCRIPTION:

Component diagrams fall under the category of an implementation diagram, a kind of


diagram that models the implementation and deployment of the system. A Component
Diagram, in particular, is used to describe the dependencies between various software
components such as the dependency between executable files and source files. This
information is similar to that within make files, which describe source code dependencies and
can be used to properly compile an application. It is used in modeling the physical aspects of
OOS that are used for visualizing, specifying, and documenting component-based systems and
also for constructing executable systems through forward and reverse engineering. Component
diagrams are essentially class diagrams that focus on a system's components that often used to
model the static implementation view of a system.

6.2 FUNCTIONALITIES:

COMPONENT -

A component represents a software entity in a system. Examples include source code files,
programs, documents, and resource files. A component is represented using a rectangular box,
with two rectangles protruding from the left side, as seen in the image to the right.

DEPENDENCY -

A Dependency is used to model the relationship between two components. The notation for a
dependency relationship is a dotted arrow, pointing from a component to the component it
depends on.

15
6.3 COMPONENT DIAGRAM:

The below diagram shows how the customer booking details are stored in the database. The
details of car booking are entered by the user .After the detail has been entered it goes to the
Employee Administration database which can be used to book the car and print the bill.

FIGURE 6.1 COMPONENT DIAGRAM

16
CHAPTER-7
IMPLEMENTATION OF DEPLOYMENT DIAGRAM

7.1 DESCRIPTION:

Deployment diagrams show the physical configurations of software and hardware. These
diagrams are also used to make executable systems. The following deployment diagram shows
the relationships among software and hardware components involved in real estate transactions.
The physical hardware is made up of nodes.
Deployment diagrams are made up of several UML shapes. The three-dimensional
boxes, known as nodes, represent the basic software or hardware elements, or nodes, in the
system. Lines from node to node indicate relationships, and the smaller shapes contained within
the boxes represent the software artifacts that are deployed.

7.2 FUNCTIONALITIES:

Artifact:
A product developed by the software, symbolized by a rectangle with the name and the word
“artifact” enclosed by double arrows.

Association:
A line that indicates a message or other type of communication between nodes.

Component:
A rectangle with two tabs that indicates a software element.

Dependency:
A dashed line that ends in an arrow, which indicates that one node or component is dependent on
another.

Interface:
A circle that indicates a contractual relationship. Those objects that realize the interface must
complete some sort of obligation.

Node:
A hardware or software object, shown by a three-dimensional box.

17
Node as container:
A node that contains another node inside of it—such as in the example below, where the nodes
contain components.

Stereotype:
A device contained within the node, presented at the top of the node, with the name bracketed by
double arrows.

7.3 DEPLOYMENT DIAGRAM:

The above diagram shows how a customer book a car. The customer selects the required
car and rental period. The customer enters the details and book the car. The car is booked and
booking status is displayed and receipt is printed. The payment is a must and it is viewed by the
administrator, Insurance Company and Accountant. If the payment is failed then the booking and
the reservation of the car will be cancelled.

Client Desktop is connected to web services and this is connected to the application
services and inside it statements and fund transfer and this application server is also connected to
the Data storage and the data storage contains account details and customer details.

FIGURE 7.1 DEPLOYMENT DIAGRAM

18
CHAPTER-8
GENERATE​ ​CODE OF CLASS DIAGRAM FOR CAR RENTAL SYSTEM

class customer

{ int no;

char name[30];

char color[10];

int distance;

int price;

public:

int distance1()

{ return distance; }

void copy(int r,car ob2)

{ strcpy(name,ob2.name);

no=ob2.no;

strcpy(color,ob2.color);

distance=ob2.distance+r;

price=ob2.price;

int payment(char name1[30])

cout<<"NAME:";

gets(name);

cout<<"COLOUR:";

cin>>color;

19
cout<<"DISTANCE:";

cin>>distance;

cout<<"PRICE PER DAY:";

cin>>price;

}ob1;

class payment

{ char name[20];

int age,carno;

char adress[30];

long number;

int days;

public:

int namec(char name1[30])

{ void employer(int n)

cout<<"\n\n\nENTER THE NAME: ";

gets(name);

cout<<"\n\nENTER THE ADRESS: ";

gets(adress);

cout<<"\n\nENTER THE PHONE NUMBER: ";

cin>>number;

carno=n;

cout<<"\n\nINPUT THE NO OF DAYS: ";

20
cin>>days;

void display3()

{ cout<<carno<<name<<adress<<number<<days; }

void accountant(int no,int t=0)

{ char b[10];

char a[30];

if(t==0)

{ strcpy(b,"ob2");

strcpy(a,"info.dat");

strcpy(b,"ob1");

strcpy(a,"sports.dat");

else

if(t==3||t==33)

strcpy(b,"ob1");

strcpy(a,"suv.dat");

} else

cout<<"NAME OF THE CAR”<<"COLOUR"<<"DISTANCE"<<"PRICE PER DAY\n\n";

cout<<"\n\nENTER THE REFERENCE NO:";

cin>>no;

if(ob2.cno()==no)

cout<<"WHAT TYPE OF CAR DID YOU RENT";

21
cout<<"\n\n 1.SPORTS CAR";

cout<<"\n\n 2.LEISURA CAR";

cout<<"\n\n 3.SUV";

int op2;

cout<<"\n\nENTER YOUR OPTION:";

cin>>op2;

int distance;

cout<<"\n\nENTER THE DISTANCE TRAVELLED:";

cin>>distance;

int n1=ob2.cno();

char ab[20];

switch(op2)

{ case 1:

display("sports.dat",n1);

strcpy(ab,"sports.dat");

Break; } }

void accountant()

{ cin>>option;

clrscr();

switch(option) {

case 1:

{ int n;

char namecar1[30];

cout<<"NO OF CARS TO BE INPUTED: ";

22
cin>>n;

cout<<"\nENTER THE TYPE OF CAR: ";

cout<<"\n\n 1.SPORTS CAR";

cout<<"\n\n 2.LEISURE CAR";

cout<<"\n\n 3.SUV";

int op3;

cout<<"\n\n\n ENTER YOUR OPTION: ";

switch(op3)

case 1:

strcpy(namecar1,"sports.dat");

break;

case 2:

strcpy(namecar1,"leisure.dat");

break;

case 3:

strcpy(namecar1,"suv.dat");

break;

for(int i=0;i<n;i++)

filin.close();

filin2.close();

23
CHAPTER-9
​IMPLEMENT GENERATED CODE USING C++ APPLICATION

FIGURE 9.1: LOGIN SCREEN

FIGURE 9.2 CAR MODEL MENU

24
FIGURE 9.3 RENTAL CONFIRMATION

FIGURE 9.4 BOOKING COMPLETION

25
CHAPTER-10
PERFORM TEST CASE AND TEST PLAN FOR CAR RENTAL SYSTEM

TABLE 10.1 TEST CASES AND RESULTS

26
CONCLUSION

Thus the object oriented design for the Car Rental System was successfully designed. The
construction, visualization and the documentation of the artifacts of the above mentioned
software-intensive system was illustrated and specified with the help of the Unified Modeling
Language. Analogous to the use of architectural blueprints in the construction industry, UML
provides a common language for describing software models, and it can be used in conjunction
with a wide range of software lifecycles and development processes. This software is efficient in
maintaining customer’s details and can easily perform operations on customer’s records. This
software also reduces the workload of the travel agency manager.

In future, this system can launch web site for easy online registration. In this system there
is limitation for cars and location. In future, it can be extended to add more location and cars.

27

You might also like