Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to calculate the current semester's grade point average and the cumulative grade point average of a student. The program should use an

image text in transcribed

Write a program to calculate the current semester's grade point average and the cumulative grade point average of a student. The program should use an input data file to: 1. read the student's six-digit identification number (id), his/her old grade point average (ogpa), and the old number of course credits (occ) 2. read the course credits (c1, c2, c3, c4) and grades (g1, g2, g3, g4) for each of four courses 3. compute: old number of honor points = ohp = occ times ogpa new number of honor points = nhp = c1 times g1 + c2 times g2 + c3 times g3 + c4 times g4 total number of new course credits = ncc = c1 + c2 + c3 + c4 current GPA = cur_gpa = nhpcc cumulative GPA = cum_gpa = (nhp + ohp)/(ncc + occ) The input data file should be created such that id, ogpa, and occ are placed on the first line, c1, c2, c3, and c4 are listed on the second line, and g1, g2, g3, and are listed on the third line: as an example, the input file could contain the following data: All outputs should be written to an output file which has a format exactly like the following

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions