Develop and test a small java program

Assignment Help JAVA Programming
Reference no: EM131512659

Overview

This is an individual assignment that requires you to design, develop and test a small Java program using object-oriented approaches.

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:
- Identify and use the correct syntax of a common programming language
- Recall and use typical programming constructs to design and implement simple software solutions
- Reproduce and adapt commonly used basic algorithms
- Utilise pseudocode and/or algorithms as a major program design technique
- Write and implement a solution algorithm using basic programming constructs
- Demonstrate debugging and testing skills whilst writing code
- Develop self-reliance and judgement in adapting algorithms to diverse contexts
- Design and write program solutions to identified problems using accepted design constructs

Assessment Details
Your task is to design, develop and test a small application to assist a company in providing hotel recommendations for tourists and business travelers.

Stage 1: Design
This stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. A document template has been provided for your use.

Requirements:
1) Read through Stage 2: Program Development to obtain details of the requirements of this program.
2) Write an algorithm that describes how the program will operate.
a. All program requirements must be included, even if you do not end up including all these requirements in your program code.

b. The algorithm must be structured logically so that the program would function correctly.
3) Prepare and document test cases that can be used to check that the program works correctly, once it has been coded. You do NOT need to actually run the test cases in this stage; this will occur in Stage 3: Testing.
a. All program requirements must be included, even if you do not end up including all these requirements in your program code.
b. Make sure the test cases include checking of data entered by the user to make sure that only valid data is accepted. If the user enters invalid data, the user should be informed of this and given another chance to enter the data. NB: As we have not covered exception handling, you may assume that the user will always enter the expected data type.
c. Test cases should be documented using a template like the one below. You may include extra information if you wish. At this stage, the Actual Result column will be left blank.

Stage 2: Program Development

Using the Design Documentation to assist you, develop a Java program that uses object-oriented coding approaches to store the details of several hotels, and uses text-driven menus to allow a user to perform various queries based on that hotel data.

Overview of the Program:

This section provides an overview of how the program works from the user's perspective. You may change the appearance of the program provided you implement the same functionality.

1. When the program starts, it provides a short welcome message including your name and student number, and then automatically initialises the program. This initialisation includes creating the hotels, creating the room-types and registering each room-type with its associated hotel (the details of hotels and room-types are listed in the tables on the next page). When initialisation is complete, a menu appears providing the user with options to display all hotel details, find the cheapest room, set the sale price of a room, perform an advanced query based on multiple criteria, or exit the system.

2. When the user selects the Display All Hotels option, the program should output a report listing all of the hotels, and each of the room types existing at the hotel. The hotel name and address
should be displayed inside a header (marked with == or some other symbol), along with the hotel's star rating, displayed via the correct number of asterisks (*). For each hotel, the details of each room type should be listed (name, maximum occupancy and regular price. The sale price should only be displayed if it differs from the regular price. The example below shows the report layout for just one of the hotels - your program should list all of the hotels. After the report is printed, the program should return to the main menu.

3. When the user chooses the Find Cheapest Room command, the program should search through all of the room-types at all of the hotels to find the cheapest option, and report the details of this back to the user. Note that your program must work correctly if the initialisation data is changed - that is, it is not sufficient to simply print out the details of the Fleabox Motel's Sardine Room without actually checking that it is the cheapest option. The program should use the sale price of each room-type, and does not need to check if the hotel actually has a vacancy for that type of room. After the report is printed, the program should return to the main menu.

4. When the user selects the option to Set a Sale Price, the program should prompt the user to enter the name of a hotel as a String. It should check that this actually matches one of the hotels in the system, and if not request a new name, until the user enters a valid name. At this point the program will display a numbered list of the names of the room-types existing at the specified hotel (this should be numbered starting at 1, not 0). The user should be prompted to select one of these room-types by entering a valid number. The program should then display the details of the selected room, and prompt the user to enter a sale price. The value entered must be between 50% and 100% of the regular price. Once a valid sale price has been entered, the object for that room-type should be updated with the new sale price. The main menu is then redisplayed.

