1. Trang chủ
  2. » Công Nghệ Thông Tin

CBasic exam practice opt1

2 233 2

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 2
Dung lượng 61,02 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Mark Calculator Test topic: C/C++ Practice Exam question number: #1 Time: 3 hours We need a program to help teacher calculate the average mark of trainee in class as followings: 1.. Cr

Trang 1

Mark Calculator Test topic: C/C++ Practice Exam question number: #1 Time: 3 hours

We need a program to help teacher calculate the average mark

of trainee in class as followings:

1. Create data file in plain text format including fields: Trainee’s Name,Math,Lite,Eng,His and Phy Require at

least 15 records (1 mark)

For example:

2. Write a C++ program to do:

- Load content of data file to array of trainee pointers (3 marks)

For example:

Trang 2

- Show program menu (1 mark)

Note: You should validate input when use press

‘1’,’2’,’q’ or‘Q’ Otherwise, program displays error

message “Please choice ‘1’,’2’,’q’ or ‘Q’”.

- Display mark table (print all trainees of data file that loaded in to memory) (2 marks)

- Display top 5 trainees by average mark The average mark

= (Math + Lite + Eng+ His +Phy)/5 (3 marks)

For example:

Common requirement:

- Using pointer to store each record in the memory You have to release allocated resource after use (free memory when program terminal)

- Deliverable including binary (execute file), source files

and data file (in ZIP format)

Ngày đăng: 07/05/2015, 08:38

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w