The unexpected
May 17, 2020
Video Evaluation 1: The Immigration Battle
May 17, 2020
Show all

Coding Hw

Hi, I need help with my project 5, and this is the instruction for Project 5 and Project 4.
I do not have the coding for Project 4 but I will provide the instructions and the file for Project 4.
I just need the complete Project 5 by 5pm, April 2nd. Thank you.

-PROJECT 5
Pointer-based Project Upgrade

Rewrite your project 4 so that it uses pointers and performs the following tasks
Opens the data file, reads the data and counts the number of items, closes the file.

DO NOT STORE THE DATA – it will be read into an array later.
Dynamically allocates an array sized exactly to fit the number of items in the data file.
Calls a function to read data into the array by reopening the file.
Performs all functions exactly as Project 4 did using pointer arithmetic rather than array element indexing in each case.

Special Notes:
Do not use .eof() to read in the file. Use the extraction operator >> instead.

Exemplary Credit (10/10)
-No array-element indexing or use of subscripts.
-Add pre- and post-condition comments for each function

Satisfactory Credit (7/10)
-Program meets all basic requirements.
-Computations must be correct
-Fully comment your code. Put a block of comments at the top of your program that give a title for your lab, your name, lab section, and a brief program description.
-In your program use line comments to explain what various lines or parts of your program do.

-PROJECT 4

Write a program to read housing prices and calculate the mean and standard deviation. The data for this project comes from this file: prices.txt (attached below)

Exemplary Credit (10/10)
-Program sorts data in descending order (using a function)
-Program calculates the median (using a function)

Satisfactory Credit (7/10)
-Program uses a function to read data into an array from data file
-Program calculates mean and standard deviation (each a separate function)
-Computations must be correct

-prices.txt

150000
250000
135000
450000
332000
221000
100000
340000
765000
200000
150000
50000
255000
175000
3000000
235000

Leave a Reply

Your email address will not be published. Required fields are marked *