回分類題庫
d235: 102OOP Lab Exercise: Student Class
出處:

Difficulity : N/A
Accepted : 50 Times | Submit :182 Times | Clicks : 1241
Accepted : 49 Users | Submit : 51 Users | Accepted rate : 96%
Time Limit :10000 ms | Memory Limit : 64000 KBytes
題目加入時間 : 2013-10-06 21:54

Content :

The Student Class records a student name, a studentID, a Email, a PhoneNumber.

Print the result after a set of data is input.

Your task is to write: Main.cc, Student.h, Student.cc in C++.

Student.h /Student.cc are the definition and implementation of class Student. Please concentrate on Object Oriented Concepts such as Encapsulation.

Main.cc is the implementation of handling input, string tokenization...etc. Adding some functions is always a good idea.

Input :

There are several sets of test data.

For each set of data, the first line is an integer N indicates the number of the Student.

The following N lines, each line is a record of a student.

Each record of student is consist of four inputs separated by comma.

The syntax is : Name,StudentID,EMail,PhoneNumber

Output :

Please refer to sample output. No explanation.

Sample Input :

2
Koba,102753002,102753002@nccu.edu.tw,0912-345678
Co,102753004,102753004@nccu.edu.tw,0910-222444
1
Sara,101501010,101501010@nccu.edu.tw,0998-765432

Sample Output :

Student Name: Koba
Student ID: 102753002
Email: 102753002@nccu.edu.tw
Phone: 0912-345678
Student Name: Co
Student ID: 102753004
Email: 102753004@nccu.edu.tw
Phone: 0910-222444
Student Name: Sara
Student ID: 101501010
Email: 101501010@nccu.edu.tw
Phone: 0998-765432

Hint :


  

Author :

(管理員:oopTA)

  Solve it!   Status Forum (0)

C++
C
JAVA
47863. oop101703028 (4 ms , 442KB)
47842. oop101703049 (4 ms , 430KB)
47671. oop101703006 (4 ms , 418KB)
47620. oop101703012 (4 ms , 426KB)
49659. oop99703007 (6 ms , 420KB)
88037. wayne861116 (8 ms , 218KB)
50810. nwgs524513cja (82 ms , 166KB)
52120. nwgs524513cja (106 ms , 158KB)

執行時間會受很多因素影響因此僅供參考,主機等級請看這裡