Programming Assignments
This page was last edited on 1/17/11.

All assignments are due at 11:55pm on the day they appear on the schedule.  Absolutely no late work is accepted.

Program 1

Create a program that allows a student to input their grades for the different components of the overall grade for ITFN 1303.  Note:  Your program will need to calculate the average for the homework and programming assignments before calculating the overall average. 

The weights, per the syllbus are:

Using input from the user, the program should calculate the overall numeric average and display it to the user.  Make sure that you format your text to show ONLY two numbers after the decimal. 

Your interface should look similar to the following.  PLEASE NOTE your program should allow for input of 10 Homework Grades and 5 Homework Grades.  The idea is that you should be able to use this tool going forward in the class.

 

Program 2

Create a Calorie Counter program that allows a user to calculate daily caloric needs to maintain his/her weight, using the following rules.  Then, using a loop, allow the user to input values for all meals and snacks.  Each time a meal or snack is entered, the program should display the calories the user has left for the day.

Daily Caloric Needs

Step 1

Determine your basal metabolic rate with the appropriate formula:

Female: 655+(4.35 x weight in pounds)+(4.7 x height in inches)-(4.7 x age in years)
Males: 66+(6.23x weight in pounds)+(12.7 x height in inches)-(6.8 x age in years)

Step 2

Insert your BMR into the appropriate formula to determine daily caloric needs:

You don't exercise: BMR x 1.2
You engage in light exercise one to three days a week: BMR x 1.375
You exercise moderately three to five times a week: BMR x 1.55
You exercise intensely six to seven days a week: BMR x 1.725
You exercise intensely six to seven days a week and have a physically active job: BMR x 1.9



Read more: http://www.livestrong.com/article/79832-count-calories-maintain-weight/#ixzz0q5mJXgR4
 

Daily Caloric Needs

Step 1

Determine your basal metabolic rate with the appropriate formula:

Female: 655+(4.35 x weight in pounds)+(4.7 x height in inches)-(4.7 x age in years)
Males: 66+(6.23x weight in pounds)+(12.7 x height in inches)-(6.8 x age in years)

Step 2

Insert your BMR into the appropriate formula to determine daily caloric needs:

You don't exercise: BMR x 1.2
You engage in light exercise one to three days a week: BMR x 1.375
You exercise moderately three to five times a week: BMR x 1.55
You exercise intensely six to seven days a week: BMR x 1.725
You exercise intensely six to seven days a week and have a physically active job: BMR x 1.9



Read more: http://www.livestrong.com/article/79832-count-calories-maintain-weight/#ixzz0q5mJXgR4
 

Daily Caloric Needs

Step 1

Determine your basal metabolic rate with the appropriate formula:

Female: 655+(4.35 x weight in pounds)+(4.7 x height in inches)-(4.7 x age in years)
Males: 66+(6.23x weight in pounds)+(12.7 x height in inches)-(6.8 x age in years)

Step 2

Insert your BMR into the appropriate formula to determine daily caloric needs:

You don't exercise: BMR x 1.2
You engage in light exercise one to three days a week: BMR x 1.375
You exercise moderately three to five times a week: BMR x 1.55
You exercise intensely six to seven days a week: BMR x 1.725
You exercise intensely six to seven days a week and have a physically active job: BMR x 1.9

 

Taken from:
"Count Calories to Maintain Weight | LIVESTRONG.COM." Http://www.livestrong.com. Web. 6 June 2010.

 

Your interface should look similar to the following.  (NOTE the second line should read BMR).  Extra credit will be considered for added funcitonality.

 

Program 3

Write a program that determines which of 4 geographic regions within a major city (north, south, east, west) had the fewest reported traffic accidents last year.  It should have the following two functions, which are called by main.


Program 4

Create an application that contains a hamburger class. 

Your hamburger class should have five attributes: string bun, int patties, bool cheese, double price, and an array of condiments.

Your constructor should create a single on white with no cheese and no toppings.  Initial price is $1.99.

Your class should include the following methods:

Assume you have two visitors to your burger joint.  Use your creativity to welcome the customers and take their order.  Create an instance of the hamburger for each customer.  Invoke the methods on each instance to customize each customer's burger.  When done, display each user's burger, how it is dressed, and the price.

Extra credit will be considered for especially creative solutions. 
 

Program 5

Complete problem 15.9 from the textbook.  (14.9 if you're using edition 2).  Use arrays to store the costs of the items.  NOTE:  Use the items/prices given to you in the figure provided; not following this direction will result in a 15-point penalty.

Here is a sample of what the program could look like: