Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the following tasks, provide the complete pseudo code. Include the new pseudo code elements: class end class, main return, user prompts, and

For each of the following tasks, provide the complete pseudo code. Include the new pseudo code elements: class end class, main return, user prompts, and declare all variables that the program needs. Declare String variables with String (capital S) since thats what we do in java. We aso have num and boolean variables in pseudocode. Declare all the variables at the top of the code block within main() return. That is immediately after main().

Task 1 (2 pt): A program that converts a temperature in F that the user provides and returns the equivalent temperature in C. Hint: Google is your friend! Given F, solve for C. This program does not require an if structure!

Task 2 (2 pts): As people pass through an entry kiosk at the theater, they are prompted to enter their age. If they are 21 or older, they get a paper wrist band. Code a logic program that asks the user to enter their age and then if they are 21 or over displays a message that they get a wrist band. (Note that the program does nothing if they are not 21 or over)

Task 3 (3 pts) : an application program where the user enters the price of an item and the program computes shipping costs. If the item price is $100 or more, then shipping is free otherwise it is 2% of the price. The program should output the shipping cost and the total price.

Task 4 (3pts): A program that asks the user to enter their birth month (integer 1 12 inclusive). If the user enters a value in range, the program echoes the input (Your birth month is: N) but if the value is not in the range it outputs an error msg (You entered an incorrect month value: N).

Task 5 (3 pts): (This task uses Strings and an if..then..else) A program that prompts the user for their party affiliation (Democrat, Republican, or Independent) and responds accordingly with a Donkey, Elephant, or Man. (i.e. You get a Democratic Donkey.)

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_2

Step: 3

blur-text-image_3

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

4. Show the trainees how to do it again.

Answered: 1 week ago

Question

8. Praise the trainees for their success in learning the task.

Answered: 1 week ago