Assignment 00 – Expressions, Variables, Operators and Control Flow

$30.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

Task 1
Create a new project in NetBeans with a class called A00.java. A template is provided on Canvas to help you.
Task 2
Create 5 primitive variables to hold the goals against average (GAA) for the following 5 goaltenders:
1. Sergei Bobrovsky – CBJ
2. Carey Price – MTL
3. Antti Niemi – SJS
4. Jaroslav Halak – STL
5. JoshHarding – MIN

The GAA for goaltenders can be found here: http://www.nhl.com/ice/playerstats.htm?fetchKey=20142ALLGAGAll&sort=goalsAgainstAverage&viewName=goalsAgainstAverage

Once the variables have been assigned, put each into one array.
Task 3
Write a “for” loop to iterate through the array of GAAs and print out goal quality categories as follows (if/else statement).
Print string “Excellent Goaltending” if GAA < 2 Print string “StrongGoaltending” if GAA >= 2 but < 2.5 Print string “Fair Goaltending” if GAA >= 2.5 but < 3 Print string “Poor Goaltending” if GAA >= 3
Task 4
Convert the following word problem to java code and find the answer.
In the “2012-13 Regular Season”, there were several goaltenders that played in the NHL. If 1/10 of them were “Excellent”, 1/2 are “Strong” and 1/5 are “Fair”, and the remaining 10 are “Poor”, what is the number of “Fair” goaltenders?
Task 5
The salary cap for the NHL for the 2013-14 season is $64.3M. Assuming an average player salary of $2.4M, how many players can a given NHL team have under contract (ignoring bonuses and long term injury reserve credits)? You can read more about NHL salary caps here: http://www.capgeek.com/
Using the while loop, adding one player at a time, code this logic in Java and print out the how many players an NHL team can have under contract.
Deliverables
Please zip your entire project folder containing the src sub-folder and the nbproject subfolder (the others are not necessary). Name the zip file A00_firstlastname.zip and submit to Canvas.