Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Assignment.

With Summer just around the corner, you've decided you want to get healthier. To help you with this goal, you decide to build a calorie tracker that will help you track your daily net caloric intake factoring in your calorie intake (number of calories you've eaten) and outtake (number of calories you've burned off from exercise) in one day.

Since you love walking, jogging, and running, you limit the types of exercise you will perform to one of these options:

For you, walking burns approximately 314 calories per hour
For you, jogging burns approximately 557 calories per hour
For you, running burns approximately 861 calories per hour

Create a modular program that will continuously prompt for the calorie count of each food item eaten today until the user indicates they are finished entering food item calorie counts. For example, if the user ate a slice of bread followed by a banana, they would enter 110 calories and then 105 calories. (Note: When running the program, you as the student will make up the number of calories for each food item eaten). The user must have eaten at least four food items and the program must enforce this.

Upon completion of entering all food item calorie counts for the day, the program should prompt the user to enter the type of exercise they performed for the day and the number of hours the exercise was performed. The type of exercise must be one of the options listed above, or no exercise at all, since the user might decide to take a break from exercise for the day. When exercise is performed in a given day, it is limited to only one type of exercise, performed once.

Finally, the program will print a well formatted report, detailing the total number of calories eaten, the total number of calories burned off, the net caloric intake (total number of calories eaten - total number of calories burned off), and feedback for the day based on the following rules for net caloric intake:

When the net caloric intake is less than 1200 calories, "That's Dangerous! You need to eat more per day." must appear
When the net caloric intake is between 1200 calories and 2000 calories, inclusive, "Good job! Keep up the good work." must appear
When the net caloric intake is more than 2000 calories, "Oops, you went a little over. Try again tomorrow." must appear

Other Requirements:

Your solution must contain one or more arrays or ArrayLists.
Your solution must demonstrate a modular design using modules.

You must validate all data input by the user. Whenever an invalid piece of data is entered, you must display an error message and re-prompt the user.

Programming Assignment 7: Solution Design

Create a defining diagram that shows the input, processing, and output

Create a structure diagram/hierarchy chart grouping processes from the defining diagram into modules (You need to do this, but you do not need to turn it in as part of the grade)

Create a modular solution algorithm using pseudocode

Show testing using the desk checking table method, to include test data, expected results, and a desk checking table. Make sure your desk checking considers multiple cases including both valid and invalid test data to prove your algorithm will work

Upload a Word document containing only items above to Blackboard.

Full points will be awarded for an accurate, efficient, complete defining diagram, solution algorithm, and desk checking table. Partial credit is available.

Programming Assignment 8: Solution Implementation

Write a well-documented, efficient Java program that implements the algorithm you identified. Include appropriate documentation as identified in the documentation expectations document.

Note: You may not use the Scanner or System classes for input/output. You must use the JOptionPane class. Additionally, you may not use System.exit, or any variant that exits the program in the middle of the program. The program should only exit once the algorithm has finished completing.

Upload the .java file of the final program to Blackboard. Be careful that you do not submit a .class file instead of a .java file.

Full points will be awarded for an accurate, efficient, complete Java program that compiles using jGrasp. Partial credit is available. Any final program that does not compile, for any reason, will receive an automatic zero. Other IDEs often place in additional code that you are unaware of, doing too much of the work for you. You are strongly discouraged from using IDEs other than jGrasp.

Java, Programming

  • Category:- Java
  • Reference No.:- M92026875
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Java

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As