Compare each charge account number from the file possible


Assignment

Program Statement:

Exercise- Charge Account Validation

Design a program that ask the user to enter a charge account number. The program should determine whether the number is valid by comparing it to the following list of valid charge account numbers:

5658845     4520125     7895122     8777541     8451277     1302850

8080152     4562555     5552012     5050552     7825877     1250255

1005231     6545231     3852085     7576651     7881200     4581002

These numbers should be stored in an array. Use the sequential search algorithm to locate the number entered by the user. If the number is in the array, the program should display a message indicating the number is valid. If the number is not in the array, the program should display a message indicating the number is invalid.

Complete Chapter 8 Programming Exercise 5, with the following modifications:

1. Create a data file, valid_numbers.txt, containing the valid charge account numbers as listed in the book.

2. Create a data file, possible_valid numbers, containing a list of possible valid numbers (such as those entered by the user). You will create this file. Include at least 10 numbers, with approximately half valid and half invalid.

3. Compare each charge account number from the file, possible valid numbers, to see if it is listed as a valid number in the file valid_numbers.txt.

4. Create an output file, results.txt which lists the possible valid numbers and the result of validity checking. Create a list of numbers, followed by "VALID", or "INVALID". Space and align neatly.

5. Place your name and student ID at the top of the output file.(make something up so I know where to right mine.)

6. The output should look similar to:

Checked Charge Card Number                       VALID/INVALID
1.       5658845                                           INVALID
2.       7771534                                           INVALID
3.       4581002                                           VALID

Program Requirements:

1. Design the program using Raptor.

1. You MUST use Modular Programming techniques by using Sub Modules (Sub Charts in RAPTOR) in your program. Your "main" module should not be very large.

2. Code the program successfully using Python.

1. You MUST use Modular Programming techniques by using functions in your program. Your "main" function should not be very large.
Other Requirements:

• Documentation: Use the "Comments" feature to document each symbol in the flowchart. You do this by right-clicking the symbol and selecting "Comment." Be sure to identify the data type of each variable used. Be sure to explain what each formula does. Be sure to explain what each of the other symbols in the flowchart does in a comment.

• Test and debug your Program: Create sample input data, run the program, then check your answers with a calculator or Excel. If something did not match up, then fix your program.

• Program must execute and produce correct output.

• Read this page again to be sure you covered all requirements.

• See the Programming Project Rubric for grading principles.

• Add significant functionality or an additional feature to the program. (Suggest a feature to me prior to due date and we will discuss/agree.)

Submission Instructions:

• You must submit a Flowchart (from RAPTOR) file. Your RAPTOR file will be the .rap file created when you save your project.

• Name the RAPTOR file (replacing LastName and FirstInitial with YOUR name): LastName_FirstInitial_FINAL.rap (example: Smith_J_FINAL.rap).

• Name your Python program file: LastName_FirstInitial_FINAL.py (example: Smith_J_FINAL.py).

• If you used a data file to read in data, include the date file, correctly named and upload here.

Provided the requested data files, named as required.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Compare each charge account number from the file possible
Reference No:- TGS02607947

Now Priced at $55 (50% Discount)

Recommended (95%)

Rated (4.7/5)