0% found this document useful (0 votes)
94 views15 pages

Task 2

The document describes software testing done on a hotel reservation system. It provides details of unit, integration, system and user acceptance testing performed. Test cases were created to test reservation functions like adding, viewing, searching and deleting reservations. The test cases verified that the functions worked as expected by comparing actual and expected outputs. Screenshots of test outputs matched expected results, showing the testing was successful.

Uploaded by

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

Task 2

The document describes software testing done on a hotel reservation system. It provides details of unit, integration, system and user acceptance testing performed. Test cases were created to test reservation functions like adding, viewing, searching and deleting reservations. The test cases verified that the functions worked as expected by comparing actual and expected outputs. Screenshots of test outputs matched expected results, showing the testing was successful.

Uploaded by

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

Task 2 : Implement the above scenario using the selected data structure and its valid

operations for the design specification given in task 1. Use suitable error handling where
appropriate. Test the application using suitable test cases and illustrate the system. Provide
evidence of the test cases and the test results.

1. Software testing

According to this scenario the XYZ hotel chain has some planning system testing. In this system
there are 4 options for run the program. Such as reserve halls, view reservations, delete reservations
and exist. Tested Banquet hall Registration, Display, Search by hall ID, Search by reference
number, Delete, and Exit these functions are tested by different testing methods.

Software testing is the process of executing a program with the intent of finding an error. We
should tested the software when we after developing. Because it make assure the product provides
the expected functionalities up to the expected level without having any sort of issues. And also it
is the way to check whether as the software developed is functioning according to the client
requirement. The test planning is done in the designing face of the software life cycle.

There are steps in the testing process such as,

1.1. Unit testing

Unit testing is a software development process in which the smallest testable parts of an application
called units. As well as it focuses verification effort on the smallest unit in the software. Units are
individually examined for proper operations. Unit testing are often done manually in some instance
it is automated. Each of unit in the system tested by individually. (Rousse, 2017)

1.2. Integration testing

Integration testing test the interaction between components. Integration testing follows two
approach known as Top down approach and Bottom up approach. . (ISTQB exam certificion,
2017)
The aim of integration testing is to identify,

 Data being lost between modules.

 Sub functions may not produce the extract functions when we combine.

1.3. System testing

System testing is defined as testing a fully integrated the computer based system. This testing falls
in black box testing. In black box testing their source code system is not available. The source code
is available in only for white box testing. (Bennet coleman & co., 2017)

1.4. User acceptance testing

A software is required to be tested to make assure the product provides the expected functionalities
up to the expected level without having any sort of issues. Test planning is done in the designing
face of the software of life cycle. User acceptance tenting is the final phrase of the testing stage.

During user acceptance testing actual software users test the software and make sure it can handle
required tasks in real world according to the specifications. User acceptance testing is one of the
final and critical software project procedure that must occur before newly developed software is
rolled out of the market. It will demonstrate the user to get the feedback and write the comments
and recommend new corrections .Finally they satisfied the costumer 100 % using the user
acceptance testing. (Setter, 2013 - 17)
Table 03: Testing Reservation system

Test No Input Expected Output

Run system by entering


java
01 Menu appears
MainMenu_BanquetHall
at the prompt.

Select option 1 to add System prompts to


02
reservations enter Hall ID

System displays
auto generated
random number as
Type hall ID 124 and
03 reference number
press enter.
and informs that the
reservation was
added successfully!

Reservations get
Add three more
added with
04 reservations(member IDs
confirmation
130 , 200 ,250 )
massages.

Reservations are
05 Select option 2
displayed

Delete reservation
comes out and
06 Select option 3
system prompts for
reference number.
System displays
Enter non-existing ref no
07 massage “Reference
500.
number not found’

System displays
Select option 3 and enter message “Match
08
existing ref no 771 found-
Accept[Y/N]”

System displays
message
09 Press “Y” and press enter
“Reservation delete
successfully!”

System displays
message “Match
10 Enter existing ref no 878
found-
Accept[Y/N]”

System displays
message
11 Press “N” and press enter “Reservation added
to end of the
Queue”

This lists shows


Select option 2 from
12 reservations 33 gone
menu
and 33 added to end.

Program was stop


Select option 4 from
13 and close
menu
automatically.
1.4.1. Test results

Test case 01

Figure 02: Main menu (author made)

Actual output matches expected output.

Test case 02

Figure 03: Reserve hall (author made)

Actual output matches expected output.

Test case 03

Figure 04: Reserve hall success. (Author made)


Actual output matches expected output.

Test case 04

Figure 05: view reservation. (Author made)


Actual output matches expected output.

Test case 05
Figure 06: view
reservation. (Author made)

Test case 06

Figure 06:Delete reservation. (Author made)

Actual output matches expected output.

Test case 07

Figure 07: Non- existing ref no. (Author made)

Actual output matches expected output.

Test case 08
Figure 08: existing ref no. (Author made)

Actual output matches expected output.

Test case 09

Figure 09: existing ref no “Y”. (Author made)

