changed how price was calulated

master
Caroline Hirwing 2 years ago
parent f02df599f0
commit b68fe96d68
  1. 2
      ovning1/CompactDisc.java
  2. 2
      ovning1/LongPlay.java

@ -9,7 +9,7 @@ public class CompactDisc extends Recording {
public double getPrice()
{
if (condition >= 1 && condition <= 10) {
price = (condition / 10.0) * price;
price = price - ((10 - condition) * 10);
}
if (condition == 0) {

@ -11,7 +11,7 @@ public class LongPlay extends Recording {
public double getPrice()
{
if (condition >= 1 && condition <= 10) {
price = (condition / 10.0) * price;
price = price - ((10 - condition) * 10);
}
if (condition == 0) {

Loading…
Cancel
Save