Design decision how you want to maintain your program

Assignment Help C/C++ Programming
Reference no: EM131925926

This project should deliver a zip file, which contains two items:

- a folder, myprogram (see item 18 of Program Requirements below)
- a batch file for Windows, runproject.bat (see item 19 of Program Requirements below)

1. The program must not use non-standard or third-party libraries.

2. The program must be implemented by using objects and classes. Stand alone functions other than main() could be included, too.

3. The program performs two main functions for users like TAs and instructors, who maintain exam scores of students in a class. These two functions are user management (i.e., menu option (1) and (2) shown next) and exam scores maintenance (i.e., menu option (3) ~ (10) shown below).

4. The program begins by displaying a menu of options to the user:
o (1) Create a new user
o (2) Change password
o (3) Display scores of a student
o (4) Display scores of an exam
o (5) Display avg score of a student (in a form like 72.84)
o (6) Display avg score of an exam (in a form like 69.33)
o (7) Insert scores of a new exam to all students
o (8) Insert scores of all exams of a student who is not in file
o (9) Update an exam score of a student
o (10) Update an exam score (with same amount such as 5 points or -3 points) of every student
o (11) Exit

5. Except (1) and (11), every option in the menu requires the user to be authenticated by entering a user ID and password.

6. All user IDs and passwords must be saved in the file passwords.txt, which must be located in a directory 'User' located in the same place as the program. No IDs and passwords are hard coded in the program. Currently, there is only one default user, admin, contained in the attached file, whose password is 1a2b3c4d. Each row of this file identifies a user whose ID and password are separated by a space.

7. In menu option (1), user can specify his/her user ID of any form but it must be unique in the file. In menu option (2), he/she can also specify the length and the type of password (e.g., all digits, all letters, mixed with symbols, etc.).

8. Exam scores maintenance (i.e., menu option (3) ~ (10)) must use scores in a text file scores.txt, which must be located in a directory 'Data' located in the same place as the program.

9. Each row in scores.txtrepresents a student's record in unsorted order. Each row begins with a student ID followed by scores of exams in the sequencial order of exam 1, 2, 3, etc. All are separated by a space and no exam number or name is stored. Student IDs and scores have a format defined below in item 11 and 12. Currently, the attached file contains five students, U103, U111, U227, U540, and U105, each has four scores from exam 1 to 4. More students can be appended to the end of this file by using menu option (8) and new exam scores (e.g., exam 5, 6, etc.) can be inserted to the end of each row of student in the file by using menu option (7).

10. All scores in file must be postive integers or zero. There is no unknown scores. An invalid score entered, including scores containing non-digit characters and integers out of range of [0, 100] should be ignored and the score will be set to zero without causing exceptions. Note that scores like 77.5 or 80g91 or 6% will be accepted as 77, 80, and 6, that is, the invalid character up to the space will be ignored (by the 'cin' object automatically).

11. Student ID of new students in (8) must in the form of Uxxx, where 'xxx' are three digits and must not already exist in the file. Inserting an existing or invalid Student ID causes an exception at run time and must be handled.

12. Scores to be inserted in (7) and (8) must be all entered in one line using only one 'getline()' function.

13. The total number of scores to be inserted in (7) and (8) must match the total number of students and exams in current file. Otherwise, a logic error (i.e., exception) occurs and user should be able to re-try the input without stopping the program. Also, remember both numbers are not a constant because scores of a new exam or student are inserted previously. For example, in (7), if there are six students in file, there should be six scores entered, and, after insertion done in (8), it becomes seven scores in each exam. Similarly in (8), if there are five sets of exam scores in file, user must enter five scores for the student to be inserted, and, after an insertion in (7), each student has six scores. Therefore, do not hard code in program the number of students and exams in file.

14. If an option of the menu is targeting on a student or an exam, including option (3) to (10), user should be prompted first to enter a student ID or exam number. The input must be validated.

15. This program is exepcted to use throw-try-catch constructs in most user data input cases to handle exceptions efficiently. It is assumed no invalid data is stored in both text files used by the program.

16. A general principle of C++ program design is to keep your main() neat and clear to focus on the major logic flow or process of the application. Do not let it be obscured by too many user I/Os or interactions, input validations, or detailed processes. In other words, your program code should be structured and optimized by using functions and classes, including derived classes and friend functions that can be defined/shared by different classes but only implemented once.

