DOC PREVIEW
TRINITY CSCI 1311 - Lecture Notes
Pages 10

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 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 10 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 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Optimization Problems2/23/2009Opening Discussion●Minute Essay comments–Practicing solving problems and looking over code is an ideal way to learn what we are doing.●When you read code keep an eye on both details of syntax and meaning.–Don't start to code immediately on a new problem.–Arrays–You don't need to learn any of the Excel stuff I have covered.More comments–What methods should you be able to recreate on your own?●Anything we write in class.●I'd rather you not think of it as recreating.–Translating ideas to code. Syntax.–When to use different things.–Making a web site.●Very few people have come to talk to me for any significant amount of time this semester.Optimization Problems●One of the most common type of problems that people solve on computers is the optimization problem.●This is a class of problems where we are looking for the best solution. It could be the smallest or the largest, but it is always an extreme value.●Examples include finding the shortest route, minimizing costs, maximizing utility, etc.Our Problem●The problem I want us to do today is this. Given a set of buildings at different locations, we want to build sidewalks that connect all the buildings.●Of course, we want to lay down as little sidewalk as possible.●How do we determine where to build sidewalks to do this?How do we go about doing this?●I want to try something a bit new today. Break up into groups of 2-3 and for five minutes I want you to discuss how you would solve this problem. Think in English terms, but break it down to the level where we have a chance of coding it.●At the end of five minutes I will be calling on some of you o hear what you came up with.New Scenario●To make this happen I want us to build a new scenario.●I want the scenario to have building randomly placed in the world that we have to connect with sidewalks.Greenfoot Graphics●Making the sidewalks will require something that we haven't done previously.●You might have noticed in the Greenfoot API that there is a class called GreenfootImage. This is what Greenfoot uses for the graphical display.●This class has methods that allow us to draw things to the image. We want to draw in lines for sidewalks.Coding the Solution●With whatever time we have let's start trying to code up a solution to this optimization problem.Minute Essay●What are some examples of optimization problems you can think of? They are everywhere, just give it a bit of thought and you should come up with several.●Wednesday is the due date for your project design. This is a document written in standard English where you tell me what classes your project will have, what methods and data members are in those classes and what the methods do. It is worth 20% of the project


View Full Document

TRINITY CSCI 1311 - Lecture Notes

Course: Csci 1311-
Pages: 10
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 Lecture Notes
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 Lecture Notes 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 Lecture Notes 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?