Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

I have this menu: [1] load shapes, [2] exit the program, [3] add shapes. my python program uses graphics.py and is supposed to load a txt file that has a bunch of random shapes such as:

rectangle, 500,500, 550,580, green  

point, 200,50,black

triangle, 500,100, 600,100, 550,200, yellow

oval, 100,100, 400,200, red

text, 500,50, hello world!, blue

polygon, 300,550, 500,550, 450,350, 350,350, blue

and so on. 

my program should be able load in a text file and draw the shapes no matter what the shapes parameters are. They wont be these specific colors and sizes. If my user chooses option [1] load shapes, it should give them the option to input the name of the file, then draw the shapes on that file that my program supports. It should also ignore any #comments or blank lines that the text file contains.

Also should close the program/window if the user chooses option [2]

if the user chooses option[3] it should give them the choice to add a drawing of either a rectangle or a circle to the window. 

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education