Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON PLEASE, Again I need this answer in python. Again Please right this in python, thank you. This lab is due one weeks from

IN PYTHON PLEASE, Again I need this answer in python.image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedAgain Please right this in python, thank you.

This lab is due one weeks from start of your lab. Required Files - driver.py - Contain a main function - execulive.py - Contain an Executive class - Handle file liO and user interaction - Creates a list of board games by extracting the information from file - boardgarne.py - Contain a BoardGame class Overview rating, the public's rating, and other useful iniormation. Your job is to pull all the information cut the file and let the user query the data in various ways. This lab will only depend an your 168 knowledge: - Class defining and object creation - Initializing an object member varlables, and member methocks - List of cojects - File liO - Basic terrmirial IO Please use the C++10 Python document \& to either as a primer or a refresher. Sourcain Daw is not attiletac with KU, Dr. Ghaens, or the State of Kaneas. It's atso kha ot qrogs. File format The file contains several rows, each row contains the information for a single game. All data here has been provided by Boerd Game Geek NOTES: - I modified the names to help you read them in easier (spaces replaced with underscores and all names are lowercase) - All ratings are between 0 and 10 - Some aren't standalone games, but are expansions, you don't have to worry about distinguishing them Sample layout from the file Reading the tile should a fairly easy lask for you. Recall using atring methods like split. Please note, when we test your program we will use different input files, but the format will be the same as the one provided. I encourage you to come up with your awn test flles. You may assume the files will be properly formatled. Unless otherwise stated, when printing a player to the screen, use the following format: User's Menu 1. Print all games highest Gibbons range to lowest 2. Print all games from a year - Obtain a year from the user and either print all the games from that year or print "No games found" 3. Time for a garne? - Ask the user how much time they have to play a game - Print a list of games they could play in the time given (e.g. if they enter 60 minutes, print all games that play in 60 minutes or less) 4. The People VS Dr. Gibbons - The goal of this is see where Dr. Gibbons and the people disagree - Obtain a number (0-10, decimals allowed) from the user and print all games where the people's rating and Dr. Gibbons rating are separated by that much or more - NOTE: This option doesnt care which rating is higher, it just prints games where ratings differ by a threshold set by the user 5. Print based on ranking - Obtain a ranking from the user - Print all games that have at least that Gibbons rank or better 6. Exit the program In 268, your main function should be very concise, passing control to some kind of Executive class that will then run the show (example main below). You need to think about how you represent a single entry from the file. Remember, we are making object oriented code, so you need to solve all the problems you encounter by using/create a class! Things to think about: - How can I represent a single game? - What kind of data does a game have, and how will I access it? - Remember, we're not in the business of public member variables that house critical information -What kind of information does a game need at construction time? -What will contain all of the games? You'll need a class (or classes) to handle other important things: 1. - You can assume if the file was able to be opened that it is formatted correctly 2. Reading the data from file and storing it 3. Present the user with a menu and handle the interactions - Don't assume the user is going to give you good input at the menu! Make sure they choose valid menu choices - You are not responsible for throwing or catching exceptions. 1. Set a breakpoint 2. Run debugger so that your code freezes when hitting the break point 3. Look at the values of the variables at that break point to verify their accuracy 4. Use the step or next commands to advance in the code - Be aware step will potentially enter code that you didn't author

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

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions