Question: 1 . Create a class card. The class should derive from object and take a file path as a parameter. The class will have three

1. Create a class card. The class should derive from object and take a file path as a parameter. The class will have three properties (or attributes)
a. The file name
b. The suit of card
c. The card value (keep in mind if the card is an ace then it can be worth 1 or 11. We will NOT determine this dynamically, so you can set the value to either as your preference
d. The class must implement the add operator.
e. Take whatever steps necessary to insure the class does not crash at all during creation cardl - Card('bearts-7.git')
7
P) cardl, value
7
) cazdl, sult
'heazks'
card1, theFIIe
'hear5s-7. git'
card2= Card("hearsa-8.g4t')
8
card2. value
8
card2. auit
'heartg'
card2. therile
'hearts-8.gif'
both - card1+card2
both
15
>
 1. Create a class card. The class should derive from object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!