Develop a Python Console application described as follows:
1. Declare a class named Phone includes private members (fields) as follows: a. Data members: id: int, name: string, color: string, price : float b. Methods ( Functions ) - Declare parameterized constructor and properties (setter & getter) for the fields - Override __str__ () method to return all Phone’s pieces of information 2. Declare a Program class, this class has a “Main method” that will print out the menu to perform the functions as follows : Option 1: Create a list of 05 phones Option 2: Add new phone Option 3: Find a phone by id Option 4. Print phone list in descending order by price Option 5: Exit Hints: -Use collections: list or dictionary to store objects then performs finding/adding functions - You can create other functions if necessary ----------------------------------------------oOo----------------------------------------------
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More