MCPcopy Create free account
hub / github.com/geekcomputers/Python / LaundryService

Class LaundryService

Laundary System/code.py:4–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3
4class LaundryService:
5 def __init__(
6 self,
7 Name_of_customer,
8 Contact_of_customer,
9 Email,
10 Type_of_cloth,
11 Branded,
12 Season,
13 id,
14 ):
15 self.Name_of_customer = Name_of_customer
16 self.Contact_of_customer = Contact_of_customer
17 self.Email = Email
18 self.Type_of_cloth = Type_of_cloth
19 self.Branded = Branded
20 self.Season = Season
21 self.id = id
22
23 def customerDetails(self):
24 print("The Specific Details of customer:")
25 print("customer ID: ", self.id)
26 print("customer name:", self.Name_of_customer)
27 print("customer contact no. :", self.Contact_of_customer)
28 print("customer email:", self.Email)
29 print("type of cloth", self.Type_of_cloth)
30 if self.Branded == 1:
31 a = True
32 else:
33 a = False
34 print("Branded", a)
35
36 def calculateCharge(self):
37 a = 0
38 if self.Type_of_cloth == "Cotton":
39 a = 50.0
40 elif self.Type_of_cloth == "Silk":
41 a = 30.0
42 elif self.Type_of_cloth == "Woolen":
43 a = 90.0
44 elif self.Type_of_cloth == "Polyester":
45 a = 20.0
46 if self.Branded == 1:
47 a = 1.5 * (a)
48 else:
49 pass
50 if self.Season == "Winter":
51 a = 0.5 * a
52 else:
53 a = 2 * a
54 print(a)
55 return a
56
57 def finalDetails(self):
58 self.customerDetails()
59 print("Final charge:", end="")
60 if self.calculateCharge() > 200:
61 print("to be return in 4 days")

Callers 1

code.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected