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
The______ technique helps you explode possible risks by providing access to risk areas identified in the past. It also provides
Natalka [10]

Answer:

Threat and Hazard Identification and Risk Assessment

Explanation:

Its the threat and hazard identification and risk assessment technique that helps in exploding possible risks, which have been identified in the past. Also, it lists the solutions that were being brought to use for getting rid of the risk, and also list the outcome. Thus, you get the complete picture of the risk involved through the THIRA. And thus, you can easily get rid of them.

6 0
4 years ago
If something is copyrighted,
Over [174]
D. because you can’t copy a movie with credit, you have to have permission
7 0
4 years ago
Next, Kim decides to include a diagram of a frog’s life cycle in her presentation. She wants to use an image that is part of a p
kap26 [50]

Answer:

B, C, D, and F are correct answers

Explanation:

On edg

8 0
4 years ago
Read 2 more answers
In which type of essay would you expect to find the following passage? one of the biggest difficulties this town faces is heavy
luda_lava [24]
Problem and solution 

6 0
3 years ago
Read 2 more answers
Which of the following forces all traffic, communications, and activities through a single pathway or channel that can be used t
Ad libitum [116K]

Answer:

Option b. Choke point

Explanation:

In firewall, a choke point can be defined as a single point which allows all of the network traffic including incoming and outgoing to be funneled. As the passage of the whole traffic through the choke point regulates the flow as it focus monitoring  and controls bandwidth consumption, provides authentication, control efforts like Internet firewalls.

7 0
3 years ago
Other questions:
  • What are some of the visual clues a defensive driver can use to spot a impaired driver
    8·2 answers
  • What type of network component is Telnet?
    10·2 answers
  • Below is the prototype for a function that takes two pointers to integer variables as its parameters. The purpose of the functio
    14·1 answer
  • Who should be in charge of designing the database – team members, who understand the application requirements, or a database des
    11·1 answer
  • In what country was the English royal family and nobility living before the Restoration?
    6·1 answer
  • An example of hardware is a(n) _____.
    9·2 answers
  • What are some random fun facts about Technology?
    12·1 answer
  • Help me
    8·1 answer
  • What is the answer ??​
    6·2 answers
  • 10.13 lab 10c: output range with increment of 5 write a program whose input is two integers. output the first integer and subseq
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!