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

  Find the moment of inertia

Display a brief description of the program and ask the user to specify the type of loading (end load, intermediate load, uniform load)

  Objective1 to give students practice in calling and writing

objective1. to give students practice in calling and writing their own functions.2. to give students practice in

  Assign passed value to function to return value

Assign passed value to this member and another function to return value. Your main should read the integer from an input data file, and write the output to the output data file.

  Write a function num_digits(n)

C programing, not C++ write a function num_digits(n) that returns the number of digits in a nonnegative integer n.

  Consider implementing subnetting to support three department

Consider implementing subnetting to support three departments within an organization. The three departments P, Q and R need support for 30, 40 and 60 hosts.

  Accept positive and negative numbers in its input sequence

the program must accept positive and negative numbers in its input sequence, and ?nd the largest and smallestof the numbers entered whether they are all positive, all negative, or a combination of both positive and negative.

  Recursive method void printrevers

Write a c language program and I also need executable file for this program - Write a recursive method

  Assume that you are tasked with tracking the orders which

loops and nested loops please respond to the followingbullsuggest one 1 example of a problematic programming situation

  Need to convert this c code to mips

You need to convert this C code to MIPS - The subsequent is a sample output (user input is 2): Enter an integer: 2 The count of the integers that are greater than 2 is: 3 You have to assure the requirements specific in the instruction.

  Implement the appropriate methods for big numbers

You must implement each big number as a List of single digits and you must also set up the template class List based on a linked list (use the sample codes). You will need to define and implement the appropriate methods for big numbers.

  Smallest sequence of numbers in the array

Write a function called sum_smallest_sequence() that accepts an array of  signed  integers and the  number  of items in the array as arguments, and returns the sum of the smallest sequence of numbers in the array.

  Show the restriction range of values from rand

How to write a program to demonstrate the use of random number functions in c++ program. and to show the restriction range of values from rand()using %

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