Question
Part 1: DrawingObject Based Drawing and File Exporter (1/2 of project points) Filename: ObjectDrawing.java You will be provided with the DrawingObject files you will need
Part 1: DrawingObject Based Drawing and File Exporter (1/2 of project points) Filename: ObjectDrawing.java You will be provided with the DrawingObject files you will need to complete the project. You may choose to use your own so long as they are not functionally different from those provided. This portion of the program will be expected to use DrawingObjects directly to make a an image. You may wish to use your original program that drew directly in StdDraw and modify it to use objects, this would be acceptable, but you may also create a new image. After the image is drawn, the program will save the object definitions to a plain text file by encoding the objects in the manner described below in the section “File format”. The name of the exported drawing file must be: cs250_drawing.txt. (case must match as well) Your program must do this each time it is run, so do leave that portion in the final submission of this program part. You will not submit your exported file, so it is critical that your program do this.
Part 2: Drawing File Loader (1/2 of project points) Filename: DrawingLoader.java This program will load a file that has been saved in the file format described the that section of this document. Prompt the user for the filename. If the filename cannot be found, attempt to load cs250_drawing.txt. If neither file exists, print a suitable error message and exit the program. When the file is successfully found, the program will then display the related drawing by calling the draw method on each of the objects drawn. It is required that you use a net.datastructures LinkedQueue object of type DrawingObject to store the drawing objects. You will have added an iterator to this object in optional Hwk 4, so you must use this iterator to draw all of the objects that have been loaded. Otherwise use a SLL of type DrawingObject and use its iterator. A test file will be provided including a screen shot of the expected drawing for that file. You should also use your created file from part 1 to test that it can be loaded properly. The program must load all objects except Polygons to receive full credit on this portion.
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
Step: 1
Part 1 DrawingObject Based Drawing and File Exporter This program will use DrawingObjects directly to create an image The program will then save the o...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started