Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ please! Submission: Upload a zip file containing your plagiarism form, source code, input file and output file to My Elearning by the deadline.

In C++ please!
image text in transcribed
image text in transcribed
Submission: Upload a zip file containing your plagiarism form, source code, input file and output file to My Elearning by the deadline. Name your source file your ID Number+Assignment number e.g. 816006900_ASGI. ENSURE THAT THE CORRECT FILES ARE SUBMITTED. Wrong file submission count as no submission. The plagiarism form must contain your signature. Your name and ID must be in the source file (.cpp file) No late assignments will be accepted. Problem 1. A file, course.txt, has data for students in two tests. Each line of the file, except the last contains a student ID number (integer) followed by the marks scored in COMP3275 (Wireless and Mobile Computing) and COMP 3150 (Computer Networks) respectively. All marks are in integer format. Data is terminated by a line containing -1 only. Sample data line: 9285 58 87 The above line means that student 9285 scored 58 in COMP3275 and 87 in COMP3150. Write a program to read the data from the file and generate the following output, which is written to a file, A1_ID.txt eg A1_816006900.txt All output is also printed to the screen. The number of student ID numbers in the file. Note that I should not be counted. The highest mark obtained in COMP3275 and the highest mark in COMP3150. The lowest mark obtained in COMP3275. The average mark obtained in the course COMP3150. 5. A listing of each student number together with the mark obtained in COMP3150 as well as the difference of each COMP3150 mark from the average. The difference is calculated as (COMP3150 mark - average COMP3150 mark). E g. if the COMP3150 mark is 89 and the average COMP3150 mark is 54. Then you calculate (89-54) = 35 Your program should use only variables that refer to memory addresses, except those which refer to the input and output file streams. This means that you must create all the memory locations required by the program, except those that refer to file streams (which can simply be declared). NB: You do not need to use an array to do (5). Simply read from the input file a second time. 2. 3. 4. [PTO) Use the following data for the course.txt file. 89 87 43 50 5345 8765 7653 7321 1246 1258 2349 2346 2367 2388 - 1 67 90 88 50 67 78 65 34 65 56 68 95 54 22 41 71 1. 2. 3. Mark Scheme The number of student ID numbers in the file. [2] The highest mark obtained in COMP3275 and the highest mark in COMP3150. [2+2=41 The lowest mark obtained in COMP3275. 121 The average mark obtained in the course COMP3150.121 A listing of each student number together with the mark obtained in COMP3150 121 as well as the difference of each COMP3150 mark from the average. 141 4. Other Marks Demonstrated a knowledge of pointers and memory addresses 141 Note: If the program does not compile e.g. syntax errors, or there are major logic errors, the maximum mark awarded is 7 in total. TOTAL MARKS ASG 1= 20 marks Important Your program must not prompt for any data. It must run through seamlessly when executing, There is a penalty for prompting

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago