logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
William BellBusiness
(5/5)

756 Answers

Hire Me
expert
Joan DomettEngineering
(4/5)

809 Answers

Hire Me
expert
Lynette WhiteGeneral article writing
(5/5)

647 Answers

Hire Me
expert
Erlanda AlvesMarketing
(5/5)

918 Answers

Hire Me
Others
(5/5)

calculate the minimum maximum and average rent for the properties in that category

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Specification There are a lot of details to deal with here. Take each bit one at a time, and ask lots of questions. Start with your code from Assignment Eight. DataSet Class _table_statistics(self, row_category: Categories, label: str) Given a category from the Categories Enum, and a string matching one of the items in that category, calculate the minimum, maximum and average rent for the properties in that category, but those values should be filtered. How do we filter the values? Let's demonstrate by example. Suppose _active_labels[Categories.PROPERTY_TYPE] = {"Private Room"}. In other words, "Entire home / apt" has been filtered out. If we call _table_statistics(Categories.LOCATION, "Manhattan"), we are asking for the min, avg and max rent for Manhattan. But only for properties that match "Private Room". There are only two matching properties in our default data. We should get back a tuple (98, 111.5, 125). It might be a good idea to test using this example. Because this method is intended private, you do not need to provide any protection from bad arguments. display_field_table(self, rows: Categories) Raise EmptyDatasetError if no data is loaded. Notice that one of the two categories was passed. Display a table of the minimum, maximum and average rent for each item in that category. The data presented should be filtered. Print out the labels that are currently active, and use _table_statistics() to gather the data. get_labels(self, category: Categories) Returns a list of the items in _labels[category]. get_active_labels(self, category: Categories) Returns a list of the items in _active_labels[category]. toggle_active_label(self, category: Categories, descriptor: str) This public method will add or remove labels from _active_labels, allowing the user to filter out certain property types or locations. If the passed descriptor is not a label in _labels[category], raise KeyError. Otherwise: add descriptor to _active_labels[category] if descriptor is not in the set or... remove descriptor from _active_labels[category] if descriptor is in the set. Module Level Functions manage_filters(dataset: DataSet, category: DataSet.Categories) Using the DataSet methods get_labels(), get_active_labels(), and toggle_active_label(): Print a menu-like list of all the labels for the given category Indicate which ones are currently active (i.e. the string exists in dataset._active_labels[category] Allow the user to change a label from active to inactive or from inactive to active Loop until the user has finished making their choices See the sample run for an idea of how to present this. Note the following requirements: You must use enumerate to generate the menu items, and start with item 1 You must use the public getter and setter methods for Dataset. Do not access the data directly. Modifications to Existing Code menu() function We have now implemented items 4 through 7 from our menu. Adjust the menu() function to call manage_filters() or display_field_table() with the appropriate arguments. Catch any EmptyDatasetError that is raised and provide an appropriate message to the user.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme