Charge Account Validation
In the Chap07 folder of the Student Sample Programs, you will find a file named ChargeAccounts.txt. The file contains a list of a company’s valid charge account numbers. There are a total of 18 charge account numbers in the file, and each one is a 7-digit number, such as 5658845.
Create an application that reads the contents of the file into an array or a List. The application should then let the user enter a charge account number. The
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Pearson eText for Starting out with Visual C# -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Starting Out with C++: Early Objects (9th Edition)
Degarmo's Materials And Processes In Manufacturing
Concepts Of Programming Languages
INTERNATIONAL EDITION---Engineering Mechanics: Statics, 14th edition (SI unit)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
- Write a statement that declares a procedure-level one-dimensional array named intorders. The array should contain 15 elements.arrow_forwardUsing C# in Microsoft Visual Studio Create an application that simulates a game of tic-tac-toe. The application should use a two-dimensional int array to simulate the game board in memory. When the user clicks the New Game button, the application should step through the array, storing a random number in the range of 0 through 1 in each element.The number 0 represents the letter O, and the number 1 represents the letterX. The form should then be updated to display the game board. The application should display a message indicating whether player X won, player Y won, or the game was a tie.arrow_forwardAssignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the "*" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level Re-initialize the 2D array and fill every element with the "*" symbol. 2. Add Platform Prompt the user to enter a starting point and length for the horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns (or out of bounds), notify the user that this is not possible. 3. Add Item Prompt the user to enter a column and row index. Replace that element in the…arrow_forward
- Assignment 5C: Level Map Creator. There are a variety of ways that game developers store their level layouts. One simple method is to associate level elements with certain symbols, and then storing them in a 2D grid inside a text file. We will use our knowledge of 2D arrays to create a very simple Level Map Creator tool. The program should prompt the user to enter a width and height for the level. Then it should initialize a 2D array and fill every element with the *" symbol. Afterwards, the user should be given the following options via a menu: 1. Clear Level 2. Add Platform Prompt the user to enter a starting point and length for the Re-initialize the 2D array and fill every element with the "** symbol. horizontal platform. Replace those elements in the 2D array with the "=" symbol. If the length is longer than the number of columns |(or out of bounds), notify the user that this is not possible. Prompt the user to enter a column and row index. Replace that element in the 2D array…arrow_forwardCreate an application that reads numbers from a file into an array, displays the array’s contents in a ListBox control, and calculates and displays all the followings: The total of the array’s values. The average of the values in the array The largest value in the array The smallest value in the arrayarrow_forwardIn visual basic Write the code that will sequentially search through the array strFirstNames and will print out the word "Found" if the name "Brian" is in the array.arrow_forward
- Assuming an application has an array of integers named intNumbers, write code that writes the contents of the array to the file numbers.txtarrow_forwardDate Printer Write a program that reads a char array from the user containinga date in the form mm/dd/yyyy. It should print the date in the form March 12, 2014.arrow_forwardThe intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal variable contains the number 0 before the loop is processed. a. For Each intX As Integer In intNums intTotal += intX Next intX dblAvg = intTotal / intNums.Length b. For Each intX As Integer In intNums intTotal += intNums(intX) Next intX dblAvg = intTotal / intX c. For Each intX As Integer In intNums intTotal += intNums(intX) intX += 1 Next intX dblAvg = intTotal / intX d. None of the above.arrow_forward
- C# Windows Application Tic-Tac-Toe Simulator- Create an application that simulates a game of tic-tac-toe. Figure 7-49 shows an example of the application’s form. The form shown in the figure uses eight large Label controls to display the Xs and Os. The application should use a two-dimensional int array to simulate the game board in memory. When the user clicks the New Game button, the application should step through the array, storing a random number in the range of 0 through 1 in each element. The number 0 represents the letter O, and the number 1 represents the letter X. The form should then be updated to display the game board. The application should display a message indicating whether player X won, player Y won, or the game was a tie.arrow_forward1- Arrays can be created to store values of multiple data types at one place. True False 2- To copy the contents of one array to another you must copy the individual array elements. True Falsearrow_forwardThe intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loop is processed. a. Do While intSub < 4 intNums(intSub) = intTotal + intTotal intSub += 1 Loop dblAvg = intTotal / intSub b. Do While intSub < 4 intTotal += intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub c. Do While intSub < 4 intTotal += intNums(intSub) intSub += 1 Loop dblAvg = intTotal / intSub – 1 d. Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / (intSub – 1)arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning