CSE 116 Introduction to Computer Science For Majors II Carl Alphonce 219 Bell Hall.

Slides:



Advertisements
Similar presentations
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Advertisements

CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Cmput Lecture 8 Department of Computing Science University of Alberta ©Duane Szafron 2000 Revised 1/26/00 The Java Memory Model.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall NEW   NEW 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
Summary of the lecture We discussed –variable scope –instance variable declarations –variable lifetime.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Syntax & terminology review While the following slides are not exactly what we did on the board (object diagrams are not shown here) they cover most of.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE 115 / 503 Introduction to Computer Science I
CS 206 Introduction to Computer Science II 01 / 21 / 2009 Instructor: Michael Eckmann.
CSE 115 / 503 Introduction to Computer Science For Majors I Carl Alphonce 219 Bell Hall.
CSE 305 Introduction to Programming Languages
Slides prepared by Rose Williams, Binghamton University Chapter 5 Defining Classes II.
Run-Time Storage Organization
Fall 2005CSE 115/503 Introduction to Computer Science I1 Lecture #4 Agenda Announcements Review Questions? Classes and objects UML class diagrams Creating.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CSE 115 Week 3 January 28 – February 1, Monday Announcements Software Installation Fest: 2/5 and 2/6 4pm – 7pm in Baldy 21 Software Installation.
CSE 115 / 503 Introduction to Computer Science For Majors I Carl Alphonce 219 Bell Hall.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
CSE 116 Introduction to Computer Science For Majors II Carl Alphonce 219 Bell Hall.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
CSE 115 / 503 Introduction to Computer Science I
Fall 2005CSE 115/503 Introduction to Computer Science I1 Composition details Recall, composition involves 3 things: –Declaration of instance variable of.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
CSE116 / CSE504 Introduction to Computer Science II Carl Alphonce 219 Bell Hall
Memory organization and usage A computer’s memory is, at its lowest level, composed of binary digits (bits). The memory is organized into bytes, which.
Tutorial 6 Memory Management
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall NEW   NEW 1.
CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall 1.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
Computer Science and Software Engineering University of Wisconsin - Platteville 2. Pointer Yan Shi CS/SE2630 Lecture Notes.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Memory organization and usage A computer’s memory is, at its lowest level, composed of binary digits (bits). The memory is organized into bytes, which.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Runtime Organization (Chapter 6) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the relationship between arrays and pointers ❏ To understand the.
This document is copyright (C) Stanford Computer Science and Marty Stepp, licensed under Creative Commons Attribution 2.5 License. All rights reserved.
Memory Management Memory Areas and their use Memory Manager Tasks:
SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.
Memory Management Memory Areas and their use Memory Manager Tasks:
Presentation transcript:

CSE 116 Introduction to Computer Science For Majors II Carl Alphonce 219 Bell Hall

Spring 2008CSE 116 Introduction to Computer Science For Majors II2 Last class Syllabus –pick one up if you didn’t get one last time –turn in signature sheet if you didn’t already Name sign –put yours out –bring to each class

Spring 2008CSE 116 Introduction to Computer Science For Majors II3 Today’s lecture Student survey 115 review –plus new details

Spring 2008CSE 116 Introduction to Computer Science For Majors II4 Modeling Software development can be viewed as model building Hard part is learning –what to model from a problem domain –how to model it

Spring 2008CSE 116 Introduction to Computer Science For Majors II5 Object orientation Building blocks of a program are objects. Objects: –properties –capabilities (behaviors) –instances of classes Classes –what the programmer writes

Spring 2008CSE 116 Introduction to Computer Science For Majors II6 Class instantiation process by which objects are created example new JButton()

Spring 2008CSE 116 Introduction to Computer Science For Majors II7 Class instantiation new + constructor new JButton() new : operator JButton() : constructor call

Spring 2008CSE 116 Introduction to Computer Science For Majors II8 Class instantiation new + constructor new JButton() new : operator JButton() : constructor call

Spring 2008CSE 116 Introduction to Computer Science For Majors II9 Class instantiation new JButton() is an expression whose value is , the starting address of the block of memory storing the representation of the JButton object just created.

Spring 2008CSE 116 Introduction to Computer Science For Majors II10 Reference can be used can be stored (in a variable) for later use

Spring 2008CSE 116 Introduction to Computer Science For Majors II11 Calling a method (new JButton()).setText(“Quit”); JButton var = new JButton(); var.setText(“Quit”);

Spring 2008CSE 116 Introduction to Computer Science For Majors II12 Larger context: memory use How is memory allocated to a process (a running program)? How does allocation of memory affect the lifetime of a variable? How do method calls and parameter passing really work?

Spring 2008CSE 116 Introduction to Computer Science For Majors II13 Memory organization and usage A computer’s memory is, at its lowest level, composed of binary digits (bits). The memory is organized into bytes, which are groups of eight bits. Each byte has a unique address in memory. A byte is the smallest addressable unit of memory (i.e. nothing smaller than a byte has its own address)

Spring 2008CSE 116 Introduction to Computer Science For Majors II14 Memory organization Process BProcess AProcess C

Spring 2008CSE 116 Introduction to Computer Science For Majors II15 Memory organization Process BProcess AProcess C STATIC SEGMENT RUNTIME STACK FREE/AVAILABLE MEMORY HEAP dynamically allocated memory

Spring 2008CSE 116 Introduction to Computer Science For Majors II16 Next time Bring name signs (again) 115 review (continued)