TPT
Total:
$0.00
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java
Share

Description

A common array programming exercise for students reviewing arrays in Java - or practicing for the AP Computer Science exam! Includes fully coded and tested solution!

Write a method that takes in an array of integers and returns true if each element in the array is greater than the last, and false otherwise. Return false if the array has zero elements.

int[] arrInc = {1, 2, 3, 4, 5, 6, 7};

int[] arrNotInc = {2, 4, 1, 9, 3, 5};

System.out.println(arrayIncreasing(arrInc));

>> true

System.out.println(arrayIncreasing(arrNotInc));

>> false

Report this resource to TPT
Reported resources will be reviewed by our team. Report this resource to let us know if this resource violates TPT's content guidelines.

AP Computer Science A - Problem 3: Array Practice! Increasing numbers in Java

ScienceSimulations
23 Followers
$1.00

Highlights

Digital downloads
Grades icon
Grades
9th - 12th
Pages
2
Answer Key
Included
Teaching Duration
30 minutes

Description

A common array programming exercise for students reviewing arrays in Java - or practicing for the AP Computer Science exam! Includes fully coded and tested solution!

Write a method that takes in an array of integers and returns true if each element in the array is greater than the last, and false otherwise. Return false if the array has zero elements.

int[] arrInc = {1, 2, 3, 4, 5, 6, 7};

int[] arrNotInc = {2, 4, 1, 9, 3, 5};

System.out.println(arrayIncreasing(arrInc));

>> true

System.out.println(arrayIncreasing(arrNotInc));

>> false

Report this resource to TPT
Reported resources will be reviewed by our team. Report this resource to let us know if this resource violates TPT's content guidelines.

Reviews

This product has not yet been rated.
Rated 0 out of 5

Questions & Answers

Loading
Loading