Credit card is mastercard or visa card

Assignment Help Business Management
Reference no: EM131274232

First your program should ask if the credit card is MasterCard or visa card. Then ask the 16 digit credit card number. Then add all the digits in the credit card number and get the modulo 10. If the modulo 10 of the summation of all the digits is zero, then its valid visa card. If the modulo 10 of the summation of all the digits is 1 then its valid MasterCard. Otherwise, the number customer has entered is an invalid card number. There are two other requirements that make this problem unique:

A) You need to read the card number as a single string and each 4 numbers in the card must be separated by a space. For example, following is a correct input 1234 5678 6789 1235

B) Card number must have 16 digits. If not, display the error message "incorrect card number"

My main issue has been parsing the integers from the long string. I'm using scan.nextLine() to capture the entire number with the spaces, but when I try to parse it, I get a NumberFormatException error.

Reference no: EM131274232

Questions Cloud

Is there anything that occurred in the child environment : What was the outcome of this stage for you? Did anything happen in your life prior to that stage that affected the outcome? How does the outcome from that stage affect how you are today? Provide specific details that demonstrate your understanding..
Open source or proprietary web server software : From the third e-Activity, identify a company (bank, car wash, travel agency, nonprofit, restaurant, etc.) and suggest whether you think it should choose to use Open Source or Proprietary Web Server software and explain why. Support your opinion w..
Troubleshooting web forms : Imagine that a local college hired you to look at a lengthy form on the university's office of admissions Website. Prospective students have been calling the office to request information instead of utilizing the university's Website. The form con..
Write a program that computes the salaries for a employees : The first programming project involves writing a program that computes the salaries for a collection of employees of different types. This program consists of four classes.
Credit card is mastercard or visa card : First your program should ask if the credit card is MasterCard or visa card. Then ask the 16 digit credit card number. Then add all the digits in the credit card number and get the modulo 10.
Commercial intrusion prevention systems : Contact the vendors of 2 commercial intrusion prevention systems and ask them at least 3 questions of your own choice about the products capabilities.
Design a basic file transfer protocol command line tool : Design and implement a basic File Transfer Protocol command line tool. When executed, the tool will display a simple ftp> prompt in console where the user can enter commands to upload and download files from a remote server.
Identify an issue currently in the news that relate federal : Evaluate what this development may mean for your work in health care administration.
Compliant information security program : Your briefing paper should fully answer the question "Why should our company adopt an ISO/IEC 27001 compliant Information Security Program?"

Reviews

Write a Review

Business Management Questions & Answers

  Should gabriela insource or outsource the item

Gabriela was able to find a new supplier that would provide the item for $1.80 per unit with an annual fixed cost of $200,000. Should Gabriela insource or outsource the item?

  What is the systems theory models of decision-making

What is the Systems theory models of decision-making, What are the benefits and provide an example. Provide an example on how it will help in your field of work.

  Legal issues in information security

Please provide information that has been certified as not similar to anything else on the internet or schools. I will not accept anything above 20% similarity according to my school verification. Please respond to my additional questions within 24..

  Difference between satisfaction of male and female customers

A member of your team has suggested that, when you perform this analysis, you should undertake a series of hypothesis tests to examine the following: Is there any difference between the satisfaction of male and female customers with the response t..

  Expected return on stock

The stock has an expected return of 3.3%. Given the information below, what is the expected return on this stock if the economy booms?

  Product development and the business plan

Which section or sections of a business plan submitted to venture capitalists are the strongest and which sections are traditionally the weakest?

  Successfully compete in the global marketplace

As current and future managers of technology and innovation, what approaches and initiatives do you plan to utilize to ensure that your organization continues to successfully compete in the global marketplace?

  Describe why do you think businesses internationalize

Describe why do you think businesses internationalize? Which forces are most significant or influential and which are secondary forces to consider? Cite some examples. Organized and be specific.

  Fruit of the spirit and spiritual gifts

1. Unconfessed sin is among the conditions that are hindrances to prayer. 2. The fruit of the spirit and spiritual gifts are the same concepts. 3. When making hard decisions, it is important to ask if the decision will be spirituall..

  Assignment about the accident - american air 1420

Need Five slides Of PPT with speaker notes and One page and half. Instructions: I need this assignment about the accident (American Air 1420)

  Can an organization ensure it project success

Can an organization ensure IT project success by addressing the Critical Failure Factors alone? Discuss

  Difference between the biba integrity model

Describe the difference between the Biba Integrity Model and the Clark-Wilson Integrity Model. Give an overview of the Bell LaPadula Confidentiality.

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