Search Header Logo
Elevens Lab Activity 7 4c question and 4d questions

Elevens Lab Activity 7 4c question and 4d questions

Assessment

Presentation

Mathematics

12th Grade

Hard

Created by

Lioubov Rogalskaia

Used 1+ times

FREE Resource

7 Slides • 0 Questions

1

​Friday Jan 14,2022 Objectives

Elevens Lab Activity 7 4c and 4d questions

Array and ArrayList review discussion questions

Implementation of cardIndexes method (4c)

Implementation of printCards method (4d)

​ * Methods are places into ElevensBoard Class

Testing both methods in main class​

Estimated time - 2 lessons ​

By Lioubov Rogalskaia

2

Elevens Lab Activity 7 Question 4c and tester class grading rubric

Code for tester class(main method)

  • Cards objects are created properly ( 6 cards) and added to the array of cards on a board - 5 points 

  • Cards objects are created properly and added to the array of cards on the board, but array is not working properly -3 points 

  • Cards objects  are created , but not added to the array of cards - 1 point 

  • Cards are not created and array does not exists - 0 points

  • Method cardIndexes is tested and works as defined - 5 points 

  • Method printCards is tested and works as defined - 5 points 

Code for printCards method: 

  •  Method is  created and  works as defined in the comment section  and prints all of the elements of cards that are indexed by cIndexes -  5 points

  • Method is partially created, but does not print all the elements of cards that are indexed by cIndexes - 3 points  

  • Some parts of the method are  created but does not work as defined in the comment section and does not print all elements of the cards that are indexed by cIndexes - 1point

  • Method is not created  - 0 points  

Max points : 20 

3

   * Gets the indexes of the actual (non-null) cards on the board.

  

   * returns a List that contains the locations (indexes) of the non-null entries on the board.

  

It is important to understand how the cardIndexes method (Question 4c) works

media

​array

​ArrayList

4

Implement the body of cardIndexes method

Qestion 4c​

public List<Integer> cardIndexes() {

   

   

  }

Suppose that cards contains the elements shown in the previous slide.​

We will test this class later in the main class

The repl for the group work is provided on Google Classroom ​

5

Implement printCards method

Question 4d

Complete the following printCards method to print all of the elements of cards that are

indexed by cIndexes.

public void printCards( ElevensBoard board) {

List<Integer> cIndexes = board.cardIndexes();

/* Your code goes here. */

6

Implementing tester class

Create a tester class for both methods

Use the rubric provided (slide 2) for guidance

Good Luck!

7

media

​No Homework for the weekend

​Friday Jan 14,2022 Objectives

Elevens Lab Activity 7 4c and 4d questions

Array and ArrayList review discussion questions

Implementation of cardIndexes method (4c)

Implementation of printCards method (4d)

​ * Methods are places into ElevensBoard Class

Testing both methods in main class​

Estimated time - 2 lessons ​

By Lioubov Rogalskaia

Show answer

Auto Play

Slide 1 / 7

SLIDE