1928: Book_TextBook_Novel
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:38
解决:28
题目描述
define a Book class,which contains three data fields: ISBN 、name and price;
define a TextBook class and Novel class by extending Book class ,respectively,TextBook has a new data field: discipline,Novel has two new data field: type and sales
输入
there are many cases, for each case,input a character 'T' denoting a TextBook or 'N' denoting a Novel,
输出
output the information of the TextBook or the Novel as required
the price has one decimal
for novel,if the sales is beyond 100,the output is a little different
样例输入 复制
N 968889701120 living 36.5 literature 100
T 968889701122 JAVA 57.9 computer
T 968889731122 theoryOfInformation 45 communication
N 968889701404 Harry 100 fiction 10089
样例输出 复制
The literature Novel:968889701120 living 36.5, sales 100
The computer TextBook:968889701122 JAVA 57.9
The communication TextBook:968889731122 theoryOfInformation 45.0
The fiction Novel:968889701404 Harry 100.0, sales well, 10089