Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It's almost Halloween and the ghouls of the dark are wandering the streets of Milton. It is your job, as the talented Java programmer,

image text in transcribed

It's almost Halloween and the "ghouls of the dark" are wandering the streets of Milton. It is your job, as the talented Java programmer, to prepare a report on the ghoul sightings. Read over the following description in full, and decide how many variables, and what type, you will need to complete the program. Then, write a complete program to: 1. Declare any variables that will be needed for the program, including any Scanner or DecimalFormat objects. (2 marks) 2. With a Scanner, ask the user to input the number of each type of ghoul sighting that has been reported. (2 marks) For example: How many times has Freddy Kruger been sighted? 40 How many times has Frank N. Stein been sighted? 53 3. A REWARD of $5.50 per ghoul sighting is being offered. Calculate the total number of ghoul sightings, and the total reward for ghoul sightings by multiplying the total number of sightings by 5.50. (2 marks) Then, output the overall total number of ghoul sightings, along with the user's reward for the sightings. (4 marks) That is a total of 93 sightings! YEEK! The total rewards for ghoul sightings is $511.50. Remember that the numbers 40, 53, 93 and 511.50 are just examples, and will change each time, so you must use variables where necessary. The use of DecimalFormat for printing the reward value to 2 decimal places is required for full marks. 4. Leave two blank lines after the reward amount in the output, then print the message Happy Halloween!! to the screen. (2 marks) 5. Include at least four //comments in your program, and a complete header. (1 communication mark for the header and 2 marks for the //comments)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

2. Discuss the evidence for psychopathy as a heritable disorder.

Answered: 1 week ago