CompSci 001 19.1 Today’s topics Java Applications Simulation Upcoming Software Engineering (Chapter 7) Reading Great Ideas, Chapters 6.

Slides:



Advertisements
Similar presentations
Animation Marco Gillies. Computer Animation Making things move A key aspect of computer graphics Non-realtime for films Realtime for virtual worlds and.
Advertisements

Writers Companion was designed as the ONE program you will need for the entire writing process: Brainstorm, Organize, Edit and Publish in one program.
Heuristic Search techniques
1.1 Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. Al-Azhar University
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
CompSci Today’s topics Java Recursion in Graphics Writing a Class Simple Animation Upcoming Simulation Reading Great Ideas, Chapters 5.
Tailoring Needs Chapter 3. Contents This presentation covers the following: – Design considerations for tailored data-entry screens – Design considerations.
CS 106 Introduction to Computer Science I 11 / 09 / 2007 Instructor: Michael Eckmann.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
Game Design and Programming. Objectives Classify the games How games are design How games are implemented What are the main components of a game engine.
PDDL: A Language with a Purpose? Lee McCluskey Department of Computing and Mathematical Sciences, The University of Huddersfield.
CS 106 Introduction to Computer Science I 03 / 30 / 2007 Instructor: Michael Eckmann.
Computer Science Prof. Bill Pugh Dept. of Computer Science.
1 Today More on random testing + symbolic constraint solving (“concolic” testing) Using summaries to explore fewer paths (SMART) While preserving level.
Software Documentation Written By: Ian Sommerville Presentation By: Stephen Lopez-Couto.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
Graphical Tree-Based Scientific Calculator: CalcuWiz Will Ryan Christian Braunlich.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Grammars and Parsing. Sentence  Noun Verb Noun Noun  boys Noun  girls Noun  dogs Verb  like Verb  see Grammars Grammar: set of rules for generating.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
CompSci Today’s topics Java The Database Program Upcoming Recursion Reading Great Ideas, Chapter 4.
1 Chapter No 3 ICT IN Science,Maths,Modeling, Simulation.
CPS Today’s topics Java Language Inheritance Upcoming Electric Circuits (not in text) Reading Great Ideas, Chapters 5.
What is a computer? What is its definition? A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic.
Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each.
MOM! Phineas and Ferb are … Aims:
11 A First Game Program Session Session Overview  Begin the creation of an arcade game  Learn software design techniques that apply to any form.
CPS Today’s topics Java Information Retrieval Upcoming Database Programs Reading Great Ideas, Chapter 4.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
CompSci Today’s Topics Computer Science 1 Review Upcoming Final Exam: Thursday, 06/30, 2:00pm, Room 229 Social Sciences (here) Reading Great Ideas,
CompSci Today’s topics Java Review Just a bunch of headings meant to trigger questions A contraction of previous notes Upcoming Midterm Exam Reading.
Lecture 5: Developing Procedural Thinking (How to think like a programmer) B Burlingame 30 Sept 2015.
Creating an Effective PowerPoint Presentation
D. M. Akbar Hussain: Department of Software & Media Technology 1 Compiler is tool: which translate notations from one system to another, usually from source.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Python Programming Graphical User Interfaces Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Term 2, 2011 Week 1. CONTENTS Problem-solving methodology Programming and scripting languages – Programming languages Programming languages – Scripting.
1 Lesson: Applets with User Input and Output with GUI ICS4M.
1 CMPT 275 High Level Design Phase Modularization.
ECE 466/658: Performance Evaluation and Simulation Introduction Instructor: Christos Panayiotou.
Grade Book Database Presentation Jeanne Winstead CINS 137.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
1 CS145 Lecture 26 What’s next?. 2 What software questions do we study? Where is software headed?
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
CompSci Today’s topics Java Numbers Iteration Upcoming More Java Reading Great Ideas, Chapter 3.
CompSci Today’s topics Java Writing Functions/Methods Upcoming Information Retrieval Reading Great Ideas, Chapter 4.
Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation.
CompSci On the Limits of Computing  Reasons for Failure 1. Runs too long o Real time requirements o Predicting yesterday's weather 2. Non-computable.
Simulation Robin Burke GAM 224. Outline Design Milestone #4 Simulation Game design activity.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Computational Thinking
CompSci Today’s topics Computer Hardware Electric Circuits Designing an Adder Upcoming Computer Communications ( Great Ideas Chapter 10) Reading.
Today’s topics Java Input More Syntax Upcoming Decision Trees More formal treatment of grammers Reading Great Ideas, Chapter 2.
Lecture 3: Developing Procedural Thinking (How to think like a programmer) B Burlingame 16 Feb 2016.
First of all – lets look at the window’s you are going to use. At the top you have a toolbar, with all your various tools you can use when customising.
Today’s topics Java Looping Upcoming Arrays in Java Reading Great Ideas, Chapter 3.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
CompSci Today’s topics Java Recursion Upcoming Graphics Reading Great Ideas, Chapter 4 (begin Chapter 5 for graphics)
Sketch Tools L2 Advanced HCI. Agenda What is the problem with computer-based design tools? Why a toolkit? Framework Implementation Does it work? What.
CMPT 275 TEAM DIRECTORIES. One Sentence Summary The Study Buddy is: a tool to help users study to improve their grades by simulating a multiple choice.
A few m3 tips. Street Segment Length / Travel Time Need to compute in double precision –Otherwise too much round off See piazza.
Today’s topics Java Upcoming Reading Recursion in Graphics
Computational Thinking
Week 2 - Wednesday CS 121.
Today’s topics Java Information Retrieval Upcoming Database Programs
Unit 6.07: Design skills Computer aided design (CAD)
Today’s topics Java Arrays Upcoming Functions Reading
Prototyping.
Presentation transcript:

