Write a java program which compiles and executes

Assignment Help Basic Computer Science
Reference no: EM13235296

have to complete the following WITHOUT using loops and arrays: Write a Java program which compiles and executes: ask the user for 4 integer values. Each one of these is a percent of a total cake (4 values must total 100) verify that the 4 integers of Step 1 add up to 100 (i.e: 4 values total 100%, full cake- nothing more or less) If they DO NOT add up to 100, print an error message of some form and exit the program (Hint: in main () the return; statement will cause the program to exit) Identify which slice of cake each person too assuming everyone is greedy and takes the largest slice available (person 1 will take the highest value, person 2 the second highest value etc.) THERE ARE 4 PEOPLE IN TOTAL - 1 slice/person The program should look like this: Please enter sizes of the four slices: 20 30 24 26 Person 1 took slice 2 (30%) Person 2 took slice 4 (26%) Person 3 took slice 3 (24%) Person 4 took slice 1 (20%) I use NX Client and the class name will be cake

Reference no: EM13235296

Questions Cloud

Find is the opportunity cost of attending the concert : If you receive a free ticket to a concert, what, if anything, is your opportunity cost of attending the concert How does your opportunity cost change if miserable weather on the night of the concert requires you to leave much earlier
Write a mips program that loads a value from memory location : Write a MIPS program that loads a value from memory location
Why the economy is experiencing high unemployment : If you were having a conversation with a Keynesian and a Classical economist, and the conversation turned to why the economy is experiencing high unemployment and what the government should do about it
Determine the direction of the fourth displacement : A spelunker is surveying a cave. She follows a passage 150m straight west, then 230m in a direction 45, Use a scale drawing to determine the magnitude of the fourth displacement, Determine the direction of the fourth displacement
Write a java program which compiles and executes : Write a Java program which compiles and executes
What is michelles opportunity cost of producing potatoes : If Michelle devotes all her resources to growing potatoes, she can raise 200 pounts of potatoes per year. If she devotes all her resource to raising chickens she can raise 50 chickens per year. (If she apportions some resources to each
Write the pseudo codes for the following : Write the pseudo codes for the following
What is the charge on the earth : The Earth's radius is 6370 km . There is a downward-pointing electric field in the atmosphere above the Earth's surface, What is the flux of the electric field out of the Earth, What is the charge on the Earth
Use the following formula to calculate a car''s mpg : C sharp Write C# code to prompt a user to enter the number of miles he or she has driven and the gallons of gas used

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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