Design Discussion Lab
Due Friday at the beginning of class
Objectives
- To analyze software design decisions
Motivation: Throughout this class, we'll talk a lot about design decisions. You and/or your professors have been making design decisions for awhile.
Design Discussion
Let's consider some design decisions from the provided code. For each of the following questions, first confirm my first intro/set up statement. Then, in a document, answer the questions:
turnis an instance variable of theGameclass. Is it better design forturnto be a local, instance, or class variable? Justify your answer.user_inputis a local variable in thegetInputmethod of theConnectFourclass. Is it better design foruser_inputto be a local, instance, or class variable? Justify your answer.RANKSis a class variable of theCardclass. Is it better design forRANKSto be a local, instance, or class variable? Justify your answer.tokensis an instance variable of theConnectFourclass. Is it better design fortokensto be a local, instance, or class variable? Justify your answer.Playeris a class inwar.py. Is it better design for thePlayerclass to be defined inwar.pyor ingame.py? Justify your answer.War'sstepmethod takes as a parameterdummyInput. What purpose does it serve?
Synthesis: What questions should you ask to determine if a variable should be a local, instance, or class variable? Put in your document.
Submitting your assignment
Show Professor Sprenkle your assignment before beginning of class on Friday.
Grading (10 pts)
You will be graded on making a good-faith effort in answering the design questions.