CompSci Today’s topics Java Applications Simulation Upcoming Software Engineering (Chapter 7) Reading Great Ideas, Chapters 6

CompSci What does it mean to be human?  Tool User?  Some animals use tools  Speech?  Some animals (whales?) seem to communicate by sound  Do simulations?  ? ? ?  Many things we do could be called simulations  Drawing a diagram of something to build  Using a map to give directions  Moveable furniture cutouts on a floor plan

CompSci Computer Simulation  As suggested before, can simulate without computer  Computer greatly extends the domain  Nowadays almost everything built is simulated first  What are some of the things made possible by computer simulation?  Early efforts:  Fancy camera lenses among first beneficiaries  Efficient paths for space ships  Population projections in relation to birth control policies  Let’s use the computer to find solution to simple problem

CompSci Dog Lot Fence  Optimize: i.e., give your dog the biggest lot in the face of constraints  Build lot against side of house  Fixed length roll of fencing (and posts)  Rectangular layout  Use program to try different values of x and y  Better than actually trying many layouts with a posthole digger!! x y Length of fence is 2*x + y

CompSci Fence public class Fence extends java.applet.Applet implements ActionListener { TextField mInstruct; Label lLength; DoubleField gLength; Button bSimulate, bDisplay; TextArea mResults; int k; public void init() { lLength = new Label("Length"); mInstruct = new TextField(70); mInstruct.setText( "Enter length of fence, the press Simulate or Display"); gLength = new DoubleField(10); bSimulate = new Button("Simulate"); bDisplay = new Button("Display"); mResults = new TextArea(25,60);

CompSci Fence.2 bSimulate.addActionListener(this); bDisplay.addActionListener(this); add(mInstruct); add(lLength); add(gLength); add(bSimulate); add(bDisplay); add(mResults); } public void actionPerformed(ActionEvent event) { Object cause = event.getSource(); double fenceLength; if (cause == bSimulate) { fenceLength = gLength.getDouble(); fenceTable(fenceLength); } if (cause == bDisplay) { fenceLength = gLength.getDouble(); fencePlot(fenceLength); }

CompSci Fence.3 void fenceTable(double fenceLength) { double area, x, y; x = 0.0; y = fenceLength * x; mResults.setText("Fence Optimization Table\n"); while (y >= 0.0) { area = x * y; mResults.append("x = " + x + " y = " + y + " area = " + area + "\n"); x = x + 1.0; y = fenceLength * x; }

CompSci Fence.4 void fencePlot(double fenceLength) { double area, x, y; x = 0.0; y = fenceLength * x; mResults.setText("Fence Optimization Plot\n"); while (y >= 0.0) { area = x * y; mResults.append(x+"\t"+plotString(area)+"\n"); x = x + 1.0; y = fenceLength * x; } String plotString(double area) { String s = ""; while (area > 0) { s = s + "*"; area = area - 5.0;} return s; }

CompSci Fence Optimization  Output makes it clear how fence should be arranged  Not necessarily intuitive (makes simulation useful)  (Can use other tricks -- non computer -- to get answer)  Note we eyeballed the output to get answer  Could have had computer pick the maximum area  Could you sketch that program out?  Let’s use slightly different approach; answer not obvious  Fix area  Minimize amount of fencing used  Change scenario a bit o Build into corner o Put in a tree!

CompSci Fence with Tree  Program a bit more complicated  Will not go over details  However, intuitive methods not likely to work  Must use program to get right answer  Program is on-line tree x2x2 y x y2 (xt, yt)

CompSci Pitfalls in Automatic Methods  Optimization problems seem straightforward enough  Not always the case  May involve many variables  Exhaustively checking all possible values may take too long  Need to intelligently look for optimal solution  However, can have local maxima or minima  Can lead to wrong answer  Sometimes optimal Solution is computationally out of reach  Will come back to that theme at end of semester

CompSci Simulation in Microelectronics  Modern microchips too complicated to be build without simulation  It take computers to build computers (recursion?)  One chip takes tens of thousands of dollar to make  Additional ones are almost free  One error and it’s useless  Each much too complex to check by hand  Modern chips have millions of transistors  Every aspect of the process is simulated  Logic  Layout  Circuit characteristics  Fabrication Process

CompSci Other Popular Simulation Targets  Games that are Simulations  SimCity  Flight Simulator  Often serious simulation tools make interesting games  Graphics  Many movies now use computer graphics  More and more are entirely graphics o Not voices, though!  Pioneering: UNC Computer Science Walk-through  Virtual Reality  Headsets  Caves

CompSci Other Popular Simulation Targets  Architecture  Models  “Walk-through” extensions  Design your own kitchen  Artificial Aging  Project what missing child would look like now  Police Work  Computerized generation of suspect’s face  Beauty  Your image with different hairdos, makeup, etc.  Your entry here:____________