{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cellphone - Celllist = for aline in Cellfile cell =...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
class Cellphone: def __init__(self,manu,model,price): self.manu = manu self.model = model self.price = price def setManu(self, newManu): self.manu = newManu def getManu(self): return self.manu def setModel(self, newModel): self.model = newModel def getModel(self): return self.model def setPrice(self, newPrice): self.price = newPrice def getPrice(self): return self.price Cellfile = open("phone.txt",'r')
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Celllist = for aline in Cellfile: cell = aline.split() myCell = Cellphone(cell[0],cell[1],cell[2]) Celllist.append(myCell) for aline in Celllist: print(aline.getManu(),aline.getModel(),aline.getPrice()) aline.setManu("hello") aline.setModel("130000sx") aline.setPrice(100000000) for aline in Celllist: print(aline.getManu(),aline.getModel(),aline.getPrice())...
View Full Document

  • Fall '09
  • Cellular network, return self.manu def, return self.model def, price def setManu, newModel def getModel, newPrice def getPrice

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern