回分類題庫
d223: 101OOP Lab Exercise: Student Class
出處:

Difficulity : 1
Accepted : 71 Times | Submit :264 Times | Clicks : 1499
Accepted : 54 Users | Submit : 56 Users | Accepted rate : 96%
Time Limit :10000 ms | Memory Limit : 32001 KBytes
題目加入時間 : 2012-10-08 17:44

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 concetrate 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
Iris,101753001,101753001@nccu.edu.tw,09xx-xxxxxx
Orange,101753005,101753005@nccu.edu.tw,09xx-xxxxxx
1
Pandia,98753003,98753003@nccu.edu.tw,09xx-xxxxxx

Sample Output :

Student Name: Iris
Student ID: 101753001
Email: 101753001@nccu.edu.tw
Phone: 09xx-xxxxxx
Student Name: Orange
Student ID: 101753005
Email: 101753005@nccu.edu.tw
Phone: 09xx-xxxxxx
Student Name: Pandia
Student ID: 98753003
Email: 98753003@nccu.edu.tw
Phone: 09xx-xxxxxx

Hint :


  

Author :


  Solve it!   Status Forum (0)

C++
C
JAVA
49507. CC501 (180 ms , 218KB)
41459. oop99208022 (484 ms , 2862KB)
41113. oop100703007 (556 ms , 2802KB)
41219. oop100703014 (593 ms , 3520KB)
41222. oop100703013 (600 ms , 3526KB)
沒有解題記錄 52119. nwgs524513cja (436 ms , 10080KB)

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