Please enable JavaScript to use CodeHS

AP Computer Science A (Nitro)

Description

In this lesson, students will learn about and use ArrayLists. ArrayLists are similar to arrays, except that they are a mutable list of object references. ArrayLists provide a convenient way to create adjustable arrays. This lesson corresponds with AP Computer Science A topic 7.1.

Objective

Students will be able to:

  • Represent collections of related object reference data using ArrayList objects
Description

In this lesson, students will learn and use methods that allow the state of ArrayLists to be altered. These methods are as follows:

  • boolean add(E obj)
  • void add(int index, E obj)
  • E get(int index)
  • int size()
  • E set(int index, E obj)
  • E remove(int index)

This lesson corresponds with AP Computer Science A topic 7.2.

Objective

Students will be able to:

  • Use methods associated with ArrayLists
Description

In this lesson, students will learn how to traverse ArrayLists. For ArrayLists, instead of using .length and brackets ([]) to access the elements in a list, size() and get() will be used. This lesson corresponds with AP Computer Science A topic 7.3.

Objective

Students will be able to:

  • Traverse ArraysLists using a for or while loop
  • Access elements in an ArrayList using iteration statements
  • Remove elements in an ArrayList
Description

In this lesson, students will develop algorithms using ArrayLists. They will examine standard algorithms for removing and inserting elements while traversing an ArrayList. This lesson corresponds with AP Computer Science A topic 7.4.

Objective

Students will be able to:

  • Identify standard ArrayLists algorithms such as inserting and deleting elements
  • Modify standard ArrayLists algorithms
  • Develop an ArrayLists algorithm
Description

In this lesson, students will explore and analyze a linear search. Linear Search is an algorithm that searches data sets in a sequential order, checking each value from the 0th index to the end of the data set to see what index a specific element can be located at. This lesson corresponds with AP Computer Science A topic 7.5.

Objective

Students will be able to:

  • Apply linear search algorithms to search for specific information in array or ArrayList objects
Description

In this lesson, students will students will explore and analyze Selection Sort and Insertion Sort. Selection Sort swaps the minimum value left in an array with the current array index. Insertion Sort shifts the already sorted section of an array to place the current array value in the correct index. This lesson corresponds with AP Computer Science A topic 7.6.

Objective

Students will be able to:

  • Apply selection sort and insertion sort algorithms to sort the elements of array or ArrayList objects
  • Compute statement execution counts and informal run-time comparison of sorting algorithms

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU Con-2 Programmers incorporate iteration and selection into code as a way of providing instructions for the computer to process each of the many possible input values. (LO’s 2.J, 2.K, 2.L, 2.M)

  • EU Var-2 To manage large amounts of data or complex relationships in data, programmers write code that groups the data together into a single data structure without creating individual variables for each value. (LO’s 2.D, 2.E)

Description

In this lesson, students will discuss the ethical issues around how and why data is collected. They will look at the risks to personal privacy when working on computer systems and the internet and discuss how computer programs can have beneficial and/or harmful impacts on personal security. Lastly, the importance that programmers have in terms of safeguarding personal privacy will be considered and emphasized. This lesson corresponds with AP Computer Science A topic 7.7.

Objective

Students will be able to:

  • Explain the risks to privacy from collecting and storing personal data on computer systems
  • Explain the role that programmers have considering safeguarding personal privacy
  • Explain the beneficial and harmful impacts that computer use and the creation of programs have on personal security