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

📄 arraydb.h

📁 C++ class and storage
💻 H
字号:
//ECE106 Lab#5//Name: Mo Li//Student#: 995447379//Date:Mar.09,2007#ifndef _ARRAYDB_H#define _ARRAYDB_H#include "studentRec.h"#define MAX_NUM_OF_STUDENTS 1000class studentDB {private:	studentRecord *_arrayDB[MAX_NUM_OF_STUDENTS];	int _next_index;	int probesCount;public:	// the default constructor, creates an empty database. 	studentDB();	// the destructor, deletes all the records in the database.	~studentDB();	// inserts the record pointed to by newRecord into the database.         // If a record with the same student number as newRecord's exists         // in the database, it returns false. Otherwise, it returns true.  	// If database is full, it silently fails.	bool insert(studentRecord *newRecord); 	// searches the database for a record with studentNum, 	// if the record is found, its content will be copied to 	// the searchRecord, and the method returns true. Otherwise	// the method returns false.	bool retrieve(unsigned int studentNum, studentRecord *searchRecord);	// deletes the record with studentNum from the database. If 	// the record was indeed in the database, it returns true.	// Returns false otherwise.	bool remove(unsigned int studentNum);	// deletes all the records in the database.	void clear();	// returns true if there is no record in the database, otherwise,	// it returns false.	bool isEmpty();	// returns true if the database is full, i.e. no further student	// records can be inserted into the database, otherwise, it returns	// false.	bool isFull(); 	// writes the number of probes performed by the last invocation of the	//  "retrieve" method to the standard output.  Look at the assignment	//  specification for the definition of a probe.	void printProbes();	// dumps the content of the database to the standard output (using 	// the "print" method of the studentRecord class), sorted in ascending	// order of student numbers, separated by empty lines. 	void dump();}; //studentDB#endif 

⌨️ 快捷键说明

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