Giter Club home page Giter Club logo

classes-arjsan1's Introduction

Cityscape Lab

# Introduction
# 
The goal of this lab is for you to demonstrate that you can define
	classes, create objects, and display graphics via a Java
	application.

# Requirements
# 
* Commit to GitHub, at least daily, with a meaningful commit message
	describing what you accomplished and what needs to be done next.

* Create a Java graphical application (with a Viewer class, Component
	class, and other classes) that displays a cityscape.

* Complete each milestone and demonstrate to your instructor for
	feedback before continuing to the next milestone.

* **Milestone #1**

    * design one class for an element of the cityscape (e.g.,
	building, window, sun, moon, car, tree)

    * demonstrate good class design (encapsulation)

    * provide configurability through constructors and instance
    	variables (size, color, etc.)

    * demonstrate this milestone to your instructor and receive
    	feedback

* **Milestone #2**

    * create multiple instances of at this class with different
    	properties and display in the cityscape

    * demonstrate this milestone to your instructor and receive
    	feedback

* **Milestone #3**

    * design at least two additional classes, at least three in
    	total, for elements of the cityscape (e.g., building, window,
    	sun, moon, car, tree)

    * demonstrate good class design (encapsulation)

    * provide configurability through constructors and instance
    	variables (size, color, etc.)

    * demonstrate this milestone to your instructor and receive
    	feedback

* **Milestone #4**

    * Animate at least one object in the cityscape. The animation
    	must be purposeful, not random. This means that you must
    	modify a property of an object and that object must persist
    	across calls to the paintComponent method.

    * demonstrate this milestone to your instructor and receive
    	feedback

* Document all classes using JavaDoc comments as demonstrated in our
	[code
	template](https://drive.google.com/file/d/18U-gWhzdb5q6cDMV5up-
	e0itlunQtbrA/view?usp=sharing).

Here is an example design class diagram to illustrate the
	relationship among the classes in this proj![image alt
	text](image_0.png)

# Extensions
# 
* Define additional classes for additional elements of the cityscape.

* Randomize your cityscape (a different cityscape every time)

* Add More Awesome.

# Submission
# 
* Submit a link to your GitHub repository for this assignment in
	Canvas.

* If you would like your Cityscape Lab featured on the school TVs,
	take a short screencast of your animated cityscape and add it to
	the [shared Google slide
	deck](https://docs.google.com/presentation/d/
	1utgoGkeT80Y2CxREjxTef4jxy8t8YyU-UfQOvec37XQ/edit?usp=sharing)
	based on the provided template slide.

https://docs.google.com/document/d/1lXPI4xs0Gn15SQr2bRSXQHGeqDjcgMHxWynYjRQCfKg/edit

classes-arjsan1's People

Contributors

arjsan1 avatar

Watchers

 avatar

classes-arjsan1's Issues

I would recommend encapsulating windows within the Building class. The Building class should be responsible for drawing its own windows and then the paintComponent method wouldn't need to handle that. The code would be more reusable, there would be less code in paintComponent, and there would likely be fewer bugs.

private Building b1;
private Window w1;
private Building b2;
private Building b3;
private Window w2;
private Window w3;
private Building b4;
private Window w4;

Nice work making your classes configurable and therefor more flexible and reusable!

this.moon1 = new Moon(50,50,50,50, Color.WHITE);
this.w1 = new Window(35, 325, 50, 50, Color.YELLOW);
this.land1 = new Land(0,500,800,300, Color.GREEN);
this.b1 = new Building(25, 300, 100, 200, Color.MAGENTA);
this.b2 = new Building(240, 350, 100, 150, Color.CYAN);
this.w2 = new Window(290, 370, 35, 30, Color.YELLOW);
this.b3 = new Building(470, 325, 100, 175, Color.BLUE);
this.w3 = new Window(480, 350, 50, 40, Color.YELLOW);
this.b4 = new Building(650, 340,100, 160, Color.PINK);
this.w4 = new Window(700, 360, 35, 35, Color.YELLOW);
this.u1 = new UFO(550, 200, 200, 30, Color.RED,glass);
this.u1 = new UFO(550, 200, 200, 30, Color.RED,glass);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.