Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with finding out why the Junit test is coming back as a fail for the second method on Producttest package Jundt _ testing

Please help with finding out why the Junit test is coming back as a fail for the second method on Producttest
package Jundt_testing_Jtorres126;
publis class p.oques {
ciass fiejids
Whe will do data hiding, 50 all will start with private keywords
private string prodName 3
private double prodprices
private int prodQtys
public Product(String prodName, double prodPrice)t?? constructor this.prodiName o prodNames
3 this prodprice o prodprices
public Product(){//no aces constructor
}
public static void main(String[] args) f
Product pI a new Product())
pl.setprodPrice (-20)3
}
System.out.printin(p1. Betprodprice())3
public String getProdName(){
}
return prodinames
public void setProdName(String prodName){
}
this prodilame e prodvames
public double getprodPrice() f
}
return prodprices
public void setprodPrice(double prodprice) f
iff(prodprice s e){
thisoprodprice =0.258
else ?
thisoprodintice a prodpntices
}3
public int geterrodogy(Q)?
3
return prodedys
public void setifrodquy (int prodoty) is
this aprodety = prodetys
3
pubitic string tosturing(){
7
return this . Eetprodveme ()4", "this getProdPrice(
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions