Question: [40 points) 5) This is a programming question. Submit your java source code on el eaming under Test1. You must use class name, variable names,
[40 points) 5) This is a programming question. Submit your java source code on el eaming under Test1. You must use class name, variable names, and function names exactlhy as specified below. Create a Java class called "NBA Team". The class has two member variables: The first variable is called teamName, and will store the team's name The second variable is called teamRank- and will store a number that represents the team's rank. There are 30 teams in the NBA, so the value of this teamRank variable is a whole number between 1-and 30. The best team in the league will have a teamRank = 1, and the worst team will have teamRank-30. - Add a default constructor to the NBATeam. - Add a constructor that sets all the member variables - Add a function, called 'showRank' that return void, and implements the following logic: This function print one of three possible messages based on the value of the teamRank and according to the following rules: If the teamRank is 1,2,3,4, or 5, then the function displays "Title contender" - If the teamRank is more than 5, but less than 8, the function displays "A good team" - Otherwise, the function display the value of t he teamRank variable. - Compile your code and make sure there are no errors. Submission Instructions: Once the program compiles successfully, rename the file from NBATeam.java NBATeam.txt and upload under the Test 1 submission link on eLearning. Note: Programs uploaded after 09:25 AM will incur a late penalty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
