Question

In: Computer Science

complete a pseudocode for the program specifications be sure to declare the contants and it contains...

complete a pseudocode for the program specifications be sure to declare the contants and it contains only 1 if-else statement


You need a program that will calculate the cost of movie tickets. Input will consist of the customer’s name and age. The output is to consist of the customer’s name and ticket cost. If the age is 12 or less, the ticket cost is $5.00. If the age is over 12, the ticket cost is $8.95.

Solutions

Expert Solution

The pseudocode is as below:-

The implementation of the pseudocode in java is as follows:-

The corresponding output for the two cases when age<=12 & age>12 are as below:-


Related Solutions

complete a pseudocode for the program specifications be sure to declare the contants and it contains...
complete a pseudocode for the program specifications be sure to declare the contants and it contains only 1 if-else statement you need a program that will calculate the net pay for the employees. Input consists of the employee’s first name, employee’s last name, hourly pay rate, hours worked. The gross pay is based on the hours worked. If the hours worked is over 40, then the overtime pay is one and a half times the hourly pay rate for all...
assume that the following pseudocode is executed in a program module main declare x = 1...
assume that the following pseudocode is executed in a program module main declare x = 1 declare sum = 0 declare max = 5 while ( x < max) Display "x is ", x set x = x + 1 set sum = s + x end while end module after the execution of this program the final value of x is_____ and the final value of sum is_____
Problem specifications: You are tasked with developing a complete temperature conversion program in Java. Your program...
Problem specifications: You are tasked with developing a complete temperature conversion program in Java. Your program should: -prompt the user with the following menu: -1-Convert Fahrenheit to Celcius -2-Convert Celcius to Fahrenheit -3-Quit Program The menu must be coded in its own method. -If user select option 1 then call a method that prompts the user to enter a value in degrees Fahrenheit and return it back to main. -call a method that converts from Fahrenheit to Celcius -call a...
Rewrite your program for part 1. Do not declare the array globally, declare it in the...
Rewrite your program for part 1. Do not declare the array globally, declare it in the loop function. This now requires that you add two parameters to your fill array and print array functions. You must now pass the array name and array size as arguments, when the program calls these functions. The program has the same behavior as problem 1, but illustrates the difference between globally and locally declared variables. The program code for part 1 was: int Array[15]...
Design c++ program so that it correctly meets the program specifications given below.   Specifications: Create a...
Design c++ program so that it correctly meets the program specifications given below.   Specifications: Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1 -- square 2 -- circle 3 -- right triangle 4 -- quit If the user selects choice 1, the program should find the area of a square. If the user selects choice 2, the program should find the area of a circle. If the...
C++ Program 1. Declare an integer static array a[ ] with 100 elements. 2. Declare an...
C++ Program 1. Declare an integer static array a[ ] with 100 elements. 2. Declare an integer pointer p. 3. Let p pointing to the array a[ ]. 4. Use p (you have to use p) to put 0 into the first element of this array, 2 into the second element, 4 into the 3rd element, 6 into the 4th element, ... 198 into the 100th element of this array. 5. Use a (you have to use a) to display...
I NEED THIS IN PSEUDOCODE: SWITCH/CASE 2 - Complete the pseudocode below by including a SWITCH...
I NEED THIS IN PSEUDOCODE: SWITCH/CASE 2 - Complete the pseudocode below by including a SWITCH statement that takes the user input (an integer between 26-30) and prints out a count up in its English equivalent. For example: if the user inputs “26”, the code will print “twenty-six”, “twenty-seven” on the next line, and so on up to “thirty”. If the user inputs “30”, the code will print “thirty” and finish. CREATE inputNum PRINT ("Please enter a number between 26-30...
write pseudocode for the following problems not c code Pseudocode only Write a C program to...
write pseudocode for the following problems not c code Pseudocode only Write a C program to print all natural numbers from 1 to n. - using while loop Write a C program to print all natural numbers in reverse (from n to 1). - using while loop Write a C program to print all alphabets from a to z. - using while loop Write a C program to print all even numbers between 1 to 100. - using while loop...
C Program and pseudocode for this problem. Write a C program that plays the game of...
C Program and pseudocode for this problem. Write a C program that plays the game of "Guess the number" as the following: Your program choose the number to be guessed by selecting an integer at random in the rang of 1 to 1000. The program then asks the use to guess the number. If the player's guess is incorrect, your program should loop until the player finally gets the number right. Your program keeps telling the player "Too High" or...
4. PROPOSED SOLUTION (PSEUDOCODE) • Start. • Initialize the clear cycle=1 and part[2],generated=0. • Declare the...
4. PROPOSED SOLUTION (PSEUDOCODE) • Start. • Initialize the clear cycle=1 and part[2],generated=0. • Declare the parts of the car as ‘engine’, ‘chassis’, ‘ss’. • Initialize the semaphore sem t ready. • Assign the ids from 0 to 3. • Declare the function void * gen branch(void*arg) which generates the assembly branch. • In the above function declare i,j,k=0 . • Repeat the step 7 until while(1). • Declare sleep(1) so that when the loop runs the next time it...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT