Itech10005000 programming 1 semester 1 2017 - develop and


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

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Itech10005000 programming 1 semester 1 2017 - develop and
Reference No:- TGS02308215

Now Priced at $50 (50% Discount)

Recommended (93%)

Rated (4.5/5)