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
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workst
Aleksandr-060686 [28]

Answer:

PING

Explanation:

To check if there's still connectivity between the computer and server, I would use the ping command.

The ping command is primarily a TCP/IP command. What this command does is to troubleshoot shoot. It troubleshoots connection and reachability. This command also does the work of testing the name of the computer and also its IP address.

4 0
2 years ago
To break a text string into several lines, which means that the text string continues on the next line, the _____ character shou
Montano1993 [528]

Answer:

To break a text string into several lines, which means that the text string continues on the next line, the backslash character should be used.

4 0
2 years ago
Which page feature is used in long documents to assist readers in quickly finding information in the document without having to
irakobra [83]

Maybe it is Ctrl-F... is this what you're thinking of?

3 0
3 years ago
Read 2 more answers
Ranges of IP address that anyone can use for their internal networks are known as ______.
Rama09 [41]
Since no answer choices, have to deduce it is Private Networks
8 0
3 years ago
Read 2 more answers
QUESTION 11
tino4ka555 [31]

Answer:

x == 32

Explanation:

CODE in Java:

       int x = 32;

       if(x == 32){

           System.out.println("Pass");

       }

       else{

           System.out.println("Fail");

       }

OUTPUT:

Pass

8 0
2 years ago
Other questions:
  • Have you ever used a device that relies solely on the cloud?
    10·1 answer
  • Which of the below statements describes the nature of HTML elements - check as many as apply
    6·1 answer
  • You can clear a log file simply by redirecting nothing into it. true or false?
    13·1 answer
  • Why is it a good idea to leave an interview being courteous and polite?
    10·1 answer
  • Harmful programs used to disrupt computer operation, gather sensitive information, or gain unauthorized access to computer syste
    10·1 answer
  • CPU BENCHMARKS are measurements used to compare performance between processors
    9·1 answer
  • Which of the following is the process of writing the step-by-step instructions that can be understood by a computer?
    5·1 answer
  • A(n) _______ gate provides an output of 1 if either or both inputs are 1.
    14·2 answers
  • What is an outcome in a game? Don't search google just give me an answer
    9·1 answer
  • What is the purpose of a project overview?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!