Program should prompt the user at the beginning

Assignment Help Programming Languages
Reference no: EM13782884

Programming Problems

Follow these instructions for your programming problems:

· You must follow the good programming practices discussed in class. (Remember that in some places the book shows examples that include poor programming practices that are not allowed in this class!)

· You must include appropriate comments in your code.

· For each programming problem, you must create an output text file as discussed in the labs that will show your complete console.

· Be sure that you understand your program completely in English before you try to solve the problem in Java. It helps if you rewrite the problem statement in your own words before you begin coding. Be sure that you think about the explicitly defined information and the implied information from the problem statement.

Modified Milk Problem

Modify the main method in your Milk problem from Homework as follows:

· Be sure to fix any errors in your previous homework.
· The first line of the program after your variables have been declared and initialized should print out Milk Production for Your Name (except use your actual name).
· Use console input and output instead of GUI.
· Be sure to validate your input appropriately.
· The program should prompt the user at the beginning for the number of different milk quantities to evaluate in this one run of the program.
· For any milk quantity that exceeds 25 liters, the profit for each carton of milk increases by 50%.
· For any milk quantity that is lower than 5 liters, the cost for production of one liter of milk increases by 10%.
· The output of the program should be in the format shown below. The program must print out two blank lines between each Quantity of milk evaluated in the run of the program.

Quantity of Milk in liters: 15.85
Cost: $6.02
Profit: $1.08

When you have completed this project run your program for each value of liters of milk listed below. Save all output to a single text file to turn in with this assignment. Remember that your program must work for any numbers that are entered. These are just some samples to use for input to turn in with your homework.

· First run will evaluate the following quantities of milk in liters: 15.85
· Second run will evaluate the following quantities of milk in liters: 75.25, 13.32, 9.8
· Third run will evaluate the following quantities of milk in liters: 100.0, 3.75

Print out a copy of your source code and your output file to turn in with this assignment.

Reference no: EM13782884

Questions Cloud

Create a list of short bulleted phrases showing all details : Rewrite this problem statement in your own words. Create a list of short bulleted phrases showing all details about this problem. This list should include both the explicitly defined and implied details in the problem statement.
Why did you select the six team members you did : Your objective is to individually select a team of six people from the given teammate profiles. Begin by reading "West Coast Transit Company Profile" and "West Coast Transit Team Member Profiles," which are attached in the Topic Materials. Based on y..
New german cinema and italian film-makers : Explain the techniques and the similarities and differences between the French New Wave Cinema and the "Angry Young Man" or "kitchen sink realism" cinema school of Great Britain in the 1960s with the New German Cinema and Italian film-makers of th..
Final assignment on hifsa : It may include explanation and examples from previous experience as well as implications for future application.
Program should prompt the user at the beginning : The program should prompt the user at the beginning for the number of different milk quantities to evaluate in this one run of the program.
Write a response to the given prompt using proper apa style : Write a response to the following prompt using proper APA Style. Prompt: You will watch a short sales presentation for an "As Seen on TV" product.
Three sociological perspectives : Compare the differences among the three major theoretical perspectives in sociology (structural-functionalism, conflict theory, and symbolic interactionism). With which theory and theorist do you find that you share similar views with and why?
Human resourece management questionaire : Which of the following is the difference between training and education?
Lack of standards or the inabilities of the social structure : Anomie is called a lack of standards or the inabilities of the social structure provide certain individuals than necessary to achieve the goals of society.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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