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

  Display a year-by-year depreciation schedule

Create GUI screen interface that accepts input and shows output and resize the GUI screen & the list box to best fit the output displayed

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Reads numbers from input and prints them in reverse order

Write a C program that reads ten numbers from input and prints them in reverse order. We assume that the data consists of integers. The program should conform to the following format:

  Write a program that uses a loop to display projected rates

Write a program that will convert US dollar amounts to Canadian dollar (1 CND = 0.92 USD). Format your currency amounts in two decimal places and trailing zeros.

  Prepare a cc program that uses the pthread library to

prepare a cc program that uses the pthread library to create threads and mutexes to synchronize them. the program must

  Monkey business, a local zoo

Monkey Business, a local zoo, wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 7 array, where each row represents a di..

  Display the array, the average and the number of days above

Write a program that stores the daily temperatures for the month of April in an array name dailytemp. Calculate the average temperature for the month and the count the number of days that the daily temperature was above the average.

  Write a complete c program to do the following1 the main

write a complete c program to do the following1. the main program will read in a parameter value n read this in main.

  Template method patern from the strategy pattern

The template method pattern and the strategy pattern both abstract some computation in the form of methods. What de ning characteristic distinguishes the template method patern from the strategy pattern? Explain your answer.

  Write a method insertat that takes four parameters

Write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say insertItem; and an interger, say, index.

  Write a program that allows two players to play a game

Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk ..

  Create a class called vehicle

Create a class called Vehicle that has the manufacturer's name (type String), number of cylinders in the engine (type int), and owner (type Person given below).

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