Create a class with a method that accepts a charge card acnt

Assignment Help JAVA Programming
Reference no: EM13940831

Create a class with a method that accepts a charge card account number as its argument. The method should determine whether the number is valid by comparing it with a list of valid charge card account numbers. The comparison should be accomplished using a search. If the account number to be checked is in the list of valid account numbers, the method should return true and if the number is not in the list, the method should return false.
The valid account numbers are stored in a file named valid_accounts.txt. A copy of this file should have accompanied this exam. You should create a method that will read the valid charge card account number list and return an array or arrayList object with the 7 digit integer values stored in the file (none of the numbers start with the digit zero).
The account numbers to be checked are stored in a file named accounts_to_check.txt. A copy of this file should have accompanied this exam. You should use the same method as above that will read the charge card account number list and return an array or arrayList object with the 7 digit integer values stored in the file (none of the numbers start with the digit zero).
You should also create a method that takes an array or arrayList object, arranges the charge card account numbers in ascending order and returns the sorted array or ArrayList object.
Demonstrate your class methods in a driver program by reading the charge card account numbers to be checked for validity from a file named accounts_to_check.txt, testing to see if each number that is in the file is valid, and displaying the result of that check in a report. Consider your output a report that someone could easily verify against a sorted valid accounts list. Output two additional reports: A sorted valid accounts list and a sorted accounts to check list.
If you use an ArrayList, you will have to do some independent research to accomplish this solution. Be sure to document any classes or methods you use outside the scope of chapters 1-8 in the book.
The files valid_accounts.txt and accounts_to_check.txt accompany this Final Exam document.
valid_accounts.txt:

9219306
7569177
4256928
4364059
6221744
3176698
7187438
4484503
8937630
6389278

3933096
7342775
2877438
5426950
9982031
4654335
5045697
5034644
6989075
8314073

1613911
1335305
6196903
8449641
1545292
4906480
1336532
3124745
7122978
1800843

7934692
6551425
8461254
1559757
4192728
1025121
1417918
1751466
5200307
4082692

3509247
7145465
9860616
1128882
2396421
5390896
2311287
3545377
1886054
6429595

accounts_to_check.txt:
2197966
4256928
1075220
2877438
4378016

8314073
2073673
8449641
8073168
1800843

4119317
1025121
8282263
4082692
5950660

2396421
5434498
9152307
3545377
8039204

1336532
6135520
8461254
4654335
7187438

Reference no: EM13940831

Questions Cloud

Calculate the percentage saving in weight : The drive shaft to a boat's propeller is 50 mm in diameter. If a 25 mm diameter hole is bored along its length calculate the percentage saving in weight and the percentage reduction in torsional streng
Prepare the statement of cash flows of dux company : Prepare the statement of cash flows of Dux Company for the year ended December 31, 2011. Present cash flows from operating activities by the direct method. (You may omit the schedule to reconcile net income to cash flows from operating activities...
Online commercial job boards : Collect 10 job advertisements from sources including online commercial job boards , linked In.com and government or military websites. These jobs must be for entry-level HR positions or for HR graduates.
Distinguish among the risk principle, the needs principle : Why is the family "system" such a powerful unit? How could such a system contribute to an adolescent becoming delinquent? How could such a system help rehabilitate a delinquent family member?
Create a class with a method that accepts a charge card acnt : Create a class with a method that accepts a charge card account number as its argument. The method should determine whether the number is valid by comparing it with a list of valid charge card account numbers
What information would you request from the retailer : What additional questions would you raise, and what information would you request from the retailer to answer these questions?
Determine the minimum dimensions of the crosssection : Determine the minimum dimensions of the crosssection and the radius of curvature at the point of maximum stress.
What are challenges of creating a counterterrorism policy : What are the challenges of creating a counterterrorism policy? Counterterrorism measures and policies are being created and implemented internationally. Do you think that counterterrorism policies are effective and can help control and combat terr..
Plot the shear force and bending moment diagrams : Plot the shear force and bending moment diagrams and determine the maximum stress due to bending, the factor of safety in operation if the UTS of the material is 500 MPa, and the value radius of curvature between the suspension points.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd