|
ENGN 38 Lab Programming Assignment #10
|
|
Problem: Start with your Lab #9 and add/modify it according to the following:
1. Find the power produced by the engine by adding the enginePower member function then calling it appropriately. Make sure to modify the output function to print power.
2. Plot the pressure versus time (Bar Plot) by adding the barPlot member function and then calling it appropriately. Make sure that you have clear labels for both the y and x scales, i.e. title and numeric information. See the Example Output.
3. Redefine the power and volume arrays making them dynamic arrays (using pointers).
To turn in: Print out your source code and program output making sure that the formatting is up to C++ standards and professional in appearance. If this does not fit on one page, delete enough so that it does. (Please do not make font size less than 10 points.) What to delete? What to keep? Make sure that you at least have the header as shown in Lab#1 (your student number, your name, the class identifier, the lab number) and the output from your program. As space permits, include any other essentials as you deem appropriate. Make sure that everything is clearly labeled and easy to read and follow. Have this one page ready to turn in by the due date.
|
|
Output Report Requirements (Note Changes)
Engine Analysis Report
Engine ID: Megatech Mark III Model TE1 Serial Number 155
Analysis Date: April 12, 2006
Engine Performance: Speed xxxx (RPM)
Compression Ratio x.x : 1
Pressures Maximum xx.x (psi) Minimum xx.x (psi) Average xx.x (psi)
Power xx.xx (watts)
|
|
BAR PLOT OF CYLINDER PRESSURE
-VS- TIME 3.0|***************************************** 4.4|**************************************************
5.9|********************************************* |
|
|
|
|