help help




Im tired of this class and i just want to be done with it. can anyone help me write this program? My teacher can't teach and I'm all by myself on this. I need to write a program that is in these parameters:


Programming Assignment 6: Web Site Login

COP 3014 - Spring Term 2014
Point Value: 100 points

Project Due Date: Wednesday April 23, 2014 at 11:59 PM
NO programs will be accepted after this due time !!!
i.e. NO LATE PROGRAMS AND NO EXTENSIONS !!!

Learning Objectives

To gain experience working with a one-dimensional array of structs
To practice use of the typedef construct in declaring array types
To perform a linear search on an array-based list
To utilize the C++ string class to store and work with textual data
Problem Statement

You have decided to set up your own incredible web site and call it MyGreatWebSite.com. As a start, you are going to write a program to allow registered users to log in. Each user has personal data in the following form:
userID: a string (no blanks permitted)
password: a string (no blanks permitted)
PIN: an integer (4 digits)
To log in, a user must correctly enter all three items. Give the user only THREE tries to enter their data correctly; then they are shut out of the system and your program will exit.



Your program will first read in the data file users.txt into an array of structs, with each struct represented as follows:

struct UserRecord
{
string userID;
string password;
int PIN;

};

You must set up an array which can handle up to 50 users. The user data has been accurately recorded in the file users.txt. The first line of this data file provides the current number of actual users. You must also declare the array of structs type using a typedef as shown in lectures, and utilize this type definition appropriately in your program. You must use C++ string class objects to store and manipulate the string data in this program.

You may assume that the data file is 100% correct and does not need to be checked for errors. You may hard code the file name into your program. If the file does not open on the first try, abort the run.

Processing

First, read in the number of users and then read the user data into your array of structs. Echoprint all input. Print user data in table format.

Now, allow up to three attempts at a log in, for one user. Process one user, then exit the program.

For this one user, prompt them for the ID, password, and PIN, and read these in. Do not do error checking at this time except to make sure that the user enters an integer at the integer prompt (if not, re-prompt until the user does enter an integer). Note that the user might enter strings containing blanks when asked for the name and password and your program must handle this appropriately.

Next, search for the given user ID in the database, and check the password and PIN for a match if the user is found. Use the linear search to locate a user.

If all three values are a match in the database for one user, the log in is successful. Tell the user that he/she has successfully logged in, and then exit the program.

If any one or more of the three items do not match a user in the data base, the log in fails. Tell the user and exit the program. DO NOT tell the user why the log in failed. This would make for a less secure system.

Note: in terms of security, for a real-world log in system you would obviously not echoprint the list of user names and passwords! However since this is a course project, the graders need to see that you can read and print the array of structs correctly, so that data must be echoprinted.

Output

Set up your output to be clear, informative, and nicely formatted. Remember though, if a non-user is trying to crack into the system, we do not want to be TOO informative or too helpful! For example, we would not tell the user what a user name or password or PIN is supposed to look like.

Use Of Functions, Parameters, Modularity, Design et. al.

Part of your grade on this project will be determined by how well you utilize multiple functions and parameter passing appropriately and how well you design a modular and functionally cohesive program using the principles discussed in class. Large grade point penalties can be incurred for not setting up a modular, well designed program structure. Global variables must not be used or large point penalties will be applied. All of the above emphasizes good program structure, design, and very basic, fundamental software engineering principles. Start by working on a good design, structure chart, etc. Recitation meetings will be an excellent source of help with this.

Use Of Data Structures and Data Types

You are required to use an array of structs as the major data structure on this project with each struct as specified earlier in this write-up. Use the C++ string class to store and manipulate string data. Use the typedef construct to both create and work with your array of structs type.
You will only have one array of structs declared in this program. You do not need any other arrays to complete the task as specified (with the exception of the C++ string class objects discussed above, which by nature, contain arrays as their class member data). You may not use any two-dimensional arrays, dynamic arrays, or user-defined classes on this project. You also may not use the C++ Standard Template Library classes or algorithms, with the exception of the C++ string class as described here, and the standard basic iostream classes as discussed in this course.
Please note, that this is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attemts to solve this problem youself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find deriviative of function without knowledge in ariphmetics, you cannot do more complex tasks in programming without clear understanding of basics
Topic archived. No new replies allowed.