Special Note:
This repo is to be used as practice getting use to a GitHub workflow. To begin working on this repo and trying to find your comfort in a GitHub workflow you should fork
the repository.
This is found in the top right of the screen
Selecting this button will give you options asking where you would like to fork the repo. You can select from your account or any organization you have permission in. This is different than how a classroom assignment gets distributed. Make sure to keep that in mind when going through this initial process.
This assignment outlined below is an example of what is given to students (it is not a perfect 1:1 to what students are given).
Backstory of assignment here for lore purposes.
This quest has us working with methods and arrays. We have a goal to determine various pieces of information about three int
filled arrays.
Description on how to make a project board, template to select.
Description of what is expected in a design plan
Simple reminder to clone this repo into IntelliJ
here.
Description of how to branch from the master
in IntelliJ
. Expectation is students have more than one branch when working on projects. They merge branches into master at the end when submitting only the master branch is graded.
Note For this practice I would suggest the following branching as it allows for decent practice. A dev
branch off of the master. Then each method gets its own branch off of the dev
. As these methods are completed they should be merged to the dev
for testing. If the methods test well then merge into the master
. You could add a testing
branch between the method branches and the dev
depends on how much practice you want to give. While there are some "standards" to branching each company will have different requirements and ways to do it so practicing and find a flow that works best for you and your students is suggested.
There are several various pieces of information we can pull from an array of numbers. Doing these methods help us with method writing, array traversal, variable scope, and method calling.
-
Sum the elements
sumElems
-
Average the elements
avgElems
-
Count occurrences
countOccurs
- count the number of occurrences in the array of a passed value
- the array should be the first param
-
Determine presence or absence of a value
appearsIn
- use the
countOccurs
to help - result should be
true
orfalse
- the array should be the first param
- use the
-
Determine first location
firstAppear
- find the first index of a passed value
- the array should be the first param
- return -1 if not found
-
Find the minimum number
minValue
-
Find the maximum number
maxValue
-
Find the range
rangeValue
- use
minValue
andmaxValue
to help
- use
- Call all the methods on each array in the main
- Display the various results to the user in a friendly format
Bonus Find the standard deviation of an array of the following: 600, 470, 170, 430, 300, 280, 389
- Calculated standard deviation rounded to the nearest whole number
- Only outside method you are allowed to call is
Math.sqrt()
- no other outside Java methods or methods a "friend" has helped you with
Formula for standard deviation for our purposes is the square root of the variance
. The variance is defined as the average of the squared differences from the mean
.
Reminder to push code from IntelliJ
back to GitHub. Another reminder to merge back into master before making the final push.
Points | Requirement |
---|---|
2 | ZZZ |
2 | YYY |
2 | Bonus correct |