0% found this document useful (0 votes)
12 views3 pages

02 Challenge Instructions

The document provides instructions for a programming challenge to create a Java program called FastFood.java. The program is to display a snack menu, read a user's choice of item, and confirm their selection. Specifically, it should display the title "SNACK MENU" and the menu options coffee, donut, skipples, and peanuts. It then prompts the user to enter a letter choice, reads their input, and outputs a confirmation message stating their selected item. Finally, the program is to output the creator's name and date at the bottom. An extension task is to add an additional menu item. The document provides sample output and grading criteria for the challenge.

Uploaded by

Nerd 101
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)
12 views3 pages

02 Challenge Instructions

The document provides instructions for a programming challenge to create a Java program called FastFood.java. The program is to display a snack menu, read a user's choice of item, and confirm their selection. Specifically, it should display the title "SNACK MENU" and the menu options coffee, donut, skipples, and peanuts. It then prompts the user to enter a letter choice, reads their input, and outputs a confirmation message stating their selected item. Finally, the program is to output the creator's name and date at the bottom. An extension task is to add an additional menu item. The document provides sample output and grading criteria for the challenge.

Uploaded by

Nerd 101
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/ 3

02 Challenge Fast Food

Let’s have some programming fun with food and drink choices. You are not expected to
understand all of this program yet.

You know how to define and declare a String variable, display text on screen and read in
a number. In this challenge you will edit a program, FastFood.java, so that it reads in a
user letter choice from a menu and confirms that choice.

Create a new class called FastFood.java. Open and copy the FastFood program that came
with these instructions into your FastFood java class. The program will not run until you
add the missing statements.

The program should look like this after you run it:

What would you like?


c coffee
d donut
s skipples
p peanuts

Please enter a letter : d

I confirm your choice is donut

Programming Tasks
1. Display a title at the start of the program “SNACK MENU”

SNACK MENU
----------
What would you like?
c coffee
d donut
s skipples
p peanuts

Please enter a letter : d

I confirm your choice is donut

2. Display your name and correct date at the bottom of the program

SNACK MENU
----------
What would you like?
c coffee
d donut
s skipples
p peanuts

Please enter a letter : d

I confirm your choice is donut

This program was created by Fred Bloggs on 28 July 2013

3. Extension Task: Add an extra food or drink option of your choice to the program
(for example, “biscuit”)

SNACK MENU
----------
What would you like?
B biscuit
c coffee
d donut
s skipples
p peanuts

Please enter a letter : b

I confirm your choice is biscuit


This program was created by Fred Bloggs on 28 July 2013

Submission
1. You will copy the content of your program and email it to me (the code must be
indented).

Grading Criteria [Total 15 marks]


1 Filename correct
4 4 menu choices displayed and working
2 Title “SNACK MENU” output at top by program and underlined
1 Name and date output at bottom of program
2 Extra food or drink snack item added, for example: “biscuit”, and working
3 Good formatting – spacing and indentation
2 Header comment, comments in program body, close brackets commented

You might also like