Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in Java Exercise: - Create a class called BasketballTeam. - Create three private data fields. Teams name winning points losing points - Write a constructor

in Java

Exercise:

- Create a class called BasketballTeam.

- Create three private data fields.

Teams name

winning points

losing points

- Write a constructor with three parameters and sets the class properties to those values.

- Write another constructor that takes only the teams name, and set the winning points and losing points to 0. This constructor should call the first constructor.

- Create methods that return the Teams name, winning points, and losing points.

- Create a method to increase winning points by 1 and another method to increase losing points by one.

- Create a method named Record that returns Good Record when a team has more winning points than losing points.

- Write a test class called BasketballTeamScore.

Create a BasketballTeam named "AAU" with 6 wins and 8 losses.

Call the method that returns Good Record and print out the Score.

Now make four calls to the method that increases the winning points by 1, and one call to the method that increases the losing points by 1.

Call the Good Record method again and print out the Score.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions