⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reason.txt

📁 本程序给出了SSD5实验课中Exercise6的参考程序 内附有详细的注释 下载后请仔细参照源代码进行分析 切莫完全搬照
💻 TXT
字号:
							Reason Report
			
1. In the class Category:
		vector<Category*> sub_categories;
   changed into 
		set<Category*> sub_categories;
  The reason: The STL set container stores unique items in an ordered collection, the vector<Category*> stores pointers to   	the sub-categories of each category. so it can be changed.

2. In the class Category:
		vector<int> items;
   changed into 
		set<int> items;
   The reason: The STL set container stores unique items in an ordered collection and the vector<int> stores the unique id    	entification numbers of the advertisements that belong to this category. so it can be changed. 

3. In the class Group:
		vector<Client*> container;
   changed into
		map<string,Client*> container;
   The reason: The STL map container is an associative structure that stores data in key-value pairs. Because each client has    	the only eamil as the key string, so it can be changed into STL map.

4. In the class Client:
		vector<int> offerings;
		vector<int> bids;
   changed into
		set<int> offerings;
		set<int> bids;
   The reason:  The STL set container stores unique items in an ordered collection,and the unique integer numbers of the       	advertisements bid on and the advertisements posted are stored in the private vectors bids and offerings. So they can 	be changed.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -