answer.
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
Irina-Kira [14]
2 years ago
6

Write the addReview method, which adds a single product review, represented by a ProductReview object, to the ReviewCollector ob

ject. The addReview method does the following when it adds a product review. The ProductReview object is added to the reviewList instance variable. The product name from the ProductReview object is added to the productList instance variable if the product name is not already found in productList. Elements may be added to reviewList and productList in any order. Complete method addReview. /** Adds a new review to the collection of reviews, as described in part (a) */ public void addReview( ProductReview prodReview )
Computers and Technology
1 answer:
Allisa [31]2 years ago
6 0

Answer:

{

private String name;

private String review;

/** Constructs a ProductReview object and initializes the instance variables. */

public ProductReview(String pName, String pReview)

{

name = pName;

review = pReview;

}

/** Returns the name of the product. */

public String getName()

{ return name; }

/** Returns the review of the product. */

public String getReview()

{ return review; }

}

The ReviewCollector class, shown below, is used to represent a collection of reviews to be analyzed.

public class ReviewCollector

{

private ArrayList<ProductReview> reviewList;

private ArrayList<String> productList;

/** Constructs a ReviewCollector object and initializes the instance variables. */

public ReviewCollector()

{

reviewList = new ArrayList<ProductReview>();

productList = new ArrayList<String>();

}

/** Adds a new review to the collection of reviews, as described in part (a). */

public void addReview(ProductReview prodReview)

{ /* to be implemented in part (a) */ }

/** Returns the number of good reviews for a given product name, as described in part (b). */

public int getNumGoodReviews(String prodName)

{ /* to be implemented in part (b) */ }

// There may be instance variables, constructors, and methods not shown.

}

You might be interested in
Select the correct answer. Richard owns a chain of hardware stores. He wants to update the store website and write a numbered li
olga_2 [115]
What’s the answer choices ?
3 0
2 years ago
Find a 95% confidence interval for the mean failure pressure for this type of roof panel.The article "Wind-Uplift Capacity of Re
aliya0001 [1]

Answer:

The 95% confidence interval would be given by (2.351;3.525)    

Explanation:

1) Previous concepts

A confidence interval is "a range of values that’s likely to include a population value with a certain degree of confidence. It is often expressed a % whereby a population means lies between an upper and lower interval".

The margin of error is the range of values below and above the sample statistic in a confidence interval.

Normal distribution, is a "probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean".

\bar X represent the sample mean  

\mu population mean (variable of interest)

s represent the sample standard deviation

n represent the sample size  

2) Confidence interval

The confidence interval for the mean is given by the following formula:

\bar X \pm t_{\alpha/2}\frac{s}{\sqrt{n}}   (1)

In order to calculate the mean and the sample deviation we can use the following formulas:  

\bar X= \sum_{i=1}^n \frac{x_i}{n} (2)  

s=\sqrt{\frac{\sum_{i=1}^n (x_i-\bar X)}{n-1}} (3)  

The mean calculated for this case is \bar X=2.938

The sample deviation calculated s=0.472

In order to calculate the critical value t_{\alpha/2} we need to find first the degrees of freedom, given by:

df=n-1=5-1=4

Since the Confidence is 0.95 or 95%, the value of \alpha=0.05 and \alpha/2 =0.025, and we can use excel, a calculator or a table to find the critical value. The excel command would be: "=-T.INV(0.025,4)".And we see that t_{\alpha/2}=2.78

Now we have everything in order to replace into formula (1):

2.938-2.78\frac{0.472}{\sqrt{5}}=2.351    

2.938+2.78\frac{0.472}{\sqrt{5}}=3.525    

So on this case the 95% confidence interval would be given by (2.351;3.525)    

5 0
1 year ago
Which of the following would not be considered metadata for a spreadsheet file?
Genrish500 [490]

Answer:

B.

Explanation:

Metadata is a type of data that dispense details of other data. In simple terms, metadata can be defined as information of a file such as file name, attributes, etc.

<u>In excel sheet, metadata works the same and helps to provide information about </u><u>file name, author name, file size, attributes such as read-only, archieve, hidden, system, location of the file, date and time of creation, modification, or accessed, type of file, etc</u><u>.</u>

From the given options, the information that is not considered or included in metadata is calculation inside the file. Metadata in excel sheet does not include calculations inside the file. Thus option B is the correct answer

7 0
1 year ago
Which of the following is a benefit, as well as a risk, associated with client/server networks?
KATRIN_1 [288]
C would be the correct answer to this question
6 0
2 years ago
Write a statement that assigns treeHeight with the height of a tree given the distance from the tree (in feet) and angle of elev
Nina [5.8K]

Answer:

treeHeight = tangent of angleElevation * treeDistance

In java, we could write it as:

double treeHeight = (Math.tan(angleElevation) * treeDistance);

Math.tan(angleElevation) is an inbuilt java mathematical function used to calculate the tangent of a value and the return value is always double.

Explanation:

formula:

tangent of angleElevation = treeHeight/treeDistance

We want to assign treeHeight, so we cross-multiply and we get:

treeHeight = tangent of angleElevation * treeDistance

Off course, the treeHeight will be in feet also.

6 0
1 year ago
Other questions:
  • Rebooting a system in an attempt to fix a problem is an example of the ____ problem-solving strategy.
    11·1 answer
  • What best describes the purpose of the Recycle Bin (Microsoft Windows) and Trash (Apple Mac) features
    13·2 answers
  • In response to a recent outbreak of computer viruses, Babbage Industries, a large technology company, installs computer virus pr
    7·2 answers
  • A slide in Blake's presentation contained the following information:
    11·1 answer
  • A competitive analysis of Google and Microsoft would look at their ________ . Both pay high salaries and offer great benefits. B
    7·1 answer
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • Leah wants to create a PowerPoint presentation for a history report about the progressive era in the 1900s. To
    6·2 answers
  • Return 1 if ptr points to an element within the specified intArray, 0 otherwise.
    7·1 answer
  • A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi
    15·1 answer
  • A small e-commerce company uses a series of Robotic Process Automation solutions to manage the backup of data from individual wo
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!