Find maximum velocity and maximum acceleration

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

Purpose: The purpose of this programming assignment is to give the student experience in using functions, arrays, and strings. Arrays will be used to store and process data and the graphing capabilities of Excel will be used to graph results calculated by the C++ program.

Write a C++ program that will accomplish the following:

1. The program should ask the user which data file is to be used (give an example name and path), read the file name as a string, and open the file using a string variable.

2. The program should read the vehicle number, date, and driver as strings. Also read the values of t and x from the file and store them in arrays. Assume that the data files will contain a maximum of 30 (t, x) data points.

3. Define arrays for velocity (in ft/s), velocity (in mph), and acceleration (in ft/s²). Use a separate function to calculate each of these arrays. For example, the function to find velocity in f/s might be called using Velocity (t,x,v,size) where t and x are input arrays, v is an output array, and size is the number of data points in each array.

4. Write a general function that can be used to find the average of any array. Call this function twice in order to find average velocity (in mph) and average acceleration (in ft/s² or ft/s/s).

For example, the function might be called as follows:

Average = ArrayMean(A, Asize); //function call to find mean value in array A

5. Write a general function that can be used to find the maximum of any array. Call this function twice in order to find maximum velocity (in mph) and maximum acceleration (in ft/s² or ft/s/s).

For example, the function might be called as follows:

Max = ArrayMax(A, Asize); //function call to find max value in array A

6. The output of the program should be sent to a data file (the name of the data file should be specified by the user, but give an example name and path). The output should include:

• The test vehicle number
• The test date
• The driver
• The average velocity in mph
• The average acceleration in ft/s/s
• The maximum velocity in mph
• The maximum acceleration in ft/s/s

• Values for time, distance, velocity (ft/s), velocity (mph), and acceleration (ft/s/s) for each of the data points in the input data files.

Reference no: EM13710152

Questions Cloud

Explain disruptive technology and stewardship : Using recent stories about Blockbuster Video, Hollywood Video, Redbox, Netflix and Movie Theaters in general, discuss the effect of disruptive technology.
Interview a local entrepreneur in order to develop insights : What type of person becomes this type of risk taker, what challenges did he or she face and overcome and what failures did this person have?
Manufacturer was interested in comparing male college studen : A cosmetics manufacturer was interested in comparing male college students and male non-students in terms of their usage of hair gel. Random samples of 100 male students and 100 male non-students were drawn in a Midwestern college town.  Each w..
What are the demographic characteristics of your target : Summary Assignment Requirement: 1.What are the demographic characteristics of your target market and why are they important? Describe your market using strong details. 2.Where your target market is located geographically and why is that importan..
Find maximum velocity and maximum acceleration : Find maximum velocity and maximum acceleration - Write a general function that can be used to find the maximum of any array. Call this function twice in order to find maximum velocity and maximum acceleration.
Internal and external marketing strategy : What are the 3 C's (Competitors, Customers, Company) of the Bose Corporation and their internal and external marketing strategy? Include citations for specific information.
What was kodak business/marketing objectives : 1. What was Kodak's business/marketing objectives and how should have the objectives evolve over the last 25 year period? A) What were Kodak's strategy to its objectives? B) What were some tactics that Kodak could have incorporated to be successful?
Reflects the foundation you used to make the decision. : Pick an event or experience in which you had to make an ethical decision. It would be best if it was associated with an IT management scenario. Discuss the process you used in making the decision. What ethical theory best reflects the foundati..
Detailed strategies to recruit and select 20 engineers : Prepare a targeted plan in which you present your detailed strategies to recruit and select 20 engineers to hire within eight months.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Unlike c other programming languages have associative

unlike c other programming languages have associative arrays that allow array indices to be strings instead of just

  A "mynum" class that will read "randfile.txt" file

A "MyNum" class that will read "randFile.txt" file and obtain the 20,000 integer numbers

  Computers have trended to larger word

Since the beginning, computers have trended to larger word sizes, 8 to 16 to 32 and now some 64 bit computers. Explain a pro or a con in a computer with a larger word size, or comment on someone else's pro or con.

  Problems on oops

Problems on OOPS

  Write a programme on credit card number check

Credit Card Number Check. The last digit of a credit card number is the check digit, which protects againsttranscription errors such as an error in a single digit or switching two digits

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Write a pseudocode statement

Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable. is str.add(str1,str2) part of it?

  Translate than c source code

Why does Ada take so much more time to translate than C source code? What phase of the Ada translation takes the longest?

  Use the lengthof the side as a member variable of the class

write a class including four member functions to compute the areas of an equilateral triangle ,square,hexagon and octagon respectively .Use the lengthof the side as a member variable of the class.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Write a recursive algorithm to print all of the subsets

Write a recursive algorithm to print all of the subsets for the set of the first positive integers.

  Writer a program that allows the user to enter an unknown

writer a program that allows the user to enter an unknown number of characters stores those characters in a data

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