1. Create a class with a method that accepts a charge account number as its argument. The method should determine whether the number is valid by comparing it to the following list of valid charge account numbers: 5658845 520125 7895122 8777541 8451277 1302850 8080152 4562555 5552012 5050552 7825877 1250255 1005231 6545231 3852085 7576651 7881200 4581002 These numbers should be stored in an array. Use a sequential search to locate the number passed as an argument. If the number is in the array, the methodshould return true, indicating the number is valid. If the number is not in the array, the method should return false, indicating the number is invalid. Write a program that tests the class by asking the user to enter a charge account number. The program should display a message indicating whether the number is valid or invalid. 2. A teacher made a list of all of the marks in the class. Print out the following things. 1. All of the marks in the class. 2. Every second mark in the class. 3. Every third mark in the class. 4. The marks backwards. 5. The marks vertically down the pages. 6. The marks with a % sign after them. Make sure that each entry has a title before it.
1. Create a class with a method that accepts a charge account number as its argument. The method should determine whether the number is valid by comparing it to the following list of valid charge account numbers: 5658845 520125 7895122 8777541 8451277 1302850 8080152 4562555 5552012 5050552 7825877 1250255 1005231 6545231 3852085 7576651 7881200 4581002 These numbers should be stored in an array. Use a sequential search to locate the number passed as an argument. If the number is in the array, the methodshould return true, indicating the number is valid. If the number is not in the array, the method should return false, indicating the number is invalid. Write a program that tests the class by asking the user to enter a charge account number. The program should display a message indicating whether the number is valid or invalid. 2. A teacher made a list of all of the marks in the class. Print out the following things. 1. All of the marks in the class. 2. Every second mark in the class. 3. Every third mark in the class. 4. The marks backwards. 5. The marks vertically down the pages. 6. The marks with a % sign after them. Make sure that each entry has a title before it.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help me with these array questions using java
Expert Solution
Step 1
“Since you have asked multiple questions, we will solve the first question for you. If you want any specific question to be solved then please specify the question number or post only that question.”
java introduction:-
Developed in 1995, Java is a well-known programming language.
More than 3 billion devices use Java, which is owned by Oracle.
its uses
- cellular applications (especially Android apps).
- computer programs.
- Web-based software.
- servers for websites and applications.
- Games.
- relational database.
- The list goes on and on!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education