Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will develop a program in C++ to ensure that unauthorized users cannot get into the system. Your program will check whether the user's entered

You will develop a program in C++ to ensure that unauthorized users cannot get into the system. Your program will check whether the user's entered access code is found in the prerecorded data file. A data file with 300 access codes is provided in the attachment to this assignment. Your program will read this access code data file and search for a match. Only if a match is found, your program will grant the user access. You will accomplish this by creating a sequential search algorithm.

WHEN THE PROGRAM RUNS Begin by displaying a text heading with the following text banner 48 characters wide:

===== ENTER YOUR CODE TO ACCESS THE SYSTEM =====

The program will ask the user to enter an access code with the prompt:

ATTEMPT n/3: ENTER 4-DIGIT CODE:

The exact text and format are illustrated in the screen shots. Follow the screen shots when creating your user interface.

The program attempts to match the user's input with a valid access code from the data file. The user will be given three attempts to match a valid access code.

Based on the search result, the program will give one of the three possible output messages:

NO MATCH! TRY AGAIN

will display if there is no match with any numbers from the file of valid access codes, and the user has not exhausted all three attempts. The prompt will be repeated. Follow the format given in the screen shots.

If the user's input is validated by a match with a valid access code, this message will display:

================================================

ACCESS GRANTED WELCOME

================================================

The program stops here. Note that this message is 48 characters wide, the same width as the opening banner.

If the user's input key is not validated by a match with a valid access code by the third attempt, this message will display:

================================================

ACCESS DENIED GOODBYE

===============================================  

The program stops here. Note that this message is also 48 characters wide, the same width as the opening banner. See screen shots for more details about message formatting and placement.

REQUIREMENTS:

1. USER INTERFACE as shown in the screenshots. 2. FUNCTION: You must develop a sequential search function and name this

function as mySequentialSearch() The input parameters for the mySequentialSearch() function are:

-1-D array (which you will use to store all the data from the access code file)

-The user's search key

-The size of the array

The list of access codes from the data file "SystemAccessCodes.txt" are:

1450 1452 1454 1456 1458 1460 1462 1464 1466 1453 1463 1468 1470 1472 1474 1476 1478 1480 1482 1484 1486 1488 1490 1492 1494 1496 1498 1500 1502 1504 1506 1508 1510 1512 1514 1516 1518 1520 1522 1524 1526 1528 1530 1532 1534 1536 1538 1540 1542 1544 1546 1548 1550 1552 1554 1556 1558 1560 1562 1564 1566 1568 1570 1572 1574 1576 1578 1580 1582 1584 1586 1588 1590 1592 1594 1596 1598 1600 1602 1604 1606 1608 1610 1612 1614 1616 1618 1620 1622 1624 1626 1628 1630 1632 1634 1636 1638 1640 1642 1644 1646 1648 1650 1652 1654 1656 1658 1660 1662 1664 1666 1668 1670 1672 1674 1676 1678 1680 1682 1684 1686 1688 1690 1692 1694 1696 1698 1700 1702 1704 1706 1708 1710 1712 1714 1716 1718 1720 1722 1724 1726 1728 1730 1732 1734 1736 1738 1740 1742 1744 1746 1748 1750 1752 1754 1756 1758 1760 1762 1764 1766 1768 1770 1772 1774 1776 1778 1780 1782 1784 1786 1788 1790 1792 1794 1796 1798 1800 1802 1804 1806 1808 1810 1812 1814 1816 1818 1820 1822 1824 1826 1828 1830 1832 1834 1836 1838 1840 1842 1844 1846 1848 1850 1852 1854 1856 1858 1860 1862 1864 1866 1868 1870 1872 1874 1876 1878 1880 1882 1884 1886 1888 1890 1892 1894 1896 1898 1900 1902 1904 1906 1908 1910 1912 1914 1916 1918 1920 1922 1924 1926 1928 1930 1932 1934 1936 1938 1940 1942 1944 1946 1948 1950 1952 1954 1956 1958 1960 1962 1964 1966 1968 1970 1972 1974 1976 1978 1980 1982 1984 1986 1988 1990 1992 1994 1996 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020 2022 2024 2026 2028 2030 2032 2034 2036 2038 2040 2042 2044 

.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago