Global variables and special values

Assignment Help Basic Computer Science
Reference no: EM131289212

Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz), medium (12oz), and large (15oz). The cost of one small cup is $1.75, one medium cup is $1.90, and one large cup is $2.00. Write a menu-driven program that will make the coffee shop operational. Your program should allow the user to do the following: a. b. c. d. Buy coffee in any size and in any number of cups. At any time show the total number of cups of each size sold. At any time show the total amount of coffee sold. At any time show the total money made. Your program should consist of at least the following functions: a function to show the user how to use the program, a function to sell coffee, a function to show the number of cups of each size sold, a function to show the total amount of coffee sold, and a function to show the total money made. Your program should not use any global variables and special values such as coffee cup sizes and cost of a coffee cup must be declared as named constants.

Reference no: EM131289212

Questions Cloud

Difference between economic failure and financial distress : What is the difference between economic failure and financial distress? Which situation is likely to lead to liquidation, and which is likely to result in reorganization?
Calculate the taxable income-subtract the sum : Function taxAmount: This function computes and returns the tax owed. To calculate the taxable income, subtract the sum of the standard exemption, the amount contributed to a pension plan, and the personal exemption, which is $1,500 per person. (No..
What is the purpose of a prepackaged bankruptcy : What is the purpose of a prepackaged bankruptcy? Would a prepackaged bankruptcy be more likely to be used for a liquidation or a reorganization?
Explain the planning consideration for staffing organization : Develop a model for staffing an organization that supports the firm's Human Resources Management strategy and sustains productive operations.
Global variables and special values : Your program should not use any global variables and special values such as coffee cup sizes and cost of a coffee cup must be declared as named constants.
How to manage change and reorganisation lawfully : Understand the purpose of employment regulation and the way it is enforced in practice. how to manage recruitment and selection activities lawfully.
What trends are likely to affect profitability of industry : What major trends are likely to affect the profitability of the industry? Which are likely to improve profitability and which are likely to damage profitability of the industry as a whole?
Determine the cash flows in the swap : Using the following information about LIBOR at the end of each of the next fi ve years, determine the cash flows in the swap.
How could you capitalize on the arbitrage opportunity : If the price is not fair, how could you capitalize on the arbitrage opportunity? What is the potential profit? Assume monthly compounding for borrowing and lending.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Complain that the network is slow

The NICs on your company's computers all have dual 10-Mbps and 100-Mbps capability, yet users complain that the network is slow. Write a brief essay that explains what could be the cause of the problem?

  Object oriented interface

Between ODBC, OLEDB, ADO and JPCD, which one is an object oriented interface that encapsulates data server functionality?

  Career planning and development

You are the Chief Human Resource Officer (CHRO) at your organization. As the CHRO, one of your primary roles is to be the workforce strategist. Your organization is planning to expand business operations to your neighboring state by opening an off..

  Show that even if there are negative cycles

Show that even if there are negative cycles, the problem can be formulated as a minimum cost flow problem involving node throughput constraints of the form

  Parallel implementation of problem

Give an example of a problem that can be solved with a computer program. Identify the part(s) of the problem that can be done in parallel, and the part(s) that must be done serially. Speculate on the efficiency of a parallel implementation of this..

  In what ways are itil and cobit similar

In what ways are ITIL and COBIT similar? How are they different? 8. Is it important for business managers to understand and be involved in IT governance? Why or why not?

  Write a complete java program called parser

Write a complete Java program called Parser that gets a comma-delimited String of integers (eg "4,8,16,32,...") from the user at the command line and then converts the String to an ArrayList of Integers (using the wrapper class) with each element con..

  What if any normalization error is present in the table

What, if any normalization error is present in the table? a. None b. First Normal Form c. Second Normal Form d. Third Normal Form Describe or illustrate how you would correct the normalization error, if one is present.

  You are given for input the student name

Draw a flowchart to illustrate the following problem. You are given for input the student name, number of credits, and cost per credit. You need to output the student name, number of credits and total tuition.

  Evaluate the following postfix expressions

Evaluate the following postfix expressions by using the algorithm given. Show the status of the stack after each step of the algorithm. Assume that division is integer division as in java and the identifiers have the following values: a=7;b=3;c=12..

  Identify the comment object returned

Create tests for SalesItem that test whether the findMostHelpfulComment method works as expected. Note that this method returns a Comment object.

  Represented with each signal change

A carrier wave is modulated with 4 amplitudes and 4 phase changes; how many bits can be represented with each signal change?

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