DOC PREVIEW
TRINITY CSCI 1311 - Types and the Class Diagram
Pages 7

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Types and the Class Diagram/First Look at Code1-22-2010Opening Discussion●Recipes vs. algorithms–Specificity (add eggs)●Humans read recipies–Simplicity/logic–Making the objects/ingredients●How do you program the selector so you don't have to move it manually?Greenfoot Class Diagram●You might have wondered some about the area in Greenfoot that shows you classes and why it is organized the way it is.●The organization relates to the type system in Java.●Arrows represent an is-a relationship.Inheritance/Subtyping●In programming we call this type of relationship inheritance because the subclass gets all the things in the superclass.●It also provides subtyping. This means that anyplace where you use the supertype, any subtype can be substituted.●Greenfoot is programmed to work with Actors in general. It will work with any subtype of actor as well.First Look at Java●Now we will take our first look at real Java code. You can look at the program behind any class by double clicking on the class. This brings up an editor window.●Java programs can be edited with any text editor. Word is not a text editor. Notepad is.●Let's start with the Leaf class in PSPGWombat.●Now the Wombat class.Structure and Punctuation●When looking at the code you will see certain patterns.●There is a lot more punctuation than normal English, including parentheses and braces.●These things matter. The language is specific. If something is missing the code won't compile and nothing happens.Minute Essay●Do you have any questions about the material we discussed


View Full Document

TRINITY CSCI 1311 - Types and the Class Diagram

Course: Csci 1311-
Pages: 7
Documents in this Course
Arrays

Arrays

12 pages

Arrays

Arrays

10 pages

Applets

Applets

5 pages

Arrays

Arrays

8 pages

Methods

Methods

12 pages

Drawing

Drawing

8 pages

Load more
Download Types and the Class Diagram
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Types and the Class Diagram and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Types and the Class Diagram 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?