subject

11. given the following class import java. util. arraylist; public class rectangletester { public static void main(string[ ] args) { arraylist< rectangle > shapes = new arraylist< rectangle > (); shapes. add(new rectangle(1, 1)); shapes. add(new rectangle(2, 2)); shapes. add(new rectangle(3, 3)); shapes. add(new rectangle(4, 4)); rectangle datarecord; for(int index = 0; index < shapes. size(); index++) { datarecord = shapes. get(index); datarecord. calcrectarea(); datarecord. calcrectperimeter(); system. out. println(area = + datarecord.; system. out. println(perimeter = + datarecord.; } } } assume that getarea() returns the area of a rectangle and getrectperimeter() returns the perimeter of a rectangle. what will print when index = 3? (3 points) question 11 options: 1) area = 9 perimeter = 12 2) area = 4 perimeter = 8 3) area = 16 perimeter = 16 4) area = 25 perimeter = 20 5) area = 1 perimeter = 4

ansver
Answers: 1

Another question on Advanced Placement (AP)

question
Advanced Placement (AP), 23.06.2019 18:30
Describe the social and economic challenges facing the newly formed country of slovakia.
Answers: 1
question
Advanced Placement (AP), 24.06.2019 07:40
Compare and contrast the environmental consequences of reliance on coal with reliance on petroleum.
Answers: 2
question
Advanced Placement (AP), 26.06.2019 02:00
Two technicians are discussing oil changes. technician a says that waste oil and old filters need to be disposed of according to the law. technician b says that old filters can be returned to the parts department for a core value. which technician is correct?           a. technician a only   b. both technicians a and b   c. technician b only   d. neither technician a nor b
Answers: 1
question
Advanced Placement (AP), 27.06.2019 08:00
When finn studies, he likes to consult multiple types of resources, such as books, journals, and online information. he usually studies in his bedroom, but he's found that he doesn't concentrate as well there. he decides to change locations, but doesn't know where to go. which would be the best place for finn to study, based on his preferences? a. the school library and media center b. a computer lab c. a café with wi-fi d. the school archives center
Answers: 1
You know the right answer?
11. given the following class import java. util. arraylist; public class rectangletester { public s...
Questions
question
Mathematics, 26.03.2020 18:43
question
Chemistry, 26.03.2020 18:43
question
Mathematics, 26.03.2020 18:43
question
Mathematics, 26.03.2020 18:43
question
Mathematics, 26.03.2020 18:43
Questions on the website: 13722361