Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M91611704
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Java

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As