subject
Computers and Technology, 29.10.2020 22:40 jesser9

Java Eclipse Homework Puppet Theater Package: Chall11B
Class: PuppetApp

PUPPET ASSIGNMENT

Write a program for the “Miles of Smiles” puppet theater that will display the attendance for each night of the week, the average attendance, the total attendance, and the profit.

Your program must:

1. Declare the variable: ‘day’ and as an integer type.
2. Declare the variables ‘total’ and ‘average’ as a double.
3. Display a smiling face at the top of the screen.
4. Display the title of your program and display “PROGRAMMED BY (your name).”
5. Ask the user for the number of persons who attended the puppet show on day 1.
Repeat this for day 2, day 3, day 4 and day 5.
6 .Calculate the total attendance for the week and store it in the variable ‘total’.
7. Calculate the average daily attendance for the week and store it in the variable ‘average’. (Be sure to make the calculation with two decimal places, not as an integer.)
8. Display the total attendance for the week and the average per day.
9. If the average is greater than 25, then display “MAKING A PROFIT”, else if the average is less than 24 then display “LOSING MONEY’. Otherwise display ”BREAKING EVEN”.

Save your completed code according to your teacher’s directions.

THE MILES OF SMILES PUPPET THEATER

ATTENDANCE PROGRAM

Programmed by Sally Smith

PLEASE ENTER THE NUMBER OF PERSONS ATTENDING THE SHOW ON:

DAY 1:

DAY 2:

DAY 3:

DAY 4:

DAY 5:

**

*_ _*

* 0 0 *

* + *

* \___/ *

* *



TOTAL: (The total will be displayed here)

AVERAGE: (The average will be displayed here)

We are making money! (If this is the case…otherwise “Losing Money” or “Breaking Even”)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
You know the right answer?
Java Eclipse Homework Puppet Theater Package: Chall11B
Class: PuppetApp

PUPPET AS...
Questions
question
History, 29.08.2019 04:10
question
Mathematics, 29.08.2019 04:10
question
Mathematics, 29.08.2019 04:10