Java – Programming Environment

Java – Programming
Environment
Objectives:
• Analyse a simple data processing problem to correctly identify the data and high-level processing involved.
• Apply the basic programming construct of selection to develop pseudocode that solves simple data processing problems
• Use appropriate programming tools to develop an effective computer program from pseudocode
• Specify and execute test plans for pseudocode and programming code
• Develop external documentation for the process of converting a simple data processing problem into a computer program
• Internally document a computer program with appropriate comments.

Background
Winter Wonder World is a theme park located on the outskirts of the city of Goldbane. They promote themselves as providing the best day out for all the family for the best value for money.
Best fun. Best place. Best value.
Winter Wonder World wants to setup a fresh online ticketing system. You have been drawn in to develop the logic for this system and have been asked to build a simple program to display that logic prior to further development of the system taking place.
There are three main ticketing options: Child, Adult and Senior tickets, where each type has different Ticket Cost as shown in Table 1
Table 1: Winter Wonder World Ticket Costs
Option Category Ticket Cost
1 Child (4-17 Years) $18.00
2 Adult (18-59 Years) $36.00
3 Senior (60 + Years) $32.50
N/A Infant (0-3 Years) Free

Task 1: Pseudocode
Write a pseudocode for the Ticketing Program that will allow a user to buy multiple tickets across different ticket categories, and then display a summary of what they have purchased.
In greater detail you will need to create a program that will:
• Ask the user to select a category of tickets to purchase
• Ask the user to enter the number of tickets to be purchased
• Display a summary message regarding the number of tickets to be purchased
• Ask the user to confirm the purchase by pressing ‘Y’ (If they do not wish to confirm, the program should return to the Main Menu)
• The program should display the total amount for the number of tickets purchased through the selected category
• The program should then ask if the user wishes to purchase tickets from another category
? If Yes, then the program should return to the Main Menu, with a summary of what they have purchased underneath.
? If No, the user should be given an overall summary of what they have purchased in all categories, including a grand total, and the program should then exit
Figure1 below shows an example of the expected program output

Task 2: Data dictionary
Write a Data dictionary for the corresponding pseudocode written in Task 1.
You should enter at least 10 variables.
Use the Data dictionary template given below to complete your answer.
Variable name Type Length Acceptable Description
values Compose a pseudocode for the Ticketing Program that will permit a client to purchase various tickets across various ticket classes, and afterward show an outline of what they have bought.

In more prominent detail you should make a program that will:

• Ask the client to choose a classification of passes to buy

• Ask the client to enter the quantity of passes to be bought

• Display an outline message with respect to the quantity of passes to be bought

• Ask the client to affirm the buy by squeezing ‘Y’ (If they don’t wish to affirm, the program should get back to the Main Menu)

• The program should show the aggregate sum for the quantity of tickets bought through the chose class

• The program should then inquire as to whether the client wishes to buy tickets from another class

? On the off chance that Yes, the program should get back to the Main Menu, with a synopsis of what they have bought under.

? Assuming No, the client ought to be given a general rundown of what they have bought in all classifications, including a terrific aggregate, and the program should then exit

Figure1 beneath shows an illustration of the normal program yield

Errand 2: Data word reference

Compose a Data word reference for the comparing pseudocode written in Task 1.

You ought to enter at any rate 10 factors.

Utilize the Data word reference format offered underneath to finish your response.

Variable name Type Length Acceptable Description

values
Task 3: Desk check
Desk-check the pseudo code written in Task 1 using at least two test datasets. Provide both the test data table and desk-check table.
Use the template given below to complete your answer.
Test data table:
Input Expected Total
First Variable Value Variable Value
dataset
Second Variable Value Variable Value
dataset
Desk check table:
Line Variables Input/Output
Number
1
2
3
4
5
6
Task 4: Programming
Write a program based on the pseudocode and data dictionary you designed in Task 1 and Task 2
• The program should match the logic specified in the pseudo code.
• The code should be easy to read and understand.
• The code should be well formatted.
• The program should use meaningful variable names
• The code should be well documented. This should include comments about the program: program name, purpose, author; comments describing each variable and comments on each section of the program.
(See figure 1 – Example of Expected Output)
Task 5: Testing
Test the program by providing screen shot using the following test data:
• Child: Number of tickets = 5
• Adult: Number of tickets = 10
• Senior: Number of tickets = 2

Figure 1: Example of Expected Output