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
Illusion [34]
3 years ago
6

LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c

alled myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList), that uses the printinfo methods defined in the respective classes and prints each element in myGarden. The program should read plants or flowers from input (ending with -1), adding each Plant or Flower to the myGarden ArrayList, and output each element in myGarden using the printinfo method Ex. If the input is: plant Spirea 10 flower Hydrangea 30 false lilac flower Rose 6 false white plant Mint 4 -1 the output is: Plant Information: Plant name: Spirea Cost: 10 Plant Information: Plant name: Hydrengea Cost: 30 Annual: false Color of flowers: lilac Microsoft Edge Plant Information: Plant name: Hydrengea Cost: 30 Annual: false Color of flowers: lilac Plant Information: Plant name: Rose Cost: 6 Annual: false Color of flowers: white Plant Information: Plant name: Mint Cost: 4 LAB ACTIVITY 9.18.1: LAB: Plant information (ArrayList) 10/10 Current file: PlantArrayListExample.java Load default template... 1 import java.util.Scanner; 2 import java.util.ArrayList; 3 import java.util.StringTokenizer; 4 5 public class PlantArrayListExample { 6 7 // TODO: Define a PrintArrayList method that prints an ArrayList of plant (or flower) objects 8
Computers and Technology
1 answer:
sashaice [31]3 years ago
4 0

Answer:

LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList), that uses the printinfo methods defined in the respective classes and prints each element in

You might be interested in
Uses computer resources from multiple locations to solve a common problem.
Lynna [10]

Answer:

Distributed Computing is used to solve common problem from multiple locations at different locations.

Explanation:

It is the architecture of processor, that is used to combine the different resources of computer from different domain to solve the common problem.

It allows us resource sharing such as hardware and software that are connected to the computer.

Examples

Following are the examples of Distributed computing.

  1. Telecommunication Network
  2. sensor network
  3. banking network

8 0
3 years ago
What is the famous saying among computer programmers?
USPshnik [31]
The famous saying is garbage in , garbage out .
3 0
3 years ago
Which statement is true?
Klio2033 [76]

Answer:

You need to import the deque methods in order to use a deque.

Explanation:

the correct option is B

You need to import the deque methods in order to use a deque.

Please mark me as brainliest

5 0
3 years ago
Read 2 more answers
Describe types of hardware used for output​
sashaice [31]
A computer output device is used to extract information from a computer. There are visual, audio, print and data output devices. Different types of specific hardware include monitors, speakers and headphones, printers and external hard drives.
3 0
3 years ago
PLEASE HELP!!!!!
Allushta [10]

Answer:

Insert

Explanation:

Insert

7 0
3 years ago
Read 2 more answers
Other questions:
  • The amount of interest you will earn in one year from a savings account is the _____. A) APY B) return C) IDA D) CD
    12·2 answers
  • If a router receives a packet and it does not have an entry in its routing table for the destination network, it will send the p
    13·1 answer
  • Which of the following should NOT be done to keep people from slipping on floors? A) Have the proper absorbents in an easy-to-fi
    12·2 answers
  • The Status bar is used to control the majority of the drafting settings in AutoCAD
    13·1 answer
  • Write code that uses the input string stream inSS to read input data from string userInput, and updates variables userMonth, use
    8·1 answer
  • The incandescent test lamp is used to check for the presence of
    6·1 answer
  • . ____________is/are the JSP ImplicitObject(s).sessionapplicationconfigAll of GivenNone of Given
    9·1 answer
  • I need help with this line of code:
    5·1 answer
  • This is a quick and easy program that will let you practice the basics of the switch statement. You will ask the user to enter a
    6·1 answer
  • 1. find the network address for 172.22.49.252/17
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!