Write psuedocode to represent a suitable algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM131210368

A newly opened grocery store wants to set up their computerized system to be able to handle the checkout of items. They are on the hunt for a programming company that can assist in designing such a program. Luckily, the students of the Community College programming class have volunteered.

The program should you display a Welcome message followed by the following menu-

1. 5 Items or Less

2. Express Lane

3. Exit

The user in then prompted to enter a choice corresponding to the above menu.

If the choice is 1 then the user is prompted again for the number of items to be processed.

Depending on the amount of items to be processed by the user must be prompted for the price of all the items. The sum of the items is then displayed followed by a Goodbye message then the program ends.

NB: The amount of item should be 5 or less.

If the choice is 2 then they are then prompted for the price of the item.

If the price of the item is greater than $50 then a 25% discount is given to the product. If not the price remains the same. The final price is then displayed and a Goodbye message then the program ends.

NB: Express lane is for 1 item.

If the choice is 3 then a Goodbye message is displayed and the program ends.

1. Write Psuedocode to represent a suitable algorithm to solve the grocery's store problem.

2. Design a Flowchart which will show the flow of data for this algorithm.

3. Write C Code for this program

a) Code should be commented and indented where necessary.

Reference no: EM131210368

Questions Cloud

Would the hypothesis be directional or non-directional : Would you recommend using a z-test, a t-test, or an ANOVA for the analysis? Explain your answer. What would your choice of test depend on? For the test you select, explain your design and your comparison groups. Would the hypothesis be directional ..
Discuss the pros and cons of letting people rotate : Discuss the pros and cons of letting people rotate between projects from different application domains as opposed to letting them become true experts in one particular application domain.
What are the benefits of holding real money balances : What are the benefits of holding real money balances? What are the costs? - What is the optimum amount of real money balances that house holds and firms will demand?
Explain outcome of effort and the factors that influenced : Describe the components of this effort and the motivations behind them. Explain the outcome of the effort and the factors that influenced those outcomes.
Write psuedocode to represent a suitable algorithm : If the choice is 3 then a Goodbye message is displayed and the program ends. Write Psuedocode to represent a suitable algorithm to solve the grocery's store problem. Design a Flowchart which will show the flow of data for this algorithm
Graph the supply and demand curves for real money balances : Graph the supply and demand curves for real money balances. Explain what happens to the interest rate in each of the given situations:
Describe your experience with learning teams : Cohesiveness assesses the group's ability to work together in a productive manner toward a common goal. When there is little or no cohesiveness the group and organization is ultimately impacted negatively. Describe your experience with learning te..
Evaluates all operands before applying boolean operators : Show how the if then else construct can be used to simulate short-circuit evaluation of boolean expressions in a language which evaluates all operands before applying boolean operators.
Cost of health care-giving evidence : Explain why the cost of health care appears to be increasing. What, in your opinion, would be the best way to control the cost of health care, giving evidence to back up your opinion?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write a method that finds the average age of the students

Write a method that finds the average age of the students stored in the data structure and some Java code that could be used in a test program to display the value returned by the method on the console or command prompt.

  Design and implement an algorithm for finding the best tour

Your group will design and implement an algorithm (or algorithms) for finding the best tour you can. TSP is not a problem for which you will be able to easily find optimal solutions.

  Online vs. face-to-face classes

Communication A significant distinction between online and face-to-face classes lies in the area of communication.

  Create algorithm to calculate union of two input sets-array

Create algorithm to calculate union of two input sets given as arrays, both of size O(n). The output must be array of distinct elements that form union of the sets.

  How this tree is represented as child/sibling implementation

how this tree is represented as child/sibling implementation?

  Is it possible to use binary search on a table

Is it possible to use binary search on a table whose size is prime? Compute the hash code for each of the following symbols by adding up the letters (A = 1, B = 2, etc.).

  Find the corresponding rpn notation

Find the corresponding RPN notation and write the program using PUSH, POP, ADD, MUL, SUB, and DIV stack instructions.

  Question about shortest prefixes

A prefix of a string is a substring string at the beginning of the given string. The prefixes of "carbon" are: c, ca, car, carb, carbo and carbon.

  Towers of hanoi problem

Solving the Towers of Hanoi Problem using State Space Search- There are 3 disks on peg A. The top disk has a diameter of 1, the middle disk has a diameter of 2, and the bottom disk has a diameter of 3

  Calculate the usable area in square feet of house.

Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular.

  What stack elements remain after the following instructions

Assume a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack. What stack elements remain after the following instruction..

  Describe and implement fft algorithm cooley-tukey

Describe and implement in C++ FFT algorithm "Cooley-Tukey". Also, implement naive DFT and compare naive DFT with FFT using: a sample of the signal x(t) = t

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd