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
NO SPAMMERS, ONLY FULL ANSWER
melisa1 [442]

Answer:

true

Explanation:

4 0
2 years ago
Read 2 more answers
What is the troubleshooting process?
sattari [20]
<span>It is a logical, systematic search for the source of a problem in order to solve it, and make the product or process operational again.Troubleshooting is needed to identify the symptoms. ...Troubleshooting is the process of isolating the specific cause or causes of the symptom.</span>
6 0
2 years ago
Anyone watch anime, i love stay kids and they sang the op for Tower of God XD
TEA [102]

Answer:

I do Stray kids and Tower Of God is good combo mannnn

6 0
3 years ago
Read 2 more answers
Is microsoft word the same as microsoft office?
ycow [4]
Hey there!

Microsoft Word is considered a part of Microsoft Office. Office is a package of Microsoft applications that can be used on Windows or MacOS that includes Word, PowerPoint, Excel, Outlook, and many other programs used for either personal or commercial use. Microsoft Word is just one of those programs, so, no, they're not the same thing. 

Hope this helped you out! :-)
3 0
3 years ago
Read 2 more answers
CODING TIME
Fynjy0 [20]

Answer:

food_list = ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

one_more = ['meat']

extend_list = food_list + one_more

print(extend_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'meat']

food_list.append('milk')

print(food_list)

Output : ['rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea', 'milk']

food_list.insert(0, 'cake')

print(food_list)

Output : ['cake', 'rice', 'beans','yam', 'bread', 'pasta', 'cocoa','tea']

flowers = ['rose', 'hibiscus', 'lily']

flowers.remove('rose')

print(flowers)

Output : ['hibiscus', 'lily']

To remove rose using pop()

flowers.pop(0)

Explanation:

The + operator and append method adds elements to the end of an existing list item.

The insert method adds element at the specified index

Remove method deletes element by stating the name of the element to be deleted while pop deletes element using the index value of the element.

7 0
2 years ago
Other questions:
  • What is the purpose of a title slide on power point
    14·2 answers
  • How do you stop your questions on here from getting your questions from getting removed?
    5·2 answers
  • Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output
    7·1 answer
  • Repl.it Assignment 4.1.2 (Guess the Number)<br> Please help me<br> I will give brainliest and a like
    10·1 answer
  • You have a small network at home that is connected to the internet. On your home network, you have a server with the IP address
    11·1 answer
  • Write a function process_spec that takes a dictionary (cmap), a list (spec) and a Boolean variable (Button A) as arguments and r
    10·1 answer
  • It is a blueprint of a project​
    9·2 answers
  • What are the benefits and drawbacks of a desktop utilising virtualisation and a server?
    12·1 answer
  • Advantages of using Unicode to represent data
    8·1 answer
  • 1.Know the BMI of the user. First, the user will input the height in meters and weight in kilograms. After inputting, the inputt
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!