ممكن المساعدة وانا اسف على طرح الموضوع مرة اخرى ولكن اللاهمية
Write a C++ program for calculating a yearly debit for a list of students. The program starts by reading from an input file “student.dat” into an array of structures. The intput file constructs of a list of student records each containing student name (first name followed by last name separated by a space), an ID (integer), and Basic Debit (float). The program should then print in an output file “Student.out” a list containing for each student the name, the ID, the Basic Debit, Discount Debit, and the Yearly Debit. The Discount Debit and the Yearly Debit are calculated as follows:
· The Discount Debit is 20% of The Basic Debit.
· The Yearly Debit is the subtraction of (The Basic Debit and The Discount Debit) Multiplied by 12.
The following example shows how your input and output files should be formatted:
Example of an Input File “Student.dat”:
Nehad Al-Amri # 6660 100
Hamza Al-Saadi # 5552 80
Basil Al-Hinai # 1234 60
Example of an Output File “Student.out”:
NAME ID BASIC DEBIT DISCOUNT DEBIT YEARLY DEBIT
------------------------------------------------------------------------------------------------------------------------------------
Nehad Al-Amri 6660 100.000 20 960.000
Hanaa Al-Saadi 5552 80.000 16 768.000
Adil Al-Hinai 1234 60.000 12 576.000
1. Write the algorithm in pseudocode
2. Use C++ to code your solution and submit to the Lab instructor
i. a hard copy of your program and,
ii. an electronic copy on a floppy disk.
Put a label on the disk containing your name and student number. Your program file on the floppy disk should appear under the name “hwk6.cpp”.
0.5 1.0 1.5 2.0 3.0 4.0 5.0
Algorithm: Pseudocode
Programming Style: Indentation, Naming, Comments
Data Types
Correctness
User Interface: Input/Output