Actual output matches expected output.


Test case 10

Figure 10: Again existing ref no 878. (Author made)


Actual output matches expected output.
Test case 11

Figure 11: Reservation added to end of the queue. (Author made)


Test case 12

Figure 12: Hall ID 124 deleted and 130 goes last. (Author made)
Actual output matches expected output.
Test case 12

Figure 12: End program (Author made)


Actual output matches expected output.

Source code of Node Class

public class Node

int hallid,referenceNo;

Node nextNode;
public Node(int id,int ref)

hallid=id;

referenceNo=ref;

I’ll mention the Source code of main Banquet hall.

///LINKED LIST QUEUE-BANQUET HALL SYSTEM

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

import java.util.Random;

public class MainMenu_BanquetHall{

Node head;

Node tail;

public void add( int hid, int refno)

Node p = new Node(hid,refno);

if (tail==null)

head=p;

tail=p;

else

{
tail.nextNode=p;

tail=p;

}//end add

public void printList()

Node p=head;

System.out.println("HALL ID REF NO");

while (p!= null)

System.out.println(p.hallid+" "+ "


"+p.referenceNo);

p=p.nextNode;

}//end print list

public void remove(int refno) throws IOException {

int hallid;

Node q=null;

Node p=head;

boolean found=false;

while (p!=null&& found==false)

{ if (refno==p.referenceNo)

found=true;

System.out.println(" ");

System.out.println("MATCH FOUND FOR REF.NO :- "+p.referenceNo);

System.out.println(" ");

System.out.println("HALL ID :- "+p.hallid);
System.out.println(" ");

System.out.print("Accept [Y/N): ");

BufferedReader br= new BufferedReader(new InputStreamReader(System.in));

String answer = br.readLine( );

if (answer.equals("Y")|| answer.equals("y"))

if (q==null) // first node

head=p.nextNode;//delete first node

System.out.println(" ");

System.out.println("RESERVATION DELETE SUCCESSFULLY ..!");

else //some other node

{ q.nextNode=p.nextNode; //delete node

System.out.println(" ");

System.out.println("RESERVATION DELETE SUCCESSFULLY ..!");

} else //answer NO

if (q==null) // first node

head=p.nextNode;//delete first node

else //some other node

q.nextNode=p.nextNode; //delete other node

// add node to tail

hallid=p.hallid;

add(hallid,refno);

System.out.println(" ");

System.out.println("RESERVATION ADDED TO END OF THE QUEUE..! ");


}//end answer NO

else //ref no not matching current node so go to NEXT NODE

q=p;

p=p.nextNode;

}//end while

if (found==false)

System.out.println(" ");

System.out.println("SORRY.. YOUR REFERENCE NUMBER NOT FOUND..! ");

}//end remove

public static void main(String arg[]) throws IOException

{ MainMenu_BanquetHall halls=new MainMenu_BanquetHall();

int choice=0;

while (choice!=4)

{System.out.println(" ");

System.out.println(" ");

System.out.println(" "+"*********_MAIN MENU OF BANQUET


HALLS_*********");

System.out.println(" ");

System.out.println(" ");

System.out.println(" "+"1.RESERVE HALLS");

System.out.println(" ");

System.out.println(" "+"2.VIEW RESERVATIONS");

System.out.println(" ");

System.out.println(" "+"3.DELETE RESERVATIONS");

System.out.println(" ");
System.out.println(" "+"4.EXIT");

System.out.println(" ");

System.out.println(" "+"ENTER OPTION


[1/2/3/4]:");

BufferedReader br= new BufferedReader(new InputStreamReader(System.in));

choice=Integer.parseInt(br.readLine());

if ( choice == 1 )

System.out.println(" ");

System.out.println("_ _ _ _ _ _ _ _ _ _ RESERVE HALLS _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");

System.out.println(" ");

System.out.println ("ENTER HALL ID :-");

int hid=Integer.parseInt(br.readLine());

Random r = new Random();

int refno= r.nextInt(1000);//auto generated random number between 0-1000

System.out.println(" ");

System.out.println("YOUR REFERENCE NUMBER IS :- "+refno);

halls.add (hid, refno);

System.out.println(" ");

System.out.println("RESERVATION ADDED SUCCESSFULLY ..!");

System.out.println(" ");

System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");

else

if (choice==2)

System.out.println(" ");

System.out.println("_ _ _ _ _ _ _ _ _ LIST OF RESERVATION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");


System.out.println(" ");

halls.printList();

System.out.println(" ");

System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _");

else

if (choice==3)

System.out.println(" ");

System.out.println("_ _ _ _ _ _ _ _ _ DELETE RESERVATION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");

System.out.println(" ");

System.out.println("Enter Reference No:");

int refno=Integer.parseInt(br.readLine());

halls.remove (refno);

System.out.println("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");

}//end choice loop

}//end main

}//end class Commented [pj1]: Answer has been provided with


screenshots of the working system and the appropriate
code.
Good answer.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy