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
liraira [26]
3 years ago
5

import java.util.ArrayList; // Needed for ArrayList class /** This program demonstrates how to store BankAccount objects in an A

rrayList. */ public class ArrayListDemo6 { public static void main(String[] args) { // Create an ArrayList to hold BankAccount objects. ArrayList list = new ArrayList(); // Add three BankAccount objects to the ArrayList. list.add(new bankAccount(100.0)); list.add(new bankAccount(500.0)); list.add(new bankAccount(1500.0)); // Display each item. for (int index = 0; index < array.size(); index++) { BankAccount account = list.get(index); System.out.println("Account at index " + index + "\nBalance: " + account.getBalance()); } } }
Computers and Technology
1 answer:
slega [8]3 years ago
7 0

Answer:

import java.util.ArrayList; // Needed for ArrayList class

/** This program demonstrates how to store BankAccount objects in an ArrayList. */

// Class ArrayListDemo6 is defined

public class ArrayListDemo6 {

// main method that begin program execution

public static void main(String[] args) {

// Create an ArrayList to hold BankAccount objects.

// The arraylist is called list

ArrayList list = new ArrayList();

// Add three BankAccount objects to the ArrayList.

list.add(new bankAccount(100.0)); list.add(new bankAccount(500.0)); list.add(new bankAccount(1500.0)); // Display each item using a for loop

for (int index = 0; index < array.size(); index++)

{ BankAccount account = list.get(index);

System.out.println("Account at index " + index + "\nBalance: " + account.getBalance());

}

}

}

Explanation:

The code is written in Java and more comments has been added to make it more explanatory.

The code snippet is a demonstration on Arraylist.

First Arraylist is imported. Then, ArrayListDemo6 class is defined. Then the main method which begin program execution.

Inside the main method, a new Arraylist is created called list.

Then we add three BankAccount object to the list.

Lastly, we use a for loop to display each added BankAccount object.

You might be interested in
The means by which you interact with any program on a computer is called the ____. Answer
Elodia [21]
User interface is the answer
4 0
3 years ago
Averigua las diferentes intensidades, la potencia total y el gasto en € (de un mes de 30 días con el equipo conectado todo el ti
Naily [24]

<u>Explanation</u>:

<u>Here's what the question entails in clearer detail;</u>

Find out the different intensities, the total power and the cost in € (from a 30-day month with the equipment connected all the time) in the following case: Component Voltage (V) Power (P) CPU 0.95 V 27.97 W RAM 1,257 V 2.96 W Graphics Card 3.28 V 75.3 W HDD 5.02 V 19.3 W Fans 12.02 V 2.48 W Motherboard 3.41 V 18.3 W

7 0
3 years ago
What report provides data on how specific sections of a website performed?
zalisa [80]

Answer:What report provides data on how specific sections of a website performed? 100% Correct Answer: Content Drilldown report

Explanation: sorry if it’s wrong

3 0
2 years ago
Contrast the following terms (provide examples): Partial dependency; transitive dependency
kiruha [24]

Answer:

Explanation:

Transitive dependency

In this case, we have three fields, where field 2 depends on field 1, and field three depends on field 2.

For example:

Date of birth --> age --> vote

Partial dependency

It is a partial functional dependency if the removal of any attribute Y from X, and the dependency always is valid

For example:

Course and student these tables have a partial dependency, but if we have the field registration date, this date will depend on the course and student completely, we must create another table with the field registration date to remove this complete dependency.

If we remove or update the table registration date, neither course nor student must not change.

5 0
3 years ago
What is a utility application that monitors the network path of packet data sent to a remote computer?
stepladder [879]

Answer:

"Traceroute " is the  correct answer.

Explanation:

The traceroute commands in the networking that traces the network path The  traceroute is also displaying the information about the pack delay that is sent over the internet."Traceroute is also known as tracepath it means it calculated the path between the packets in the network. Traceroute takes the one IP address of the computer machine and taking another Ip address to calculate the path between the packets.

Traceroute Is a type of utility application that monitors the network between the packet that is sent into a remote computer.

7 0
3 years ago
Other questions:
  • Which of the following is not an impact device?<br> Joy Stick<br> Track Ball<br> Mouse<br> Printer
    10·1 answer
  • What will be the output of the following Python code? class A: def test1(self): print(" test of A called ") class B(A): def test
    15·1 answer
  • In 1-2 sentences describe how to use the thesaurus in the Word Processor
    11·2 answers
  • Which are appropriate uses for special effects in presentations?
    14·1 answer
  • Which of the following are some of the ways that the media influences consumers behavior
    9·1 answer
  • Please help explain this calculator code.
    15·1 answer
  • The term packet is used fairly generically to refer to protocol data unit (PDU). There are PDU equivalent names in the different
    15·1 answer
  • What is the base of a number system?
    8·1 answer
  • One of your suppliers has recently been in the news. Workers complain of long hours, hot and stuffy workrooms, poor lighting, an
    15·1 answer
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!