Tamamlanmış

Java ArrayList Objects (I have started just need some fixes)

Credit Cards:

Create the CreditCard class. Every card has an account number, balance, owner, and credit limit. An account number is 16 digits and is stored as a String.

Credit cards need the following methods:

• initializing constructor

• apply a charge to the account: if the charge will cause the credit limit to be exceeded, do not apply the charge and return false, otherwise add the charge to the balance and return true

• equals to compare the account numbers

• a static method to validate an account number (described below)

• toString: put all fields on one line, do not label the fields

You do not need any set or get methods for the CreditCard class.

Storing Credit Cards:

Create a class AllCards to hold all of the credit cards. This class will use an ArrayList as a field to hold the cards. The class will need the following methods:

• constructor to instantiate the ArrayList

• create a card and add it to the ArrayList of cards

• process a purchase: check whether the card number is valid; if so, find the card in the list and attempt the purchase; if there is an error then throw an exception:

◦ 1 InvalidCardNumberException

◦ 2 CardNumberNotFoundException

◦ 3 OverdrawnException

• You need to create these Exception classes.

• toString: return a String which contains all of the credit cards stored in the ArrayList; add a newline between the cards so each card is on a separate line

When you are processing a purchase you need to search the credit cards to see if there is one for the given account number. This means that you need to search the ArrayList in the AllCards object to see whether it has a card with the given account number. To search the ArrayList use the indexOf method. This will return the location (in the ArrayList) of the matching card, or it will return -1 if there is no matching card. Then use the get method of ArrayList to retrieve the card. To use the indexOf method you must pass a CreditCard object because the ArrayList contains CreditCard objects; you can't pass an account number. Before you call indexOf, create a credit card with the given account number. The other fields don't matter, you can fill in 0 or null for each of them. The indexOf method uses the equals method of CreditCard to check whether a card is in the list, and the equals method only compares the account numbers, so it will work correctly. When the get method returns it will return the object from the ArrayList, which has the correct data in all fields.

You do not need any set or get methods for the AllCards class.

Client Code:

Your client code needs to do the following:

• create the AllCards object

• read the [login to view URL] file, creating the objects for the cards and adding them to the AllCards object

• process each transaction in the [login to view URL] file: check for errors and then either update the object for the credit card or add a message to the error log

• print the credit cards on the screen with headings

• do not put all of this code in main; make sure that you use other functions as appropriate

Beceriler: Java, Yazılım Mimarisi, Javascript, JavaFX, PHP

Daha fazlasını gör: need fixes upgrade php site, need fixes upg, java distributed objects http, getafreelancer need fixes upgrade php site, java distributed objects, interactive brokers java interface objects, java moving objects image background, i have multiple document that just need to be retyped into word as i need to make changes to them they need to be edited, i just need design, i need an android app i already have a design for it i just need it to be built gps service for taxi, very simple job i just need a photoshop expert to give, i have a smartphone design i just need a manufacturer, i have drawn the logo i just need someone to design it, i just need an illustration for children's book, i just need a small graphic designs, i want to learn java programming language i need help, translate english to xhosa dad if you don t want to see me then i will just go to my lawyer i need my car fixed, his is a simple project. I just need some database tables designe, I need my website re-configured.I already have a design, I just need you to build my personal website.

İşveren Hakkında:
( 1 değerlendirme ) South Plainfield, United States

Proje NO: #21295983

Seçilen:

PATechnology

Hi, I am interested in the task and have an experience in java. Please ping me to discuss more. Thanks

%selectedBids___i_period_sub_7% gün içinde 40%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(90 Değerlendirme)
6.1

Bu iş için 20 freelancer ortalamada $122 teklif veriyor

liangjongai

Hi, sir I love Java I have read carefully about your requirements. I have best skills and much experiences in java developing. I have already completed so much projects and get good reviews from employers. I am sure I Daha Fazla

$50 USD in 2 gün içinde
(420 Değerlendirme)
8.1
latatestTech

