SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 1 Assignment #2 Worth: 10% of final grade Account Ticketing System Milestone Worth...

Milestone 4


SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 1 Assignment #2 Worth: 10% of final grade Account Ticketing System Milestone Worth Due Date Submission Required 1 10% (Suggested Target: November 16th) NO 2 40% November 26th by 23:59 EST (end of Week 11) YES 3 10% (Suggested Target: November 30th) NO 4 40% December 3rd by 23:59 EST (end of Week 12) YES Introduction Assignment 2 is a continuation of Assignment 1 Milestone 4 and will complete the account ticketing system. The ticketing component will be added among other improvements. Additional business and data validation rules will be required to ensure a higher quality data store is maintained including security and overall application functionality. Agents will have more features available including ticket management and data persistence (using files) so when data is modified, the changes are retained and can be reloaded when the application is later restarted. For assignment 2, you will be provided with a set of generalized instructions and given more freedom to create your own solution (this means creating your own functions, macro's, and deciding in what file they should be placed). However, you must use the data types and functions that are explicitly stated). Preparation Download or clone the Assignment 2 (A2) from https://github.com/Seneca-144100/IPC-Project In the directory: A2/MS1 you will find the Visual Studio project files ready to load. Open the project (a2ms1.vcxproj) in Visual Studio. IMPORTANT • You will need to copy your work from Assignment 1 Milestone 4 and add all the header and source code files to the a2ms1 Visual Studio project before continuing. • Remember to update the comments at the top of each file to reflect Assignment 2 Milestone 1. • DO NOT ADD the a1ms4.c file. Milestone – 1 (Worth 10%, Target Due Date: November 19th) Milestone – 1 does not require a submission and does not have a specific deadline, however, you should target to have this part completed no later than November 19th to ensure you leave enough time to complete Milestone – 2 which must be submitted and is due November 26th. Milestone-1 includes the main function and should not be modified (a2ms1.c). This main will do some preliminary data type testing by creating some test data using the new data types and then launch the application logic by calling the applicationStart function accordingly. https://github.com/Seneca-144100/IPC-Project SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 2 This milestone focuses on accommodating some new data types and extending/improving on data validation routines including implementing additional business logic (rules and conditions for data). Specifications New Data Types You will need to create three (3) new data types in this milestone ("Message", "Ticket", and "AccountTicketingData") which will complete what is needed for this application. Review the a2ms1.c file (more specifically the "main" and "populateTickets" functions) to learn more about the field information used in these new data types based on the data being assigned. The "Message" and "Ticket" data types will need to be defined in a new header file "ticket.h" (don't forget to apply the safeguarding technique as described in Assignment 1). Message type • The Message data type has three members. The 1st member is a single character representing the account type of the author of the message (same as used in the Account type). The 2nd member represents the display name for a given user (same as used in the Account type) and should be able to accommodate 30 printable characters. The 3rd member represents the message details and should be sized to accommodate 150 printable characters. • Create meaningful member names for each. Ticket type • The Ticket type has six (6) members. 1. Unique number for a ticket. 2. Customer account number related to the ticket. 3. A ticket status indicator where 0 represents closed and 1 represent active (still open) 4. A subject line (like an email subject) that should accommodate up to 30 printable characters. 5. A counter that represents the number of messages associated with the ticket. 6. An array of Message types that should be able to store up to 20 messages. • Create meaningful member names for each. AccountTicketingData type • This new data type is provided for you below and should be placed in the existing header file "accountTicketingUI.h". This type will be used to help simplify the passing of data between key functions with more efficiency and readability. struct AccountTicketingData { struct Account* accounts; // array of accounts const int ACCOUNT_MAX_SIZE; // maximum elements for account array struct Ticket* tickets; // array of tickets const int TICKET_MAX_SIZE; // maximum elements for ticket array }; • Review the a2ms1.c file to see how this is instantiated and used. SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 3 Application Logic Entry-Point The function parameters for "applicationStart" will need to be modified so it receives just one argument which is a pointer to the new "AccountTicketingData" type. • Update the necessary function definition to use the new argument accordingly (after reading and implementing the menu changes below). Menu Modifications menuAgent • The function used for the agent main menu "menuAgent" currently has three (3) parameters but will require modification. Since the accounts array and its maximum size information are now members of the new data type "AccountTIcketingData", the existing first two parameters can be replaced with a pointer to the new "AccountTicketingData" type. This means this function should now only have two (2) parameters. • Update the necessary function definition to use the new argument accordingly. • The menuAgent function should be modified to display five (5) more menu options (5 – 9). Selecting any of these new options will display a temporary notice that the feature is not currently available. Review the sample output for details. Data Validation and Business Rules You should apply system library functions like the character analysis and manipulators you have recently learned about to help enforce data validation and business rules where appropriate (review your code and apply where necessary). New Account • The application currently prompts the user for an account number when creating a new Account. This is not ideal and needs to be replaced with an auto-generated account number based on the next increment of the highest number found in the accounts data set. o Upgrade your process for creating a new account so the account number is automatically assigned before getting user input for the remaining data. The account number should also be displayed as part of the title/banner (see below sample, the 50600 was automatically assigned). o Prompting for a new account should therefore start with the account type like this: New Account Data (Account#:50600) ---------------------------------------- Enter the account type (A=Agent | C=Customer): User Login • Enhance the validation for obtaining the UserLogin member that stores the login identifier and do not allow any whitespace characters (spaces and tabs etc.). Below is an example of an attempt to enter whitespace characters: User Login Data Input ---------------------------------------- Enter user login (10 chars max): my login ERROR: The user login must NOT contain whitespace characters. SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 4 Enter user login (10 chars max): my login ERROR: The user login must NOT contain whitespace characters. Enter user login (10 chars max): • Enhance the validation for obtaining the UserLogin member that stores the password to enforce the password meets the new criteria (see example below): Enter the password (must be 8 chars in length): password SECURITY: Password must contain 2 of each: Digit: 0-9 UPPERCASE character lowercase character symbol character: !@#$%^&* Enter the password (must be 8 chars in length): aaAA#$12 Note: "aaAA#$12" is valid because it meets the password validation criteria. Person • Enhance the Person data input processes (when adding new or updating) so that entered values for the country member are stored as all UPPERCASE characters (the user should be able to enter lowercase characters and you will convert it to uppercase accordingly). A2-MS1: Sample Output ============================================== Account Ticketing System - Login ============================================== 1) Login to the system 0) Exit application ---------------------------------------------- Selection: 1 Enter your account#: 50008 AGENT: Will Smith (50008) ============================================== Account Ticketing System - Agent Menu ============================================== 1) Add a new account 2) Modify an existing account 3) Remove an account 4) List accounts: detailed view ---------------------------------------------- 5) List new tickets 6) List active tickets 7) List closed tickets 8) Add a new ticket 9) Manage a ticket ---------------------------------------------- 0) Logout Selection: 1 New Account Data (Account#:50600) ---------------------------------------- Enter the account type (A=Agent | C=Customer): A SDDS Fall – 2021 School of Software Design and Data Science SDDS School of Software Design and Data Science Page | 5 Person Data Input ---------------------------------------- Enter the person's full name (30 chars max): Agent Chris Enter birth year (current age must be between 18 and 110): 1999 Enter the household Income: $240750.11 Enter the country (30 chars max.): england User Login Data Input ---------------------------------------- Enter user login (10 chars max): Has Space ERROR: The user login must NOT contain whitespace characters. Enter user login (10 chars max): Neil234 Enter the password (must be 8 chars in length): 12345678 SECURITY: Password must contain 2 of each: Digit: 0-9 UPPERCASE character
Dec 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here