Create an application that determines miles-per-gallon

Assignment Help C/C++ Programming
Reference no: EM131239339

Part 1: Write, Run, and Observe the Application

Review Hello World!, Variables and Basic IO and create an application that determines miles-per-gallon, if you know the number of miles driven and number of gallons of gas you put in the tank.

Follow these steps to complete Part 1 of your assignment.

1. Access the Toolwire desktop environment via the Toolwire resources in Unit 1.

2. Launch Code::Blocks.

3. Click the following:
- File, New, Project.
- Console Application.
- Go.
- Next.
- C++.
- Next.

4. In the Project Title field, type calcMileage.

5. In Folder to create project in:, click ...

6. In Folder, click Make New folder and type calcMileage.

7. Click the calcMileage folder.

8. Click OK.

9. Click Next.

10. Click Finish.

11. Open the main.cpp file under Sources.

12. In the editor, type the following calcMileage application, using this template.
#include <iostream>

using namespace std;

int main()
{
int miles;
int gallons;
float mpg;

cout << "Enter miles: ";
cin >> miles;
cout << "Enter gallons: ";
cin >> gallons;
mpg = miles / gallons;
cout << "Miles per gallon: " << mpg;
return 0;
}

13. Click Build, Build and Run.

14. Enter the number of miles.

15. Enter the number of gallons.

16. Observe the results.

17. Assignment Overview

18. For this assignment, you will write your first C++ application, called calcMileage. The goal of this program is to determine miles-per-gallon based on the number of miles driven and the number of gallons of gas you put in the tank. You will use the Code::Blocks software to write this application. Access this software via the Toolwire virtual desktop activity link in this unit.

19.

20. Assignment Instructions

21. Part 1: Write, Run, and Test the Application

22.

23. Use the code in the Unit 1, Part 1 Assignment Instructions document linked in the Resources to complete this part of your assignment. Be sure to test the application with a variety of values before you proceed to Part 2. The program produces accurate results with some numeric values but not with others. Note when the results are accurate and when they are not.

24.

25. Part 2: Improve the Application

26.

27. Based on the material in the study, modify the code to fix the accuracy problem. Be sure to comment and format the code.

28.

29. Part 3: Describe the Application

30.

31. After running your application and observing the results, write a 1-2 page paper in which you complete the following:

32.

33. Define the variables in an application.

34. Define the expressions in an application.

35. Explain the data types in an application.

36. Discuss the cause of the inaccuracy in the original code and the approach used to fix the problem.

37. Ensure that your writing is professional and consistent with the standards and conventions of the IT community.

38.

39. Submit both the .cpp source code file and the Word document with the paper.

40.

41. Submission Requirements

42. Refer to the Variables, Expressions, and Data Types Assessment Scoring Guide to ensure that you meet the grading criteria for this assessment.

43.

44. Your completed assignment should include the following:

45.

46. Demonstrate the ability to apply math in a program.

47. Define the variables in an application.

48. Define the expressions in an application.

49. Explain the data types in an application.

50. Communicate effectively in a business environment.

When complete, compress your C++ program into a ZIP archive and submit your archive in the assignment area.

Be sure to name your archive using the following format IT3348_u01a1_FirstName_LastName.zip

Part 2: Branching, Logic, and Functions

Resources
- Branching, Logic, and Functions Scoring Guide.

Assessment Context
By successfully completing this assignment, you will demonstrate your proficiency in the following course competencies and objectives:
- Competency 1: Define business problems that can be solved using basic programming concepts and standards.
o Define the requirements for an application.
o Describe the stakeholders needed to further define an application.
o Describe the ethical issues relevant to an application.
Competency 2: Analyze intermediate object-oriented programming.
o Analyze the behavior of basic, procedural-based programming constructs.
o Explain how an application works.
Competency 4: Design a program that applies intermediate programming concepts and constructs.
o Write a program that applies basic data structures.
Competency 5: Communicate effectively.
o Communicate effectively in a business environment.

Assignment Overview
For this assignment, you will write a C++ application called calcPay for a financial company. The goal of this program is to determine gross pay for a 4-week pay period based on an hourly rate and the number of hours worked in each week of the pay period. Anyone working over 40 hours a given week earns time-and-a-half. You will use the Code::Blocks software to write this application. Access this software via the Toolwire virtual desktop activity link in this unit.
Assignment Instructions

