Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BlueJ programming(Java). Has to work when I compile and run it. Please and thanks. Assignment-8 For this assignment, write a program to validate credit card

BlueJ programming(Java). Has to work when I compile and run it. Please and thanks. image text in transcribed
Assignment-8 For this assignment, write a program to validate credit card numbers as explained in Programing Exercises 6.31 on page 243 in the book. Refer to section 6.2 on page 236 for a relevant discussion Requirements Create the methods main, sumOdd, sumEven, validLength, validNumber and type with the following properties: main Prompts for a credit card number, reads the number from the keyboard and calls the other methods to produce the required results validLength Checks the length of the number entered and returns true if the number is 13 or 16 digits in length. validNumber Checks the values returned from sumodd and SumEven and returns true if the credit card number is correct, or false otherwise. type Returns the type of the credit card the number represents (visa, discover, etc.) sumEven Sums the digits in even positions according to the algorithm provided in the book. sumOdd Sums the digits in odd positions according to the algorithm provided in the book

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions