Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92764585
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in C/C++

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As