COMPSCI 1MD3 Lecture Notes - Lecture 8: Usability, User Friendly

42 views7 pages

Document Summary

Re-cap from last class: creating a container class (e. x. Deck): object of that class is a collection of other objects, very common, a container class is like a list, container of something is useful and common, initialize to start with the contents of the container, e. x. Deck is an object of 52 other objects. Need to refer to the number and suit-create independent lists. Create an empty list for initialization of the deck. Append to the list with a for loop. Classes and data structures: 2 data members, e. x. the card object has the data number and data suit (2 variables and 3 methods, 1. Data 2. methods: introduce data members with the self. variable method, one copy of each data member for each object. Making classes more user-friendly: trying to use the created objects to use pre-defined functions, and simply to print properly, e. x. Normally: a =

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions