代写 C++ C GUI graph Description

Description
You are requested to write up a program that handles loans of camping equipment for a scout group. The system keeps track of loans of camping equipment. The systems will check a user’s level and depends on a user’s level the system will determine whether such loan is allowed. The system will also keep track of loan history. Tofacilitateusers,thesystemcouldenableanadministratortoinsertatext file with specified format for bulk data insertion. Data insertions are inserting a batchofusersandinsertingabatchofcampequipment. Thesystemcouldholda default administrator identity with user-id and password as admin and admin, respectively.
Roles of User
Scout Members and Scouters
Even though a scout group has multiple sections but the loan system is only for the three sections: Scout (partially), Venture Scout, and Rover Scout. Each section has number of scout members. Each member has the attributes 1) ID, 2) Name, 3) Section, 4) Date of Birth, and 5) Address. For members of Scout, they have an additional attributes Rank (Member, Patrol Leader, Assistant Patrol Leader). Beside scoutmembers,ascoutgroupisrunbyagroupofvolunteers,Scouters. Scouters have an additional attribute Rank. You may want to add an additional attribute to record their level of rights indicating how many items these users could borrow.
Both scout members and scouters could do the following tasks:
1. Borrow camp equipment*
2. Retrieve loan record with loan date, camp equipment item id(s), item name, date
of return.
3. View of available camp equipment for loans
* Different types of scout members have various levels of rights when borrowing equipment. For member in Scout session, members could only borrow 1 item and
1

both Patrol Leader and Assistant Patrol Leader are permitted to borrow 3 items. Each venture scout could borrow up to 3 items. Rover scout and scouters could borrow up to 5 items.
Administrator
An administrator that could do the following tasks:
1. Inserting tabulated files containing batches of users and batches of camp
equipment. Thesetwofileshavetheirownfixedformatwhichwillbediscussed
later.
2. Display loan records containing loan date, camp equipment item id(s), item name,
name of borrower, return date, status (out for loan, returned if equipment is back).
3. Display list of camp equipment (by categories: tent, lantern, and stoves).
4. Update condition of equipment.
5. Produce a .txt file that contains all updated data such as loan records and
equipment lists.
Camp Equipment
Camp equipment item are categorized into 3 major types: tent, stoves, and lantern. Each equipment has itemID, itemName, brand, itemType (tent, stove, lantern), dateOfPurchase (DDMMYYYY), condition (good, damaged, being repaired, or disposed),andstatus(inorout–ifloaned). Differenttypesofequipmentarefurther detailed with attributes only to a specific type.
Tent
Tent belongs to camp equipment and can be further detailed with these attributes: tentSize (2, 4, 6, 8, 10, and 16), tentType (lightweight, family, wall, tunnel, or dome), numberOfDoors (1, 2, and 4), doubleLayer (true / false) and colour.
Lantern
Lantern has the following specific attributes: lanternSize (hiking or camping), lanternType (head lamp, table lamp, led lamp, and beam lamp), and fuelType (AA batteries, AAA batteries, C batteries, D batteries, stove gas and screw headed gas).
2

Stove
Stove has the following specific attributes: stoveType (ultralight, lightweight, and table), and fuelType (stove gas, screw headed gas, and wax).
System
In general, the system provides the following tasks:
1. The system should provide a menu for users to login.
2. If users fail to authenticate themselves, the system will display error message and
re-prompt users to attempt again.
3. Once users have logged into the system, the system will provide a menu with the
following options:
a.
b.
c.
Displaying a list of available camp equipment item by category
i. If users pick this option, the system displays list of available equipment
d.
e.
Returning camp equipment
i. Userskeyinitemid(s)ofitem(s)toreturntheitem. Thesystemkeeps
prompting users to key in item ids until user has inputted -1. i. Display thank you message and exit the system.
ii.
by category.
Only “good” conditions and unborrowed items are displayed on list. Displaying user’s loanrecord
i. If users have borrowed equipment, a list of loaned equipment by the user will bedisplayed.
Providing a sub-menu for equipment loan (only for users who have not
borrowed any items)
i. If users have any unreturned item, this option should not be available
ii.
iii.
to them.
If users have not borrowed any item, the system will provide a menu for users to borrow items from the scout group. Number of items allowed for loan depends on users’ rank.
For any loan of equipment, by default, the returning date will be 14 days after the loan date.
Exit
3

