y it and should pass 2 testcase if not then Thumbsdown.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question

Modify it and should pass 2 testcase if not then Thumbsdown. 

 

Eclass Fruits:
def
DOHO
init (self, fruitname, price, qty):
self.price = price
self.qty F qty
self.fruitname = fruitname
def computeTotal (self):
total -
self.price *
self.qty
print("Thanks for your purchase")
print("Your " + self.fruitname +" total is = "
myfruits = Fruits ("orange", 0.5, 6)
myfruits.computeTotal ()
, total)
Transcribed Image Text:Eclass Fruits: def DOHO init (self, fruitname, price, qty): self.price = price self.qty F qty self.fruitname = fruitname def computeTotal (self): total - self.price * self.qty print("Thanks for your purchase") print("Your " + self.fruitname +" total is = " myfruits = Fruits ("orange", 0.5, 6) myfruits.computeTotal () , total)
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT