1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dimas [21]
3 years ago
10

Objects of the BankAccount class require a name (string) and a social security number (string) be specified (in that order)upon

creation. Declare two strings corresponding to a name and a social security number and read values into them from standard input (in that order). Use these values to define an object of type BankAccount named newAccount.
Computers and Technology
1 answer:
Maksim231197 [3]3 years ago
4 0

Answer:

import java.util.Scanner;

class BankAccountTest {

       public static void main(String[] args) {

           String name;

           String ssn;

           Scanner in = new Scanner(System.in);

// Receive User input

           System.out.println("Enter Your Name");

           name = in.nextLine();

           System.out.println("Enter Your Social Security Number");

           ssn = in.nextLine();

//Creating an object class BankAccount

           BankAccount newAccount = new BankAccount(name,ssn);

         

       }

   }

Explanation:

Using Java Programming Language

Use Scanner class to read values for name and social security numbers and store in the respective varibles

Make an object of the class BankAccount and supply to values to constructor call

Assume that the class BankAccount exists with the member feilds for name and ssn as below:

<em> public class BankAccount{</em>

<em>   //Class member variables</em>

<em>    private String name;</em>

<em>    private String ssn;</em>

<em>//Constructor</em>

<em>     public BankAccount(String name, String ssn) {</em>

<em>         this.name = name;</em>

<em>         this.ssn = ssn;</em>

<em>     }</em>

<em> }</em>

You might be interested in
Which task can be completed using the Export File menu?
VMariaS [17]

Answer:

You can export files!

6 0
4 years ago
What does this icon mean? <br> Plz hurry it’s for a school quiz you will get a brainly
Vera_Pavlovna [14]

Answer:

Filter data

Explanation:

If u dont believe me here is a pic

8 0
3 years ago
What would happen to a eukaryotic cell if all its mitochondriawere destroyed
julsineya [31]
The cell won't reproduce ATP.
4 0
3 years ago
Janis is preparing a financial document. She needs to use the dollar symbol placed above the number key 4. Which key will Janis
andreyandreev [35.5K]

C. Shift hold down to shift and then press 4

3 0
3 years ago
Read 2 more answers
Urgent. I will mark you brainliest. explain why cyber warfare is a real threat.​
stellarik [79]

Answer: Cyber warfare is a real threat since being able to hack another computer especially a countries computer with lots of info in their weaknesses can lead to their downfall. Since they can even possibly if their skilled enough hack their entire data base system and leak it to the public and that wouldn't be good for them not in a single possible way. That's the reason it's dangerous not only that but also because they can access their servers; which can let them access anything online from the whole country including banking information military info which can let them know which area there gonna go to next equipment there gonna bring and where they're gonna launch missiles, bombs, even nukes if they decide to launch one. And being able to hijack the computer that launches the nukes can make the hacker launch the nuke to a different place or launch the nuke on the country trying to launch the nuke.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which type of natural hazard is sometimes caused by human activity?
    6·1 answer
  • In our networked world, we have more opportunities to stereotype, which is problematic because:
    7·2 answers
  • Two words are a ""reverse pair"" if each is the reverse of the other. Write a program that finds all the reverse pairs in the wo
    12·1 answer
  • ____ is (are) the abuse of e-mail systems to send unsolicited e-mail to large numbers of people.
    14·1 answer
  • Assume that strikeCounter has already been declared to be a "pointer to int". Assume further that strikeCounter has been initial
    5·1 answer
  • Explain the statement that relational algebra operators can be composed. Why is the ability to compose operators important
    7·1 answer
  • Write a program that will input two numbers and print the larger number on the screen.
    13·1 answer
  • Write a statement that takes a variable named file_object that contains a file object and reads its contents into a Python list
    7·1 answer
  • El planeamiento estratégico de una empresa es​
    9·1 answer
  • In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!