Part 1: Write the Application

Write a C++ console application that asks the user to enter the hourly wage and number of hours worked for each week in a 4-week pay period. Create a custom function with appropriate input parameters and return type that calculates the total gross pay based on the values entered by the user. Use suitable loops for the user input and the processing of data entered by the user. The program should print out the gross pay for the pay period for the employee.
Part 2: Describe the Application
Write a 3-5-page paper in which you complete the following:
- Define and document the requirements for the calcPay application.
- Describe the stakeholders needed to help further define the application.
- Describe a collaboration plan for working with stakeholders.
- Analyze the behavior of basic, procedural-based programming constructs.
- Define the functions you have used in your application.
- Define the IF statements you have used in your application.
o Explain how the IF statements work.
Define the loops you used in your program.
o Explain how the loops work.

Explain how your application works and any issues you encountered with the application.

Include a screen shot of your application, using the Print Screen function, to show that your application works.

Submit both the source code file(s) and the Word document with the paper.

Submission Requirements

Refer to the Branching, Logic, and Functions Assignment Scoring Guide to ensure that you meet the grading criteria for this assignment.
Your completed assignment should include the following:
- Write a program that applies basic data structures.
- Define the requirements for an application.
- Describe the stakeholders needed to further define an application.
- Describe a collaboration plan for working with stakeholders.
- Analyze the behavior of basic, procedural-based programming constructs.
- Demonstrate the ability to apply math in a program.
- Explain how an application works.
- Communicate effectively in a business environment.

When complete, compress your C++ program into a ZIP archive and submit your archive in the assignment area. Be sure to name your archive using the following format IT3348_u02a1_FirstName_LastName.zip

Verified Expert

This part of the assignment is indented to learn about the data types, variables associated with a C++ program also the procedure to compile and run a code in code blocks compiler The assignment is to develop an application to compute the total wages of employee in a month that is four weeks by computing the weekly wages separately The user defined function is used to compute the weekly wages. An “if-else” condition check is used to handle the extra hour wage computation by using the given constraints and rules. A “for” loop is used to compute the four week wages separately and to perform the addition to perform the four week total wages.

Reference no: EM131239339

Questions Cloud

What are the most prominent signs that abc methods : What are the most prominent signs that ABC methods might be appropriately applied to product costing for an automobile manufacturing company
Determine the value of the firm : A firm's current profits are $900,000. These profits are expected to grow indefinitely at a constant annual rate of 2 percent. If the firm's opportunity cost of funds is 4 percent, determine the value of the firm:
The range of relative wage between country : Comparative advantage of each country. the range of relative wage between country A and B:WA/(WB*E). Labor hours required to produce S or T in country A and B: Suppose that there are 20,000 hours of labor available in country A, and that 5 hours of l..
Find the optimal size of the pipe and the amount of fluid : The pumping cost is given by (300Q2 /D5). Find the optimal size of the pipe and the amount of fluid handled for minimum overall cost.
Create an application that determines miles-per-gallon : Create an application that determines miles-per-gallon, if you know the number of miles driven and number of gallons of gas you put in the tank - The goal of this program is to determine miles-per-gallon based on the number of miles driven and the..
Execute sqp code and observe the sensitivity of convergence : Using different initial guesses for the design variables, execute the SQP code and observe the sensitivity of the convergence.
Annual growth rate over the next : If China's economy maintains a 7% annual growth rate over thenext 20 years, about how large will its economy be in 20 years ifits current GDP is $12 trillion?
Summarize the business research project or article : Identify a business research project in your own business or locate a business research article related to a business in the same industry. Summarize the business research project or article. Determine the potential unethical research practices that..
Give the formula for the conjugate acid : Like H2O, HCO3- is amphoteric. (a) Give the formula for the conjugate acid of HCO3-.(b) Give theformula for the conjugate base of HCO3-.

Reviews

len1239339

10/12/2016 2:54:13 AM

I need help with this c++ assignment please.Be sure to comment on week - When complete, compress your C++ program into a ZIP archive and submit your archive in the assignment area. Be sure to name your archive using the following format IT3348_u02a1_FirstName_LastName.zip - When complete, compress your C++ program into a ZIP archive and submit your archive in the assignment area. Be sure to name your archive using the following format IT3348_u01a1_FirstName_LastName.zip

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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