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]
3 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]3 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
A wide-angle lens corrected for barrel distortion is called a(n)<br> lens.
Sonja [21]

Answer:

Rectilinear lens

Explanation:

In photography, the distortions are caused in the formation of the image due to either the position of the camera or the optical design of the lenses i.e perspective and optical distortion.

The barrel distortion is a type of optical distortion caused due to the optical design of the lens. In barrel distortion, the straight lines of the light bend as a result of which the lines appear curved inwards in images.  

The field of view of wider than the image sensor in barrel distortions which can be corrected by the use of rectilinear lens which provides straight lines without bending them. This lens stretches the image towards the edge and removes distortion.

Thus, Rectilinear lens is the correct answer.

3 0
3 years ago
If you are logged on to Windows Live Messenger, why would you be unable to engage
Mazyrski [523]

Answer:

I'm not sure i haven't had that problem

Explanation:

7 0
3 years ago
Which statement best describes when Variable Substitution (expansion) can occur?
Leona [35]

Answer: d) B & C

Explanation: Variable substitution is the method through which the command substitution is done for the other form of command and regains its value or meaning.

This value substitution is done with the help of double quotes("...") which are inverted as well when a new form of command is to be introduced and it is   known as back quotes. Other given options are incorrect because it is not determined in single quotes.Thus the correct option is option (d).

3 0
4 years ago
Read 2 more answers
Create a loop that will output all the multiples of 5 that are greater than zero and less than 60 (do not include 60). 5, 10, 15
DiKsa [7]

Answer:

Explanation:

Let's do this in python

(a) Between 5 and 60 and divisible by 5

for i in range(5, 60/5):

    print(5*i)

(b) Less than 200 and divisible and 2 and 7

for i in range(1, int(200/14) + 1):

    print(14*i)

(c)Sum of multiple of 8 that are between 100 and 500

sum_result = 0

for i in range(100, 500):

    if i % 8 == 0:

         sum_result += i

print(sum_result)

(d)sum of all odd numbers between 20 and 10

sum_odd = 0

for i in range(10, 20):

    if i % 2 == 1:

         sum_odd += i

print(sum_odd)

3 0
3 years ago
Most microsoft windows fatal errors (blue scree of death) are caused by:
MAVERICK [17]
Errors in kernel mode (CPU running in ring 0) are usually fatal. This happens mostly inside device drivers.
7 0
3 years ago
Other questions:
  • You create hidden form fields with the ____ element.
    9·1 answer
  • Sheila is using a process of saving files to her desktop and then renaming them. She is
    13·2 answers
  • A data set has 60 observations with minimum value equal to 30 and a maximum value equal to 72. The estimated class width using t
    11·1 answer
  • Animation timing is does not affect the
    10·1 answer
  • Rosa has received reports by several users that one of the Linux servers is no longer accessible. She is able to remote into the
    10·1 answer
  • Which of the data repositories serves as a pool of raw data and stores large amounts of structured, semi-structured, and unstruc
    9·1 answer
  • Which of the following screen elements is a horizontal bar that displays at the
    8·1 answer
  • Firestick optimizing system storage and applications loop
    12·1 answer
  • Hello :) new day <br> which one would u pick?<br> 1. chips 2. Gacha life 3. chocolate?<br><br> hehe
    15·2 answers
  • What type of os must be installed on your machine to allow this type of action by another person?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!