Question

Part 1 Examine the pseudocode sample provided, and explain what it does line by line. Click...

Part 1

Examine the pseudocode sample provided, and explain what it does line by line.

Click here to access the sample. Note that this example is built on top of the one provided in week 2.

UNIT 3 PSEUDOCODE SAMPLE

Description: This logic apples a discount on an item unless the discounted price is less than the whole sale price

Program: applyDiscount

     Create variable productPrice as double

     Create variable discount as double

     Create variable wholesalePrice as double

     Create variable discountedPrice as double

     productPrice = get value from user input

     discount = get value from user input

     wholesalePrice = get value from user input

     discountedPrice = productPrice * (1 - discount)

       if (discountedPrice < wholesalePrice)

       discountedPrice = wholesalePrice

     end if

     Display discountedPrice

End program

Part 2

Present a solution using pseudocode similar to what you saw in part 1.

   Identify the logic needed to select a payment option, and get payment details.

   The logic needs to capture the payment option from the user.

   Two options should be available for the user to select from:

         Electronic check with routing number and account number

         Credit card with account number, expiration date and CVV code

The logic should check the selected option using a decision-making statement and provide the corresponding statements to capture the payment information based on the selection.

       Insert Pseudocode below

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Part 1 Examine the pseudocode sample provided, and explain what it does line by line. Click...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • this assingent is to  pseudocode, i have instructions and the example my teacher had given me for...

    this assingent is to  pseudocode, i have instructions and the example my teacher had given me for this, could i have some assistance, i need to do this in netbeans IDE and i need to use the scanner method as well and i need to pass both. Overview: This assignment will allow you to use pseudocode to implement the program to see the value in planning first, coding later. While coding is the glamorous part of the job, software development is...

  • How do i write the pseudocode for this java code? First, write out pseudocode, and then create a program to help you by accomplishing the following tasks: :  Use command line interface to ask the use...

    How do i write the pseudocode for this java code? First, write out pseudocode, and then create a program to help you by accomplishing the following tasks: :  Use command line interface to ask the user to input the following. ○ How many apples are on hand ○ How many apples should be in stock ○ How many oranges are on hand ○ How many oranges should be in stock  Perform an operation to determine how many of...

  • Overview Module 3 Assignment 1 features the design of a pseudocode and a Python program that...

    Overview Module 3 Assignment 1 features the design of a pseudocode and a Python program that uses iteration to guess a number from 1 to 10. Each lab asks you to write pseudocode that plans the program’s logic before you write the program in Python and to turn in three things: 1) the pseudocode, 2) a screenshot of the output, and 3) the Python program. Instructions Write pseudocode for a Python program that uses iteration to guess a number from...

  • C# Visual Studios HelloWorld For this assignment, you'll work with first creating an array and populating...

    C# Visual Studios HelloWorld For this assignment, you'll work with first creating an array and populating it's values. Then, we'll use the values in the array to calculate the average. Since it's common for an average to result in numbers with decimal points, the array you create should be of type double[]. This program will need to use dynamic input from the user so perform the following steps: Ask the user how many numbers need to be added. Use this...

  • In python 3 What you need to do? 1. 2. 3. Create a function implementing the...

    In python 3 What you need to do? 1. 2. 3. Create a function implementing the logic to a Pascal triangle. (You can use any logic of your choice to generate the triangle) Read an integer input from the user, to determine the number of rows to be generated in a Pascal triangle. Call the function by passing the input as an argument to the function. Hint: You can use a list of lists to store the values of a...

  • I need help with a C++ assignment: Write a program containing the following: 1. Variable Definitions...

    I need help with a C++ assignment: Write a program containing the following: 1. Variable Definitions only as (DieRoll, Guess, cnt1, cnt2) followed by this statement: srand((unsigned int)time (NULL)); which will give the random number generator a random starting point. Note: srand and rand require the TIME.H (or iomanip) cnt1 and cnt2 will be used in Chapter 5 drop box as counters for loops. Do NOT create additional variables. Points will be taken off for any additional variable creation. 2....

  • I need the pseudocode and python for the four attached problems: 1. (Chapter 5 - For...

    I need the pseudocode and python for the four attached problems: 1. (Chapter 5 - For Loop) Logic Technical College has a current tuition of $10,000 per year. Tuition is scheduled to increase by 5% each year. Using a FOR loop, design a program that calculates and displays the tuition each year for the next ten years, like so: The tuition for year 1 will be: 10500.00 The tuition for year 2 will be: 11025.00 ……….. (You, of course will...

  • a. Write a line of code that asks the user what their favorite number is, that...

    a. Write a line of code that asks the user what their favorite number is, that only accepts numeric input, and saves the answer in variable D1. b. Write a line of code that asks the user what their favorite color is, that only accepts string input, and saves the answer in variable D2. c. Construct a 1x2 string matrix L1 where the string “HYPE” is the first element and the string “EXHAUSTED” is the second element. d. Using the...

  • import java.util.*; /** Description: This program determines the average of a list of (nonnegative) exam scores....

    import java.util.*; /** Description: This program determines the average of a list of (nonnegative) exam scores. Repeats for more exams until the user says to stop. Input: Numbers, sum, answer Output: Displays program description Displays instruction for user Displays average Algorithm: 1. START 2. Declare variables sum, numberOf Students, nextNumber, answer 3. Display welcome message and program description 4. DOWHILE user wants to continue 5. Display instructions on how to use the program 6. Inititalize sum and number of student...

  • Below is the picture for the direction of my program and also the part where I...

    Below is the picture for the direction of my program and also the part where I have problems with I've already finished it and my code works correctly. But what I need to do is to "read the file name from the command line arguments" instead of the standard input (cin) that I did for step 1. I'm not sure how to do that. 2.13 PROGRAM 1: Calculating Coefficient Of Lift For this PROGRAM you will calculate the coefficient of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT