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
Photographs that are too dark or too light can be difficult to fix with photo-editing software.
Nana76 [90]
The answer is true :)
6 0
2 years ago
Read 2 more answers
Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th
lana [24]

quetma es elpx mjeghgieo

4 0
3 years ago
The data below represents the yearly earnings (in $1000s of dollars) that high school and college (BS) graduates earn at a small
Taya2010 [7]

Answer:

library(moments)

library(readxl)

Exam1Q1 <- read_excel("Exam1Q1.xlsx")

View(Exam1Q1)

## Warning in system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE):

## running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/

## Resources/modules/R_de.so'' had status 1

plot(density(Exam1Q1$Highschool))

gostino.test(Exam1Q1$Highschool)

##  

##  D'Agostino skewness test

##  

## data:  Exam1Q1$Highschool

## skew = -0.24041, z = -0.69269, p-value = 0.4885

## alternative hypothesis: data have a skewness

agostino.test(Exam1Q1$BS)

##  

##  D'Agostino skewness test

##  

## data:  Exam1Q1$BS

## skew = 0.53467, z = 1.49330, p-value = 0.1354

## alternative hypothesis: data have a skewness

anscombe.test(Exam1Q1$Highschool)

##  

##  Anscombe-Glynn kurtosis test

##  

## data:  Exam1Q1$Highschool

## kurt = 2.56950, z = -0.29677, p-value = 0.7666

## alternative hypothesis: kurtosis is not equal to 3

anscombe.test(Exam1Q1$BS)

##  

##  Anscombe-Glynn kurtosis test

##  

## data:  Exam1Q1$BS

## kurt = 3.6449, z = 1.2599, p-value = 0.2077

## alternative hypothesis: kurtosis is not equal to 3

t.test(Exam1Q1$Highschool,Exam1Q1$BS, var.equal = T)

##  

##  Two Sample t-test

##  

## data:  Exam1Q1$Highschool and Exam1Q1$BS

## t = 0.16929, df = 76, p-value = 0.866

## alternative hypothesis: true difference in means is not equal to 0

## 95 percent confidence interval:

##  -1.131669  1.341926

## sample estimates:

## mean of x mean of y  

##  39.51282  39.40769

Explanation:

Summary:

The data set include two dependent variables which states High School annual earnings and BS annual earnings in the same small firm. Firstly, I used density plot function to view the distribution of two sets of variables. Secondly, I tested the skewness and kurtosis.Skewness of High School is -0.24041 which is left tail. Skewness of BS is 0.53476 which is right tail.Kurtosis of High School is 2.5695 which lower than 3 is platykurtic. Kurtosis of BS is 3.6449 which larger than 3 is leptokurtic. Thirdly, the sample population is 39 for each and has unknow standard deviation, so that I’m going to use t-test to perform the comparing analysis. The result shows p-value which equal to 0.866 is larger than significant value(alpha = 0.05). To the concludsion, there is no difference between yearly earnings of High School and of BS at a small firm.

3 0
3 years ago
Consider the following short paragraph:On a computer with a single core CPU, attempting to program real concurrency between two
worty [1.4K]

Answer:

Option  a)

Explanation:

PC having a CPU with single core, for the most part actualize multithreading by applying time cutting.  

Multithreading is a feature Java that permits simultaneous execution of at least two pieces of a program for greatest use of CPU. Each piece of this program is known as a thread. Along these lines, threads are light-weight forms inside a procedure.

Along these lines, fundamentally it switches between various procedures. Fundamentally it is "tricking" a bit,while CPU can do just a single thing utilizing a single center or core in turn yet pretends having more than a single core.

6 0
3 years ago
Which of the following is another word for paradigm?
EleoNora [17]
The best answer choice is model, it is a synonym for the word paradigm

3 0
3 years ago
Other questions:
  • There is no need to schedule video calls ahead of time; they can be used the same way as
    6·1 answer
  • A(n ____ with a drop down menu provides consistency in function and appearance making it easy for users to learn and work with t
    7·1 answer
  • Explain the role of the domain name system
    15·1 answer
  • Semiconductor memory is used mainly for primary storage even with its high cost. In another hand, the magnetic tape is the cheap
    9·2 answers
  • Which facet of the 4e framework is best addressed by thought-sharing sites?
    14·1 answer
  • Assume we perform a known-plaintext attack against DES with one pair of plaintext and ciphertext. How many keys do we have to te
    14·1 answer
  • The customer's endpoint device on the wan is called the __________________.​
    11·1 answer
  • A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
    10·1 answer
  • Briefly describe the software quality dilemma in your own words
    13·1 answer
  • What is the importance of using Onedrive in Windows 10 and how knowledge of it will have an impact in today's workplace?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!