This is a team assignment. Many complicated movie scenes that you see involve lots of individually generated objects, all assembled together on one screen. A computer generated movie scene of a city (such as in Spiderman) involves superimposing a number of buildings of different shapes and sizes. For this assignment, you will create a city by drawing a number of buildings of varied sizes. Create a directory named skyline to store
your work, then copy into it the Canvas class from the course
directory. (For part 2, copy your directory and all code within to another directory called skyline2; that way, you don't clobber your first submission when you turn it in.) Create a class called Part 1
Part 2
You should add on your own any private instance variables that you need. Draw your building by doing what you can to make a rectangle look building-like. Add an antenna to the top of the building whose height is proportional to the rest of the building. Draw windows running down and across the buildings. You don't need to crazy making the width of the windows correct or anything like that: some attempt at making some kind of repeated pattern of windows should do the trick. Of course, feel free to get as fancy as you like after you get everything else working. Test your code as you go along. In other words, create
another class called When you are all done with Part 2, test your code against the Skyline.java that I provide. If you have built your Good luck, and have fun! Remember that lab assistants and prefects are available to help out if you need it. |
|
Moodle Docs for this page