Skip to content

CS441 - Big Data Concepts

2 Topics 10 Posts
  • 0 Votes
    2 Posts
    610 Views
    zaasmiZ
    Pease star idea solution
  • CS441 Assignment 2 Solution and Discussion

    Solved cs441 assignment 2 solution discussion fall 2019
    2
    0 Votes
    2 Posts
    820 Views
    zareenZ
    Solution: class Product: Name = "NULL" Brand= "NULL" Price= 0 Quantity= 0 def __init__(self, na, br, pr, qty): print print "--------------------------------" print "Pametarized Constructor called:" print "--------------------------------" self.Name = na self.Brand = br self.Price = pr self.Quantity=qty def setName(self, n): self.Name = n def setBrand(self, b): self.Brand=b def setPrice(self, p): self.Price=p def setQuantity(self, q): self.Quantity=q def getName(self): return self.Name def getBrand(self): return self.Brand def getPrice(self): return self.Price def getQuantity(self): return self.Quantity P1= Product("Computer","DELL",48000,5) print print "Object values initialized through Constructor:" print print "Name: " , P1.getName() print "Brand: ", P1.getBrand() print "Price: ", P1.getPrice() print "Quantity: ", P1.getQuantity() P1.setName("Cloths") P1.setBrand("Bonanza") P1.setPrice(4500) P1.setQuantity(10) print print "-------------------------------------------------" print print "Object values assigend thorugh setter functions:" print print "Name: " , P1.getName() print "Brand: ", P1.getBrand() print "Price: ", P1.getPrice() print "Quantity: ", P1.getQuantity()
How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
File Sharing

2

Online

3.0k

Users

2.8k

Topics

8.2k

Posts
| |