With Freelancer Preferred badge bound to give 100% Quality (Let's Chat) Hello, A great team is here for your service!! I read the project description properly, and I agreed to fulfill 100% of all your requirements. Daha Fazla

$140 USD in 10 gün içinde
(162 Değerlendirme)
7.9
yuriyes43

Dear Sir! I’d like to describe myself as someone who is versatile and determined and someone who loves learning. I am creative, open-minded and easy going and I enjoy working with others. And I tried to use all these q Daha Fazla

$155 USD in 2 gün içinde
(96 Değerlendirme)
7.0
asadrana91

Hi there this is Asad. I have a vast experience in java programming, i can surely help you out with the code. If you are looking to get a good grade. Contact me.

$200 USD in 2 gün içinde
(114 Değerlendirme)
6.7
grigorywazin

Hello, How are you? I have just read your project description so I am bidding with the willing wish that I will be the most powerful candidate for your project. Your project description attracts me because you want m Daha Fazla

$140 USD in 7 gün içinde
(43 Değerlendirme)
6.7
paulprabhakarand

Hi Gentleman, This is Paul Devanesan has done [login to view URL] and [login to view URL] from IIT Madras. I am a technology expert, more than a decade I am developing and delivering applications on Java based technologies. I am a certified Jav Daha Fazla

$200 USD in 5 gün içinde
(40 Değerlendirme)
5.8
fivestar10

Hi! I am very happy to see your project detail. I think it is just my project. :) As you can see in my profile, (my review: https://www.freelancer.com/u/fivestar10?w=f) I have much experience with your job. please cont Daha Fazla

$140 USD in 2 gün içinde
(33 Değerlendirme)
5.6
Developer000

Feel fee to contact me for Java ArrayList Objects .Shoot me message to discuss further more details .We provide the comments,images,videos,demos and live sessions in order to help the [login to view URL] payment only after Daha Fazla

$150 USD in 3 gün içinde
(56 Değerlendirme)
5.8
greenguru2018

Hello, How are you? My pleasure to bid your project. I've read carefully your project description. I have more than five years experience in development related with your project. Your satisfaction with the project is Daha Fazla

$140 USD in 7 gün içinde
(22 Değerlendirme)
4.7
corke123

Hi. I would like to do this project for you. This looks like an easy task to me and I can start right now and finish it in couple of hours. Message me to discuss more details about your project.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(26 Değerlendirme)
4.5
JinTai

Hello i see u need some help for fixing some errors about java arryalist. I can help you with that and start right now. I am a Java and PHP expert you wanna find out. ArrayList often thorows some errors about a bit fau Daha Fazla

$140 USD in 6 gün içinde
(6 Değerlendirme)
3.8
jiangstar

Hello! I have read your job description from start to end very carefully. I am a senior Java expert and I have experienced for +7 years with Java/JavaFx/JavaCollection/ArrayList. I am also very familiar with exceptio Daha Fazla

$60 USD in 5 gün içinde
(6 Değerlendirme)
3.2
roshpatidar01

i am java native developer can do this easily. please have a look i am senior android developer not a bidder with 7 years of experience. i have worked on, Websites development ,Android Application Development ,IOS D Daha Fazla

$140 USD in 7 gün içinde
(5 Değerlendirme)
3.3
olga23407

hello, my name is Artur and I am professional Java developer. currently I am working in internet security sphere and can easily done Your task.

$35 USD in 5 gün içinde
(12 Değerlendirme)
2.8
rk123c

Hey Hi, I'm a full stack application developer having 3+ years of experience in development.I'm a Java expert and have great coding skills. I've seen the project description. I can help you in this java code and give Daha Fazla

$60 USD in 2 gün içinde
(4 Değerlendirme)
2.3
Farhan81o

Hello Nice to meet you. I'm full stack developer with 5 years experience in Java, Spring Boot programming. Please contact me if you are looking for a Java expert. I have a lot of experiences with Spring MVC, Securit Daha Fazla

$100 USD in 3 gün içinde
(2 Değerlendirme)
1.6
babyphilo

Hello, I have checked the details. I will satisfy all your requirements. Don’t waste your precious time and cash – I'm professional and that I skill to form real. I assure you that I can deliver your work in the best Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(1 Yorum)
0.7
kevindeveloper9

Hi, Thanks for posting !!! I have 14 years of experience in Website and Mobile apps. I have checked the requirement and understand. I have created website SIMILAR to do you want to see the DEMO ???? Thanks Daha Fazla

$250 USD in 2 gün içinde
(0 Değerlendirme)
0.0
$155 USD in 2 gün içinde
(0 Değerlendirme)
0.0