文件名称:ep2
介绍说明--下载内容均来自于网络,请自行研究使用
北京理工大学面向对象程序设计第二次上机习题答案-1. Here is the codes:
#include <iostream>
using namespace std
void main()
{
cout << Hello World!\n
}
Add some codes and get the results as follows:
Initialize
Hello, World!
Clear up
NOTES: Don t modify the MAIN function any way!
2.Define an integer set class which is named Set with some memeber functions as follows:
a. IsExist(): To judge if an integer is a member of a Set or not
b. DeleteItem(): To delete an integer the Set
c. IsEqual(): To judge if two Sets are equal or not
d. Intersection(): To intersection with another Set (交集)
e. Union: To union with another Set. (并集)
NOTES:In order to complement Set class, you can define constructor, member functions with available arguments as well as destrctor if you need.
3.Create a class, IntChar, to archieve an integer to save an string which length is no more than 4.
Suppose that a character length is 1 byte.
For example: ABCD , it s binary form as
#include <iostream>
using namespace std
void main()
{
cout << Hello World!\n
}
Add some codes and get the results as follows:
Initialize
Hello, World!
Clear up
NOTES: Don t modify the MAIN function any way!
2.Define an integer set class which is named Set with some memeber functions as follows:
a. IsExist(): To judge if an integer is a member of a Set or not
b. DeleteItem(): To delete an integer the Set
c. IsEqual(): To judge if two Sets are equal or not
d. Intersection(): To intersection with another Set (交集)
e. Union: To union with another Set. (并集)
NOTES:In order to complement Set class, you can define constructor, member functions with available arguments as well as destrctor if you need.
3.Create a class, IntChar, to archieve an integer to save an string which length is no more than 4.
Suppose that a character length is 1 byte.
For example: ABCD , it s binary form as
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1120141884-刘晶晶\exper2-1.cpp
.................\exper2-2.cpp
.................\exper2-3.cpp
.................\exper2-4.cpp