Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given a list of credentials as input, you will need to implement a C++ program to add these input objects into a linked list. Within

image text in transcribed

Given a list of credentials as input, you will need to implement a C++ program to add these input objects into a linked list. Within the linked list, your program needs to perform different adding, removing and sorting operations base on the given commands. This homework will focus on linked list implementation and simple sorting techniques. When submit your assignment, please name the folder on the server as "hw 1 ". In this HW we are making a simple data base for a casino! 2. Input files - The input file will contain a list of credentials (ranging from 0 to 100). - This file can be empty. - Each credential represents a node in the linked list and should be added one by one to the end of the linked list. - Each credential will have four attributes: Name, age, deposit and number of chips. Note: Name will always contain alphabet character (az,AZ), no spaces or special character included. Age is an integer between 21 and 80 . Deposit is an integer between 100 to 10000 . Number of drinks is between 0 to 10 . The formatting of each credential is as follow: [name: value; age: value; deposit: value; number of drinks: value] - You can safely consider that all the inputs are in the correct format. - In the case when the input is empty, continue to process the command. - While reading the input, In and \ s should be removed before processing string. - Input might contain duplicate id credential or duplicate username credential, please read section 5 below on how to process duplicate cases. 3. Command files There will be three types of command: Add, Remove, and Sort. The commands should be executed in the order that they appear (latter command should always run based on the former command's result). o Add (index) [credential] The Add command will be followed by an integer inside parenthesis (represent the index in the linked list to be added) and then followed by a credential. For instance: Add (3) [name: Rob; age: 34; deposit:1234; number of drinks: 3] Will add Rob after the second node of the list. If index =0, meaning the credential should be added at the beginning of the linked list. If the index >= size of the linked list, meaning the credential should be added at the end of the linked list

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions