Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I need help with this simple C++ program. the program needs to be using just basic code and use an input data file. Thanks

Hello I need help with this simple C++ program. the program needs to be using just basic code and use an input data file. Thanks
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 (cl, c2, c3, c4) and grades (gl, 92, 93, 94) for each of four courses 3. compute: old number of honor points = ohp = oce x ogpa new number of honor points = nhp =cl xgl + c2 x g2+ c3 x g3 + c4 x 34 total number of new course credits = nec = cl + c2 + c3 + c4 current GPA = cur_gpa = nhpce cumulative GPA = cum_gpa =(nhp + ohp)/(nee + oce) The input data file should be created such that id, ogpa, and occ are placed on the first line, cl, c2, c3, and c4 are listed on the second line, and gl, g2, 93, and g4 are listed on the third line; as an example, the input file could contain the following data: 213141 3.2 5 24 4 2 All outputs should be written to an output file which has a format exactly like the following Student ID number: 213141 Previous semesters' credit: Previous semesters' GPA: GPA of current semester: Cumulative GPA: Total credits completed

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_2

Step: 3

blur-text-image_3

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

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions

Question

Identify how culture affects appropriate leadership behavior

Answered: 1 week ago