Student Expense Database Documentation
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Programmer Kejian Jin
Course CS32 5C
Project final project for CS32
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
User documentation
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1. Program Purpose
Design, implement in C++, and test a binary search tree database for tracking, profiling, and analyzing student
expenditures. Nodes of the tree are objects representing students, and each student has a list of expenditures.
Users have the ability to (1) add or delete student records and (2) make queries regarding the database.
Queries are saved separately, so that they can be re-used to build up complex queries from simpler ones; this is
explained below. During execution of the program, both the student database and the queries are stored in main
memory (RAM). When the program begins, an initial student database can be read from a user-specified file,
and before the program ends, a user may save the database to the same file or to different file. Queries can
similarly be read from and written to user-specified files.
2. Capability
This project is able to meet the requirement of Project specification of
CS32 class. Basically, it is a database with Dos console interface. The
operation of database is implemented by using Binary search tree. These
operations are delete, find,insert, initilize, fileI/O, query the student.
There are two modes: student mode, and query mode. Student mode is just
database for student. Query mode is the query for student which help user
to find out a specific group of students from student database.
3. Limitation
1. In Compound query: when you enter an expression. For getting input from
screen, do not put # at the end because it only takes one line input.
for postfix expression, but for input from file, you must put # at the end,
otherwise will cause error
2. The name of user can only be one line(<80). It can not specify
first name and last name, any character could appear in name field.
3. There are a lot of warnings.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Required form of input data
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
With two exceptions, all data files for students and queries contain
records stored in the following format. Each record consists of a sequence
of fields, each on its own single line of the file. Successive records
are separated by exactly one blank line. Fields in the same record are
not separated by any blank lines.
The exceptions are the following.
A student's list of expenditures may occupy arbitrarily many consecutive
lines. However, every list of expenditures must end with a zero sentinel
and, unless it is part of the last record in the file, it must also be
followed by one blank line.
A compound query may span arbitrarily many consecutive lines. Therefore,
each compound query's postfix definition must be terminated by a # sentinel
when stored in a data file. The # sentinel should also be required for
postfix expressions entered by users at the keyboard, and users should be
reminded of this every time they opt to create a compound query.
Each field of a record is preceded by a label consisting of the field
name and a colon sentinel (:). Unrestricted query fields have no data,
but the label is still present and occupies one line. The number of
empty fields required by a simple query is 7, some of which may contain no data.
The number of fields required by a compound query is 3, all of which must contain data.
Sample file input:
BRUIN, JANE A.
E
P
3.72
4.32 F 3.61 A 34.98 E 5.08 F 12.63 M
112.79 A 72.89 F 33.65 M 0
KIM, KIMBERLY Q.
L
F
2.08
7.12 F 8.61 E 34.98 E 5.00 F 18.63 M 0
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expected output
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The program takes these inputs and insert to binary Search tree.
It could do any database operations that specified in project requirement.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Important:
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Implementation (system) documentation
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Algorithm:
Data structure: Binary Search Tree
Database: Student record database
Operation of Database:
I INITIALIZE
A ADD
R REMOVE
F FIND
Q QUERY
MorH HELP MENU
S SAVE
T TERMINATE
Algorithm overview for user interface
DisplayLongStudentMenu();
while(exitflag==0)
{
take user_input
switch(user_input)
{
I: InitializeStudent();
DisplayShortStudentMenu();
break;
A:AddStudent();
DisplayShortStudentMenu();
break;
R:RemoveStudent();
DisplayShortStudentMenu();
break;
F:FindStudent();
DisplayShortStudentMenu();
break;
Q:QueryMode();
DisplayLongStudentMenu();
break;
M or H: DisplayLongStudentMenu();
break;
S: SaveStudent();
DisplayShortStudentMenu();
break;
T: exitflag=1;
break;
default: DisplayLongStudentMenu();
break;
QueryMode function in Database will look like this:
DisplayLongQueryMenu();
while(exitflag==0)
{
take user_input
switch(user_input)
{
I: InitializeQuery();
DisplayShortQueryMenu();
break;
C or A:AddQuery();
DisplayShortQueryMenu();
break;
R:RemoveQuery();
DisplayShortQueryMenu();
break;
F:FindQuery();
DisplayShortQueryMenu();
break;
E:EvaluateQuery();
DisplayShortQueryMenu();
break;
M or H: DisplayLongQueryMenu();
break;
S: SaveQuery();
DisplayShortQueryMenu();
break;
T: exitflag=1;
break;
default: DisplayQueryMenu();
break;
}
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Algorithm:
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Start of Algorithm
Student mode:
I INITIALIZE
A ADD
R REMOVE
F FIND
Q QUERY
MorH HELP MENU
S SAVE
T TERMINATE
Display menu, wait for command.
if it is right command do
if initilize, ask for user input file and read it from
file and insert to binary search tree for student
if add , sequence prompt for user input information about student
if remove, remove the student from binary search tree
if Find, find student in BST, if not, output error message
if Query, goto query mode
if Help : display the menu
if Save : save student to file
if terminate: terminate the program
else continue
Query Mode
I INITIALIZE
CorA CREATE QUERY
R REMOVE
E EVALUATE
F FIND
MorH HELP MENU
S SAVE
T Exit
Display menu, wait for command.
if it is right command do
if initilize, ask for user input file and read it from
file and insert to binary search tree for query
if add , sequence prompt for user input information about query
if remove, remove the query from binary search tree
if Evaluate, evalute the query by search through BST of student
if Find, find student in BST, if not, output error message
if Help : display the menu
if Save : save query to file
if terminate: terminate the program
else continue
//end of algorithm
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This program is designed and programmed by kejian Jin
All right reserve to CS32 class, intructor and grader
This is under GNU public licience.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Design in Details
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class Query:
Description: Query of Database
Attribute:
char college[2]; // E or L
char classlevel[5]; // F, P, J, S or G
double GPAup; // upbound
double GPAlow; // low bound
char type[4]; // F,A,E,M only expense type
double TAup; // upbound of Type amount
double TAlow; // lower bound
char qname[80];
char modetype; // C or S compound or simple mode
String definition; // logical operation
List<Student> result;
public:
// get Query
Query():studentfound(0),rtype(0)
Query(int rt)
Query (const Query & L)
Query(char mtype,char* n, char col[], char cla[], double gu, double gl, char t[], double au, double al)
Query(char mtype,const char* n,String def)
void setQuery(char mtype,char* n, char col[], char cla[], double gu, double gl, char t[], double au, double al){
void setRQuery(char mtype,char* n, char col[], char cla[], double gu, double gl, char t[], double au, double al,List<Student> L){
void setRtype(){ rtype=1; }
int isResultType(){ return rtype; }
String getExpression(){ return definition; }
int foundStudent()
// evaluate
int evaluateStudent(Student s); // add matched student in result
int evaluateme(BinaryNode<Student>* T);
int evaluate(BinaryNode<Student>* T);
List<Student> getResult(){ return result; }
List<Student>& Query::getResultList(BinaryNode<Student> * T);
char getMode() { return modetype; }
// overloading
int operator>(const Query & st);
int operator<(const Query &st);
int operator!=(const Query &Rhs);
int operator==(const Query &Rhs);
friend ostream & operator << ( ostream & Out, const Query & st );
const Query &Query::operator=( const Query &Rhs);
const char* getName(){ return qname; }
// getting the input and parse the input on the way
void initialize();
void toUpper(char* &str);
void displayQ();
};
class Initq{
Description: get Query from file and parse it, get every token back.
// attribute shall be the same as query
InitQuery(SearchTree<Query>* &qt):errorflag(0){
initQuery(qt);
}
// tokens parse
int getCharToken(char* str);
int getNumToken(char* str,double bound[]); // size of two
void displayQ();
int getCollege(char* str);
int getClasslevel(char* str);
int getType(char* str); // expense type
int getAmountRange(char* str); // expense type
int getGPA(char* str);
};
// get Query from input and parse all possible error
class GetQ{
// same attribute as query, and query object that will be pass back
// after it was done if everything is ok
// methods and parser functions
int getQuery();
int getCompoundQuery();
int getCharToken(char* str);
int getCollege();
int getClasslevel();
int getType(); // expense type
int getGPA();
int getNumToken(char* str,double bound[]); // bound size of two
int getAmountRange();
void toUpper(char* &str);
void initialize();
};
// ExpenseNode class have amount, type which is a node of Expense class
class ExpenseNode{
private:
double amount;
char type;
public:
ExpenseNode(double a=0,char t=0){ amount = a; type = t; }
friend ostream & operator<<(ostream & out, const ExpenseNode & ex);
int operator ==( const ExpenseNode & Rhs );
int operator !=( const ExpenseNode & Rhs );
double getAmount(){ return amount; }
};
// expense class have expensenode which has amount and type
class Expense{
public:
Expense(){}
Expense(char* c){ createLists(c); }
Expense(List<ExpenseNode> ex){ expend = ex; }
int createLists(char* exp);
void getLists(double a[],char t[],int index);
double getTypeTotal(char type);
double getTypeAmount(char type[],int num);
List<ExpenseNode> getExpense(){ return expend; }
const Expense & operator=(const Expense &E){
friend ostream & operator<<(ostream & out, const Expense & ex);
private:
List<ExpenseNode> expend;
};
class Student {
// description: Student node in tree
// student has all the attribute it needs and overloading operator
private:
char name[NAMESIZE];
char college; // E : schoold of engineering L: letters and Science
char classlevel; // F(freshmen) P(sophomore) J(junior) S(senior)G(graduate)
double gpa;
// linked list of expenditure
Expense expend;
void toUpper(char* &str);
public:
Student(){}
Student(char* n,char col, char clevel,double g, char* exp):mark(0){
void setStudent(char* n,char col, char clevel,double g, Expense exp){
void unMark(){ mark = 0; }
void evalQueryStudent(Query Q,int mode); //0 nothing, 1 or, 2 and 3 not
char* getName(){ return name; }
char getCollege(){ return college; }
char getClasslevel(){ return classlevel; }
double getGpa() { return gpa; }
Expense getExpense(){ return expend; } // will it make a copy of expend, or no??
int isMarked(){ return mark; }
void putStudent();
friend ostream & operator << ( ostream & Out, const Student & st );
// overloading
int operator>(const Student & st);
int operator<(const Student &st);
int operator!=(const Student &Rhs);
int operator==(const Student &Rhs);
const Student& operator=(const Student &Rhs);
};
// get student from user input
// parse all errors that may occurs
class GetS{
public:
GetS():succeedflag(0){
const Student& getS(){
int getStudent();
void toUpper(char* &str);
int isSucceed(){ return succeedflag; }
private:
// all attributes that Student have
// and a student object, will be parse after it done
int succeedflag // flag to test error
};
// database search tree, have binary search tree operation that may apply to
// this project assume if every node have name attribute
class SearchTree
{
public:
SearchTree( ) : LastFind( NULL ), Root( NULL ),existflag(0) { }
~SearchTree( ) { FreeTree( Root ); }
// methods
int Insert( Etype & X );
int Remove( const Etype & X )
int RemoveMin( )
// Return minimum item in tree. If tree is empty, return ItemNotFouud
const Etype & FindMin( ) const
const Etype & FindMax( ) const
const Etype & Find( const Etype & X )
int IsFound( const Etype & X )
int WasFound( ) const
void MakeEmpty( )
virtual int IsEmpty( ) const
const BinaryNode<Etype> *GetRoot( ) { return Root; }
void displayTree(BinaryNode<Etype>* T,ostream & Out);
void displayTree(BinaryNode<Etype>* T);
void display(){ displayTree(Root); }
void saveTree(fstream & Out){ saveTreeIn(Root,Out); }
void saveTreeIn(BinaryNode<Etype>* T,fstream & Out);
int RemoveByName( char* name, BinaryNode<Etype> * & T );
int RemoveStudent( char* name){ return RemoveByName(name,Root); }
int RemoveQuery( char* name){ return RemoveByName(name,Root); }
int match(const char* searchstr, const char* str);
int FindByName( char* name, BinaryNode<Etype> * T );
int FindStudent(char* name){ return FindByName(name,Root); }
int FindQuery(char* name){ return FindByName(name,Root); }
int FindName(char* name){ return FindByName(name,Root); }
const BinaryNode<Etype> *FindUniqueName( const char* name, BinaryNode<Etype> * T );
void isExistName( const char* name, BinaryNode<Etype> * T );
int isExist(const char* n){
int getExistFlag() { return existflag; }
int existflag;
fstream* outfile;
public:
BinaryNode<Etype> *Root;
const BinaryNode<Etype> *LastFind;
Etype ItemNotFound; // Used for returns of not found
BinaryNode<Etype> *getRoot(){ return Root; }
SearchTree( const SearchTree & );
const SearchTree & operator=( const SearchTree & );
void FreeTree( BinaryNode<Etype> *T );
int Insert( const Etype & X, BinaryNode<Etype> * & T );
int Remove( const Etype & X, BinaryNode<Etype> * & T );
int RemoveMin( BinaryNode<Etype> * & T );
int isNameExist(const char* name,BinaryNode<Etype> * T );
const BinaryNode<Etype> *FindMin( const BinaryNode<Etype> *T ) const;
const BinaryNode<Etype> *FindMax( const BinaryNode<Etype> *T ) const;
const BinaryNode<Etype> *Find( const Etype &X, const BinaryNode<Etype> * T ) const;
};
// Application interface class
class Database{
private:
SearchTree<Student> ST ;
SearchTree<Query> QT ;
Stack<String> QS;
char currentQname[80];
public:
void start();
void displayMenu();
void initStudent();
void addStudent();
void removeStudent();
void findStudent();
void queryMode();
void saveStudent();
// read student record
void readSRecord(FILE* &fp,char sname[], char &scollege,
char &sclasslevel,double &sgpa,char sexp[]);
public:
void displayQMenu();
void initQuery();
void addQuery();
void removeQuery();
void findQuery();
void saveQuery();
void evalQuery();
void saveResult(Query qy);
void eQuery();
String Expand(Query Q);
// evaluate compound query
void evaluateQuery(Query Q);
void evaluateCompound(const char* name, String str);
String getToken(String x,int &pos ); // pass by reference
void FindQName( const char* name, BinaryNode<Query> * T );
//String GetToken(String line, int & pos);
//void Database::unMark(const BinaryNode<Student>* n);
String getNextToken(String x,int &pos ); // pass by referenc
void saveListResult();
List<Student> results; // results for one time evaluation
List<Query> tmpList; // lists for unique query
void saveListResult(List<Student> q); // print and save List in file
Query findUniqueQuery(char* name, BinaryNode<Query>* T);
List<Student> foundS(char* tmp); //find students of query and return list
List<Student> getCompoundList(const char* name, String str); // recursive call function
private:
void toUpper(char* &str); // utility
};
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Testing Data
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
a
Enter the student's name(max. 50 char): kejian
Enter the student's College(E or L): e
Enter the student's Class level(F,P,J,S or G): f
Enter the student's GPA( a number between 0.0 to 4.0): 3
Enter the student Expenses as number-character:
(Amount Type[F,A,E,M only],pairs separeted by space
Enter 0 (zero) to terminate:
3323 F 0
Student added successful!!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: a
Enter the student's name(max. 50 char): kejian
Enter the student's College(E or L): l
Enter the student's Class level(F,P,J,S or G): s
Enter the student's GPA( a number between 0.0 to 4.0): 4
Enter the student Expenses as number-character:
(Amount Type[F,A,E,M only],pairs separeted by space
Enter 0 (zero) to terminate:
2332 F
34323 A 0
Student Name already exist!!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: i
Please enter the filename with student data:
st.dat
Database is initialized successfully!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
Name: KIM, KIMBERLY Q.
College: L
Class Level: F
GPA: 2.08
Expense: 7.12 F 8.61 E 34.98 E 5 F 18.63 M 0
Name: TRAN, TRENT T-U V.
College: E
Class Level: S
GPA: 3.94
Expense: 7.99 A 7.99 A 4.99 A 2.99 F 22.39 M 0
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: r
Enter an Unique leading student name to remove:
kejian
Are you sure you want to remove KEJIAN y/n?
y
Remove successful
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: f
Please enter a leading fragment of student name: k
Name: KIM, KIMBERLY Q.
College: L
Class Level: F
GPA: 2.08
Expense: 7.12 F 8.61 E 34.98 E 5 F 18.63 M 0
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: f
Please enter a leading fragment of student name: w
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: f
Please enter a leading fragment of student name: w
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
QueryMode
I INITIALIZE Create the Query search tree by reading all
Query records from a user specified file
CorA CREATE QUERY Add a new Query to the tree by providing data at the
keyboard in response to a sequence of prompts
R REMOVE Remove a Query from the tree by providing a unique
leading fragment of his or her name
E EVALUATE Evaluate a query; results of the query are displayed on the
screen and saved
F FIND Find a Query in the tree by providing a leading fragment
of his or her name at the keyboard; summary data for the Que
ry is
displayed on screen
MorH HELP MENU This menu is displayed
S SAVE Write the current Query tree to a user specified file
T Exit Query Mode and return to student mode
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
i
Please enter the filename with Query data:
qt.dat
Database is initialized successfully!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
c
Enter S for simple query, or C for compound Query: kevin
Default: Simple Query
Enter name for Query: s
College:(E,L) e l
Classlevel:(F,P,J,S,G):
GPA (Enter lower and upper bounds(0.0 - 4.0):
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: a
Enter S for simple query, or C for compound Query: Johnson
Default: Simple Query
Enter name for Query: Johnson
College:(E,L) e
Classlevel:(F,P,J,S,G):
GPA (Enter lower and upper bounds(0.0 - 4.0):
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
// add
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: f
Please enter a leading fragment of Query name: j
Query Name: JOHNSON
College: E
Class Level: FPJSG
GPA: 0 4
Expense Range: -1 -1
Expense Type: FAEM
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
// test error
Enter name for Query: steven
College:(E,L) l
Classlevel:(F,P,J,S,G): p j s
GPA (Enter lower and upper bounds(0.0 - 4.0): 3.3
Error input!
GPA (Enter lower and upper bounds(0.0 - 4.0): 3
Error input!
GPA (Enter lower and upper bounds(0.0 - 4.0): 4
Error input!
GPA (Enter lower and upper bounds(0.0 - 4.0):
Total Amount (lower and upper bounds): 100 1000
Type of Expense (F,A,E,M): f a
Query added successful!
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: a
Enter S for simple query, or C for compound Query: kejian
Default: Simple Query
// add
Enter name for Query: kejian
College:(E,L) e
Classlevel:(F,P,J,S,G): f p j
GPA (Enter lower and upper bounds(0.0 - 4.0):
Total Amount (lower and upper bounds): 0 1000
Type of Expense (F,A,E,M): f a
Query added successful!
// evaluate
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here: e
Enter a query name to evaluate: kejian
-----------------Search Results KEJIAN------------
Name: BRUIN, JANE A.
College: E
Class Level: P
GPA: 3.72
Expense: 4.32 F 3.61 A 34.98 E 5.08 F 12.63 M 112.79 A 7
2.89 F 33.65 M 0
-----------------End of Results KEJIAN------------
The result is saved in file < qResults.txt >successfully
//compound
Enter S for simple query, or C for compound Query: s
Default: Simple Query
Enter name for Query: k1
College:(E,L) e
Classlevel:(F,P,J,S,G): f p
GPA (Enter lower and upper bounds(0.0 - 4.0): 0 3.0
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
a
Enter S for simple query, or C for compound Query: k2
Default: Simple Query
Enter name for Query: k2
College:(E,L)
Classlevel:(F,P,J,S,G):
GPA (Enter lower and upper bounds(0.0 - 4.0): 2 4
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
c
Enter S for simple query, or C for compound Query: c
Enter the name for compound Query: k1k2
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
"k1" "k2" &
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
// erro detection
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
a
Enter the student's name(max. 50 char): kejian
Enter the student's College(E or L):
Error input
Enter the student's College(E or L):
Error input
Enter the student's College(E or L):
Error input
I give up!
Please try again!
// compound evaluation
Name: KIM, KIMBERLY Q.
College: L
Class Level: F
GPA: 2.08
Expense: 7.12 F 8.61 E 34.98 E 5 F 18.63 M 0
Name: TRAN, TRENT T-U V.
College: E
Class Level: S
GPA: 3.94
Expense: 7.99 A 7.99 A 4.99 A 2.99 F 22.39 M 0
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
Please Enter I, A, R, F, Q, M(menu), S, or T (Terminate) here:
Enter name for Query: k1
College:(E,L)
Classlevel:(F,P,J,S,G):
GPA (Enter lower and upper bounds(0.0 - 4.0): 0 2.8
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
Enter name for Query: k2
College:(E,L)
Classlevel:(F,P,J,S,G):
GPA (Enter lower and upper bounds(0.0 - 4.0): 2.5 4
Total Amount (lower and upper bounds):
Type of Expense (F,A,E,M):
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
Enter a query name to evaluate: and
Query Name does not exist, Do you want to create one?(y/n)
y
Enter S for simple query, or C for compound Query: c
Enter the name for compound Query: andk
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
Enter a query name to evaluate: and
Query Name does not exist, Do you want to create one?(y/n)
y
Enter S for simple query, or C for compound Query: c
Enter the name for compound Query: andk
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
"k1" "k2" &
-----------------Search Results ANDK------------
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
-----------------End of Results ANDK------------
Enter the name for compound Query: andk
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
"k1" "k2" &
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
e
Enter a query name to evaluate: andk
-----------------Search Results ANDK------------
Name: WALKER, WALLY W.
College: E
Class Level: J
GPA: 2.77
Expense: 0
Name: KIM, KIMBERLY Q.
College: L
Class Level: F
GPA: 2.08
Expense: 7.12 F 8.61 E 34.98 E 5 F 18.63 M 0
-----------------End of Results ANDK------------
Enter the name for compound Query: orkk
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
"k1" "k2" |
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
.......
.......
College: E
Class Level: S
GPA: 3.94
Expense: 7.99 A 7.99 A 4.99 A 2.99 F 22.39 M 0
Name: KIM, KIMBERLY Q.
College: L
Class Level: F
GPA: 2.08
Expense: 7.12 F 8.61 E 34.98 E 5 F 18.63 M 0
Name: BRUIN, JANE A.
College: E
Class Level: P
GPA: 3.72
Expense: 4.32 F 3.61 A 34.98 E 5.08 F 12.63 M 112.79 A 7
2.89 F 33.65 M 0
-----------------End of Results ORK------------
The result is saved in file < qResults.txt >successfully
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
Enter S for simple query, or C for compound Query: c
Enter the name for compound Query: notk
Definition:(You can only enter one line! Please DO NOT put # at the end!
Expression example: "query1" "query1" &
"k1" !
Query added successful!
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
e
Enter a query name to evaluate: notk
-----------------Search Results NOTK------------
-----------------End of Results NOTK------------
The result is saved in file < qResults.txt >successfully
Please Enter I, C, R, E, F, M(menu), S, or T (Terminate) here:
|