5. When the user selects the option to Find Rooms Matching Criteria, the program should get them to enter valid values for each of the criteria (the minimum occupancy required, the minimum star-quality of the hotel, and the maximum price which the customer is willing to pay). The program should then search for and display the details of any rooms which satisfy these criteria and for which at least one vacancy exists. These should be grouped under a heading for each hotel. If no suitable room exists at a particular hotel, then no heading should be displayed for that hotel. After the report is shown, the program should return to the main menu.

Stage 3: Testing

Using a copy of the test cases developed in Stage 1: Design, test the program you have developed in

Stage 2: Program Development. Document your results, including both failed and successful tests.

Note: Please do not leave out any failed tests. If your testing highlights that your program has not worked correctly, then the failed tests help to demonstrate that you have been testing your program properly.

To show that you have tested your program, include small (but readable) screen captures in your Actual Results as well as any explanatory comments. Microsoft Windows includes a Snipping Tool that is useful for taking captures of the relevant parts of the screen.

Attachment:- Assignment.pdf

Reference no: EM131512659

Questions Cloud

Service plays music of a certain genre : Most everyone is familiar with Pandora, the Internet radio station. The service plays music of a certain genre based on the artist or type of music the user.
What questions should the message content address : You know that a hurricane might affect your community and you must prepare a warning message. What questions should the message content address?
Create a disaster plan for the site then review the strength : Choose a scenario and location for a disaster drill, create a disaster plan for the site then review the strengths and weaknesses of the disaster plan and incid
Benefits and limitations of duct smoke detection : Describe the benefits and limitations of duct smoke detection. What type of signaling system would you want the duct smoke detectors tied to and why?
Develop and test a small java program : ITECH1000/5000 Programming 1 Semester 1 2017 - develop and test a small Java program using object-oriented approaches.
Situations to increase the effectiveness of communication : Active listening is a technique that is frequently used in conflict situations to increase the effectiveness of communication.
Do you think the significant advantages to free trade out : Do you think the significant advantages to free trade out weigh the disadvantages? Why or why not? What do you think the US should do to maintain the positive?
Documents listing traits of emergency management : 'React' to Blanchard's Top Ten, specifically item #2 (pg 2) and the three documents listing traits of Emergency management (EM) leaders.
Responsibilities beyond selling products : Which field of marketing interests you the most and why? Do you think marketers have responsibilities beyond selling products?

Reviews

len1512659

5/31/2017 1:27:23 PM

Coding Standards • Use of coding conventions throughout entire program, including readable and clear layout, following naming conventions and including meaningful and appropriate comments. • Code modularized, correctly using method calls and passing data between methods 1 1 • Object-oriented approaches have been implemented appropriately 1 Stage 3: Testing 2 Documented test results clearly showing all the testing that has been conducted and the results of this testing. Total 20

len1512659

5/31/2017 1:27:13 PM

Stage 2: Program Development A Java program addressing the requirements outlined in the Assignment Details section, including appropriate use of classes, instances, loops, conditional statements, constants and variables: Initialisation of the program: • Creation and storage of Hotels and RoomTypes 2 Running Program • Welcome message and appropriate menu display until user chooses to exit or return to previous menu 1 • Displaying details of all hotels 2 • Finding and displaying cheapest room 2 • Setting sale price for a nominated hotel and room-type 3 • Finding a room matching all specified criteria 3

len1512659

5/31/2017 1:27:04 PM

Stage 1: Design Documentation Development of an algorithm describing how the program should function 1 • All requirements from the Assessment Details section included • Logical structure Documented test cases to validate program 1 • All requirements from the Assessment Details section included • Data is validated to ensure user entries are appropriate and incorrect user entries are handled smoothly

len1512659

5/31/2017 1:26:41 PM

• Reproduce and adapt commonly used basic algorithms • Utilise pseudocode and/or algorithms as a major program design technique • Write and implement a solution algorithm using basic programming constructs • Demonstrate debugging and testing skills whilst writing code • Develop self-reliance and judgement in adapting algorithms to diverse contexts • Design and write program solutions to identified problems using accepted design constructs

len1512659

5/31/2017 1:26:32 PM

• Identify and use the correct syntax of a common programming language • Recall and use typical programming constructs to design and implement simple software solutions

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd