Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DSC 4 3 0 : Python Programming Assignment 0 5 0 1 : Dice and Cups Write a class SixSidedDie. The class should include the

DSC 430: Python Programming Assignment 0501: Dice and Cups
Write a class SixSidedDie. The class should include the following methods: roll(), getFaceValue(), and (). For example:Create a TenSidedDie and a TwentySidedDie class. These two classes must extend SixSidedDie. They must provide the same functionality. They must not re-implement any code that is not necessary.Create a Cup class. A cup will hold several dice that may be rolled at once. The cup may hold any number of six-, ten-, or twenty-sided dice. For example, we could create a cup with one of each type of die as follows:>>> cup = Cup(1,2,1)>>> cup.roll()28>>> cup.getSum()28>>> cupCup(SixSidedDie(3),TenSidedDie(5),TenSidedDie(3),TwentySidedDie(17))
Record a three minute video in which you run the code. Then, present your code. Specifically, answer the following questions:
Show how you extend sixSidedDie when writing TenSidedDie and TwentySidedDie.
Show how you compose the cups class with the die classes.
Submission: Submit a single .py file containing all the code to the D2L. Do not zip or archive the file. Your code must include comments at the top including your name, date, video link, and the honor statement, "I have not given or received any unauthorized assistance on this assignment." Each function must include a docstring and be commented appropriately.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

A Complete Guide To Data Science Essentials

Authors: Miguel

1st Edition

9358684992, 978-9358684995

More Books

Students also viewed these Databases questions

Question

why we face Listening Challenges?

Answered: 1 week ago

Question

what is Listening in Context?

Answered: 1 week ago