17. It's your design decision how you want to maintain and name your program in files. That is, you may use only one single .cpp file to include all of your source code, or one .cpp file for the main() and one for each class, or use additional .h files, one for each class members implementation and one for standalone functions, etc.

18. All your program code files, including .cpp and .h, if any, must be stored in a folder named 'myprogram'. Besides the code files, it contains two folders, User with your passwords.txt file and Data with your scores.txt file.

19. Because of item 17, each project may consist of different files with different names. A batch file for Windows must be prepared and included in the above 3331project folder. It should be named as runproject.bat. When it is executed from any directory, it must be able to automatically change from its current location to the directory of myprogram, and compile and run the project, all in one step. Search on Internet, if you don't know how to create and run a batch file in Windows.

Attachment:- Project Instructions.zip

Reference no: EM131925926

Questions Cloud

Find a publicly available research report : Find a publicly available research report (local or international) and critically comment on the methodology adopted for the research purpose.
What is the consumer surplus from concert tickets : The demand curve for tickets to the George Winston concert (with special guest star, Kenny G) is given as follows:
Determine the least amount the investor can invest : Determine the least amount the investor can invest and how that investment should be allocated between the three stocks.
What is the beta of the fund : The Beta Bear Plus ETF (Exchange Traded Fund) is constructed so that its average return is equal to two times (200%) the additive inverse (opposite).
Design decision how you want to maintain your program : The program must not use non-standard or third-party libraries - The program must be implemented by using objects and classes. Stand alone functions other
Describe the most important business area : Determining whether or not you believe penetration tests are necessary and an integral part of a security program and discuss why or why not.
How consumers make economic decisions : You have been asked to assist Starbuck's marketing department to better understand how consumers make economic decisions.
Differences between the types of threats and vulnerabilities : The evoluation of the Internet has resulted in an exponential growth in exploits, malware, and other types of attacks for both individuals and for e-Commerce.
What production plan will maximize the total revenue : Past demand indicates that customers purchase at least twice as many cans of Plain Nuts as Premium Nuts. What production plan will maximize the total revenue?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement the chinese remainder theorem

This program must run in the Visual C++.NET. Some time I have problem with that, so, please the whole project included in the attached Zip file.

  Simulate a multi-partitioned memory management system

Processes are also to be terminated by a GUI action. With each process change a free memory list status is to be output clearly showing the list items and their sizes.

  Define a function hypotenuse that calculates the hypotenuse

Define a function hypotenuse that calculates the hypotenuse of a right triangle when the other two sides are given. The function should take two arguments and return the hypotenuse as a double.

  Write two short c programs and solve four exam-style

write two short c programs and solve four exam-style problems. details on the programs are as follows.program

  Write a float function that prompts the user for radius

Create an enumerated type with three values: POSITIVE, NEGATIVE, and ZERO. Write a function that prompts the user for an integer, reads the integer, and returns one of the enumerated values based on that number (e.g., returns NEGATIVE if the input..

  Compare triggers with constraints

What is the purpose of OLE DB, ODBC, JDBC, ADO, and ADO.NET? Is there any similarity between these? If yes, suggest a suitable name to group these. Provide reasons to support your answer.

  Calculate tax pay and return the result

Calculate tax pay and return the result to main method. Print the result in main method.

  Simulate a producer-consumer system using threads

CS492 Programming Assignment. The goal of this assignment is to simulate a producer-consumer system using threads, mutexes, condition variables and scheduling. You will experiment with varying the numbers of available producer and consumer threads..

  Checking for a palindrome

For this Programming Activity, you will write a GUI-based program checking for a Palindrome.Turn to Page 959 in your text.Complete Programming Activity 1: Checking for a Palindrome.

  Discuss the properties of an abstract class

Create an abstract class DiscountPolicy. It should have a single abstract method computeDiscount that will return the discount for the purchase.

  State diagram to recognize one form

Design a state diagram to recognize one form of the comments of the C-based programming languages, those that begin with /* and end with */. and also Write and test the code to implement the state diagram.

  What is wrong with this function

What is wrong with this function? Can you find problem in this code?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd