Course Home | Class Schedule | Assignments | Git Submission | Perusall | Python | Tutoring

Saint Louis University

Computer Science 1300/5001
Introduction to Object-Oriented Programming

Michael Goldwasser

Fall 2018

Computer Science Department

Homework Assignment 15

Deeper Understanding of the Management of Objects


Overview

Topic: Deeeper Understanding of the Management of Objects
Related Reading: Chapter 21
Due: 10:00am, Wednesday 14 November 2018

Ensure that you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (10 points)

    Using the diagram style of Chapter 21.1, draw the final configuration that results after executing the following program.

    v = Account()
    w = Account()
    x = v
    v.deposit(100)
    w.deposit(200)
    x.deposit(400)
    v.withdraw(25)
    w.withdraw(25)
    x.withdraw(25)

  2. (10 points)

    Using a diagram style for lists as in Figure 21.7, draw the final configuration that results after executing the following program.

    c = list(range(3))
    d = c
    c.append(7)
    e = list(d)
    e.append(8)


Michael Goldwasser
CSCI 1300/5001, Fall 2018
Last modified: Saturday, 10 November 2018
Course Home | Class Schedule | Assignments | Git Submission | Perusall | Python | Tutoring