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
When creating a presentation you should use a blank as a starting point?
Lera25 [3.4K]
A blank presentation is recommended as the starting point when creating a PowerPoint presentation.  PowerPoint <span>lets you change the appearance, layout and content of your presentation at any time. Starting with a blank presentation lets you experiment more easily with the many features this program offers.</span>
6 0
3 years ago
1. Light of wavelength 900x10-9 m is emitted by a source. What is its frequency?​
andrezito [222]

therefore the frequency = 6×10^14

7 0
2 years ago
Use the drop-down menus to complete the steps to share a presentation through OneDrive.
charle [14.2K]

Answer:

Share

OneDrive

In real time

Send

Explanation:

5 0
3 years ago
What are the pros and cons of using ICT​
Setler79 [48]

Answer:

Communication - Speed / time – money can be saved because it's much quicker to move information around. ...

Globalization - Video conferencing saves money on flights and accommodation. ...

Cost effectiveness - It feels free to send an email (although it isn't); it's without doubt cheaper than phone calls.

Explanation:

4 0
2 years ago
Change the quick style gallery display
OverLord2011 [107]

Answer:

wdym?

Explanation:

5 0
2 years ago
Other questions:
  • To what extent can u justify that computer is not the only ICT tool?​
    9·1 answer
  • Which date formats are allowed in Excel for February 14, 2018? Check all that apply.
    15·2 answers
  • Write the definition of a class Counter containing: An instance variable named counter of type int. An instance variable named l
    14·1 answer
  • What is a central location that houses Joint Information System (JIS) operations and where public information staff perform publ
    6·1 answer
  • Gigantic Life Insurance is organized as a single domain. The network manager is concerned that dividing into multiple domains to
    15·1 answer
  • Windows displays a(n)
    11·1 answer
  • I need to calculate the % of Grand Total on Microsoft Excel, but can't for the life of me remember how to do that. Help would be
    8·1 answer
  • Karin realized that a song takes up a lot more space on her computer than the lyrics of the song typed out in ms word document .
    12·1 answer
  • State Whether the given statement are TRUE OR FALSE. 13X1=13
    10·1 answer
  • Launa is reviewing several videos from her friends doing the latest dance challenge before they are published on their own
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!