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
Microsoft words spell checker
Virty [35]
To check spelling<span> in a </span>Word<span> document, open up the document, head to the “Review” tab, then click on “</span>Spelling<span> & Grammar” (part of the “Proofing” group of tools). 

</span>
4 0
3 years ago
A good example of an agency relationship in a hotel is the relationship between a bartender and a server. True False
ololo11 [35]

Answer:

False

Explanation:

An agency relationship is a fiduciary relationship, where one person (called the 'principal') allows an agent to act on his or her behalf. The agent is subject to the principal's control and must consent to her instructions.

A good example of agency relationship is between celebrities (musicians, actors etc.) and their managers.

A bartender and a server are nowhere near two parties in an agency relationship with each other.

8 0
3 years ago
Give examples of an outdated memory or storage device. what do you think is the main reason they are outdated?
omeli [17]

Answer:

floppy discs:

easily damaged, large compared to newer external storage drives, newer computers don't have a floppy disc drive

Explanation:

8 0
2 years ago
Read 2 more answers
1. Write programming code in C++ for school-based grading system. The program should accept the Subject and the number of studen
satela [25.4K]

In this program, I am using the school-based grading system and the program should accept the subject and the number of students.

Program approach:-

  • Using the necessary header file.
  • Using the standard I/O namespace function.
  • Define the main function.
  • Declare the variable.
  • Display enter obtain marks in 5 subjects.
  • Return the value.

Program:-

//header file

#include<iostream>

//using namespace

using namespace std;

//main method

int main()

{

//declare variable

  int j;

  float mark, sum=0, a;

//display enter obtain marks in 5 subjects

  cout<<"Enter Marks obtained in 5 Subjects: ";

  for(j=0; j<5; j++)

  {

      cin>>mark;

      sum = sum+mark;

  }

  a = sum/5;

//display grade

  cout<<"\nGrade = ";

  if(a>=91 && a<=100)

//display a1

      cout<<"a1";

  else if(a>=81 && a<91)

//display a2

      cout<<"a2";

  else if(a>=71 && a<81)

      cout<<"b1";

  else if(a>=61 && a<71)

      cout<<"b2";

  else if(a>=51 && a<61)

//display c1

      cout<<"c1";

  else if(a>=41 && a<51)

//display c2

      cout<<"c2";

  else if(a>=33 && a<41)

//display d

      cout<<"d";

  else if(a>=21 && a<33)

//display e1

      cout<<"e1";

  else if(a>=0 && a<21)

//display e2

      cout<<"e2";

  else

//display invalid

      cout<<"Invalid!";

  cout<<endl;

//return the value

  return 0;

}

Learn more grading system

brainly.com/question/24298916

7 0
3 years ago
Which of the following is an example of a specialty search engine? a. NexTag b. Wolfram Alpha c. Bing d. Google
Serjik [45]

Answer:

b. Wolfram Alpha

Explanation:

A specialty search engine can be defined as a type of database query engine which searches for informations and indexes them based on a particular content, subject or focus such as location, topic, government, industry etc. A specialty search engine is different from the general-purpose search engines such as Bing, Google or Yahoo because it gives results that are tailored or more relevant to a particular user.

Wolfram Alpha is an example of a specialty search engine. A Wolfram Alpha is an answer search engine which gives answers to specific questions such as computational, arithmetic, geometric mathematics or calculus.

Also, note that a specialty search engine is commonly referred to as a topical or vertical search engine.

6 0
3 years ago
Other questions:
  • What's the best way to change the font size of all your notes pages at once?
    14·2 answers
  • Paragraph: Read the following two e-mail messages. In a paragraph of no less than 125 words, explain why e-mail B is the more ap
    11·1 answer
  • Which error produces incorrect results but does not prevent the program from running?
    7·1 answer
  • Which of the following does not illustrate the survey method of choosing a speech topic?
    6·2 answers
  • HURRY!!!!!!
    5·1 answer
  • Which term is used to describe bitmap images
    8·2 answers
  • An action that makes an employee uncomfortable in any way is classified as
    5·1 answer
  • Write a script that will read from a file x and y data points in thefollowing format:
    9·1 answer
  • Jess computer has system software including an operating system and utility software jess runs the defragmentation program on he
    5·1 answer
  • Which of the following is not a valid Java identifier? a. Factorial, b. anExtremelyLongldentifierlfYouAskMe, c. 2ndLevel, d. Iev
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!