Lab 7: Object Oriented Programming

Logistics

  • Due: Wednesday, June 10th no later than 5pm.
  • Submission instructions: upload solution, entitled FirstName-LastNameLab7.py to the BrightSpace Lab 7 Dropbox.
  • Deadline reminder: once this deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned.

Learning outcomes

Gain experience with object oriented programming.

Assignment

  • A smart phone has the ability to save contact information. In this assignment, you will simulate the contact list for a very simple smart phone.
  • Download lab7.py, rename it according to the instructions above, and make sure you understand it.
  • Take the program above and modify it by adding the missing Contact class such that when the program is run, it produces this output.
  • Hint: one way to get the correct spacing in your print_entry method is to use the rjust method on strings. Read the documentation here.

Grading - 10 points

2 points - The constructor of the Contact class is correct.

2 points - The reader methods of the Contact class are correct.

2 points - The writer methods of the Contact class are correct.

2 points - The print_entry method of the Contact class is correct.

2 points - Your program’s output matches the output format of the transcript above (1 point for each type of difference up to 2 points).

Grading turnaround

All labs graded with scores recorded in BrightSpace no later than office hours the following class day.