Tasks to be completed
Tasks are generally categorized into Core, Graphical User Interface (GUI), and Documentation. The core modules, GUI, and documentation weigh 70%, 20%, and 10%, respectively. Each will be detailed in later sections.
Core Part- 70%
The core modules are mainly the system that could run independently with a command line interface, to be implemented by you. Followings are suggested classes that you should implement. Be reminded, those suggested classes may not be enough and you may need to create more class and to include libraries to complete the requirements.
Class User and its derived classes (15%)
There are multiple types of users and they may have different level of rights and attributesets. YoumaydefineUserasasuperclassandfurnishtheclassbyvarious sub-classes. YoumayalsowanttoimplementtheUserclassasanabstractclasswith pure virtual functions for different sub-classes’ further implementation, if necessary.
Class Admin (10%)
There is only ONE admin and the administrator could do multiple tasks mentioned above. Youmayhardcodetheuseridandpassword,bothas“admin”. Bewarned, this is the only thing you could do the hardcoding.
Class Equipment and its derived classes (15%)
Equipment class has a set of common attributes for 3 different types of equipment which could be further detailed with sub-classes. You may also want to implement the Equipment class as an abstract class with pure virtual functions for different sub- classes’ further implementation, if necessary.
Class FileHandler (10%)
4

The FileHandler class is used to read and write plain text files. The classhas two majormethodsfileRead(…)andfileWrite(…). Alltextfilesareinfixedformat. See appendices for details.
Class LoanControl (20%)
The LoanControl class is actually the class that works between UI (the Menu class) and other entity classes like User, Equipment, and even the FileHandler class. This class serves as a manager that manages all activities of the system and passing data/messages between classes and menu. The LoanControl class will make decisions whether such loan of equipment is permitted.
The functions mentioned above in System may not include all necessary functions. You may have to add more necessary functions.
Class Menu (ONLY IF YOU IMPLEMENT COMMAND LINE User Interface)
The Menu class serves as a command line user-interface with menu and sub-menu. Youshouldtryyourbesttoproperlyrespondtouser’sinputerrors. TheMenuclass does not weigh any mark but marks will be deducted if you fail to produce a user- friendly UI.
Beside menu for users, you are also required to implement a menu for administrator and implement all necessary functions.
Marking Criteria of Core Part
Generally speaking, core parts are graded according to its completion of requirements, usage of advanced programming techniques (inheritance and polymorphism, etc.), and documentation (comments).
5

Graphical User Interface (GUI) – 20%
This is NOT a core part. By completing a user-friendly GUI will let you get the rest 20% of the project mark. Clues on working C++ with GUI are little and will not be discussed in lectures and labs. Make sure you have included all necessary libraries and files when submitting your project to Canvas.
IMPORTANT: Please carefully consider your programmability to assess whether adoption of GUI for this project is worth.
Marking Criteria of GUI
GUI will be graded by user-friendliness, smooth of usage with only keyboard, flow of menu.
Documentation –10%
Each should produce a user manual with NO MORE THAN 16 pages including cover page and appendices. The document will be graded according to readability and coverage of functions.
Appendix I
Usersareputinafile. Bothventureandroverscoutshasthesamedataformatand scouthasanadditionalattribute. Scouterhasitsownsetofformat. Thefirstthree letters of user id indicates the section that a user belongs to (VEN for venture scout, ROV for rover scout, SCT for scout, and SCM for scouter).
For the UID and PWD of a user, you may use one’s UserID as the login id and one’s date of birth as password.
Rover scouts and venture scouts:
Name
Section
User ID /
Date of
Birth / Password
Address
6

Scouts:
Login id
Name
Section
Address
User ID / Login id
Date of Birth / Password
Rank
Scouters:
Name
Section
Address
User ID / Login id
Date of Birth / Password Rank
7

Appendix II
Camp Equipment File:
All camp equipment is put in a text file. The first letter of Item Code represents the type of equipment: T for tent, S for stove, and L for lantern. Format for different equipment varies.
T ent:
# of ppl use
Item name
Condition
Stove:
Equipment Type
Equipment Type
Date of Purchase
# of doors
Colour
Item code
Brand
Status
Tent Type
Double-layer?
Item name
Condition
Fuel Type
Date of Purchase
Item code
Brand
Status
Stove Type
8

Lantern:
Equipment Type
Item name
Condition
Fuel Type
Date of
S
Purchase t
Item code
Brand
atus
Lantern Type
9