1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marianna [84]
2 years ago
6

The BaseballPlayer class stores the number of hits and the number of at-bats a player has. You will complete this class by writi

ng the constructor. Write a method called: public BaseballPlayer() The constructor should take three parameters to match the three instance variables in the class and then initialize the instance variables with these parameters. The parameters should be ordered so that the name of the baseball player is input first, then their hits, and at bats. In the BaseballTester class, print a call to printBattingAverage to test your constructor.
Computers and Technology
1 answer:
Rzqust [24]2 years ago
8 0

Answer:

Answered below

Explanation:

Class BaseballPlayer{

//Instance variables

string name;

int hits;

int bats;

//Constructor

BaseballPlayer (string a, int b, int c){

name = a;

hits = b;

bats = c

}

public void printBattingDetails( ){

System.out.print(name, hits, bats)

}

}

//Demo class

Class BaseballTester{

public static void main (String args []){

BaseballPlayer player = new BaseballPlayer("Joe", 8, 4)

player.printBattingDetails( )

}

}

You might be interested in
When an interviewer asks "tell me about yourself", you should tell them about your childhood past. please select the best answer
Yanka [14]

In the interview when the candidate is asked about yourself then telling about childhood past is not correct. Therefore the given statement is false.

<h3>What is an interview?</h3>

An interview is an interaction or a conversation between an employer and the interested candidate. In the conversation the interviewee is asked about their education, family background, and work experiences.

When an interviewer ask about tell me about yourself, then the interviewee should not tell about their childhood past, rather the interviewee should give few information about their family, education, and working.

Therefore, the given statement is false.

Learn more about interview, here:

brainly.com/question/13073622

#SPJ1

7 0
2 years ago
(50 points) What animes should I watch?
Eddi Din [679]

Answer:

naruto,naruto shippuden and baruto

Explanation:

3 0
3 years ago
Read 2 more answers
An algorithm to display multiplication table a number up to 12​
kkurt [141]

Explanation:

Explanation:They are

Explanation:They are 1) start the process

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 10

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for

Explanation:They are 1) start the process 2) Input N, the number for which multiplication table is to be printed 3) For T = 1 to 104) print M = N*T5) End for6) Stop the process

4 0
3 years ago
Write a program that gets five integer test scores from the user, calculates their average, and prints it on the screen. Test yo
Alex

Answer:

total = 0

for i in range(5):

   score = int(input("Enter a score: "))

   total += score

average = total / 5

print("The average is " + str(average))

Explanation:

*The code is in Python.

Initialize the total as 0

Create a for loop that iterates five times. Inside the loop, ask the user to enter a score. Add the score to the total (cumulative sum)

After the loop, calculate the average, divide the total by 5

Print the average

5 0
3 years ago
If you cause a car accident, which type of insurance will require you to pay the least out of pocket?
Luden [163]
A high deductible plan if that person blames you for it and said that it was on purpose
5 0
3 years ago
Other questions:
  • 2.Consider the following algorithm and A is a 2-D array of size ???? × ????: int any_equal(int n, int A[][]) { int i, j, k, m; f
    12·1 answer
  • In _____ conversion of the implementation phase of the systems development life cycle (SDLC), the old and new systems run simult
    9·1 answer
  • 2. What's the keyboard command that will allow you to "copy" text?
    8·2 answers
  • ​this is another name for the wireless configuration in which a central wireless device is used to serve all wireless clients.
    13·1 answer
  • What is not an operating system
    10·1 answer
  • PLEASE HELPPPPPPP
    15·1 answer
  • 3.
    5·1 answer
  • Pride Group of Companies is making tremendous profits in different categories of electronic goods. The group of managers have to
    12·1 answer
  • URGENTT 2 SIMPLE EASY QUESTIONS PLZZ HELP ION UNDERSTAND COMPUTERR ILL GIVE U BRAINLEST
    5·2 answers
  • "The Future of Money" notes that the value of cryptocurrency "changes often and depends on demand." How could reading "The Value
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!