Aalborg Media Lab 27-Jun-15 Workshop / Exercises Lecture 9 Summary, Exercises.

Slides:



Advertisements
Similar presentations
Introduction to Programming
Advertisements

A workshop for STEM subjects on Sustainable Development The Higher Education Academy Session 7: Close THE SUSTAINABLE PRACTITIONER.
Class Scope class Student { private: string id; string firstName, lastName; float gpa; public: void Read() { cin >> id >> firstName >> lastName >> gpa;
Computer Programming Lab 8.
Aalborg Media Lab 2-May-15 Exercises/Summary Lecture 10 Summary, Exercises.
Lecture 2 Introduction to C Programming
Conditionals with Strings The comparison operators we’ve seen so far (==, !=, >=, > etc.) all apply to numbers ( ints floats doubles etc.) and return either.
1 Powers of Two: Trace Ex. Print powers of 2 that are  2 N. Increment i from 0 to N. Double v each time. int i = 0; int v = 1; while (i
What Data Do We Have? Sections 2.2, 2.5 August 29, 2008.
Aalborg Media Lab 19-Jun-15 Exercises/Summary Lecture 12 Summary, Exercises.
Introduction to Computers and Programming Lecture 10: For Loops Professor: Evan Korth New York University.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 2 “ Data and Expressions”
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Copyright 2008 by Pearson Education Building Java Programs Chapter 4 Lecture 4-1: if and if/else Statements reading: 4.2 self-check: #4-5, 7, 10, 11 exercises:
Computing with Strings CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
Introduction to UML Lian Yu Department of Computer Science and Engineering Arizona State University Tempe, AZ
Object Oriented Design and UML
CSE 1301 Lecture 11 Object Oriented Programming Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
CSE 1302 Lecture 7 Object Oriented Programming Review Richard Gesick.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 3A Integral Data (Concepts)
1 CSE1020: Introduction to Computer Science I. 2 Today’s Lecture Course administrative details Material from Chapter 1 “Introduction to Programming” 19:00-22:00.
1 Object Oriented Design and UML Class Relationships –Dependency –Aggregation –Inheritance Reading for this Lecture: L&L 6.4 – 6.5.
Chapter 3:Decision Structures.  3.1 The if Statement  3.2 The if-else Statement  3.3 The if-else-if Statement  3.4 Nested if Statements  3.5 Logical.
Discussion 5. Lab 3 Not really using rectangle class Return type of getPoint is String instead of Point You are not able to retrieve the point if you.
Agenda Object Oriented Programming Reading: Chapter 14.
1 Object Oriented Design and UML Class Relationships –Dependency –Aggregation –Interfaces –Inheritance Interfaces Reading for this Lecture: L&L 6.4 – 6.5.
Logistics, Exercises and Demos Everyone should register for the course ‘SAV’ in whatAFunCourse Please obtain “The Calculus of Computation”
Static class members.
1 CS1100 Fall Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems CS100J:
Programming with Visual C++: Concepts and Projects Chapter 3A: Integral Data (Concepts)
1 Object-Oriented Design Now we can extend our discussion of the design of classes and objects Chapter 6 focuses on: software development activities determining.
Chapter 2 Data abstraction: introductory concepts.
ITP © Ron Poet Lecture 6 1 More on if. ITP © Ron Poet Lecture 6 2 Remembering Tests  We often want to remember the result of a test, so that we can use.
A: A: double “4” A: “34” 4.
CSC 205 Java Programming II Introduction. Topics Syllabus Course goals and approach Review I Java language fundamentals.
Pointer Lecture 2 Course Name: High Level Programming Language Year : 2010.
Keyboard and Screen I/O (Input/Output). Screen Output  System.out is an object that is part of the Java language. (Don’t worry yet about why there is.
1 CS100J Spring Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems.
Outline Software Development Activities Identifying Classes and Objects Static Variables and Methods Class Relationships Interfaces Enumerated Types Revisited.
1 Flow of Control Chapter 5. 2 Objectives You will be able to: Use the Java "if" statement to control flow of control within your program.  Use the Java.
26 February 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
The impact on students So far I have not been able to assess anything more than their interest in languages, which is very high. The students entered for.
1 Lecture 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line of Text 2.3Another Simple C Program: Adding.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Topic: Conditional Statements – Part 2
2. Java language basics (2)
Lecture on Design Phase and UML Class Diagrams
Introduction to programming in java
Introduction to Programming
Final Exam Study Guide This test will cover Chapters 1-13 in the course book. Review each lecture slide and class notes to narrow your focus of study for.
Register Use Policy Conventions
Object Oriented Programming
Object Oriented Programming
Review Operation Bingo
Principles of Computer Programming (using Java) Chapter 2, Part 1
Lecture Notes – Week 3 Lecture-2
תירגול 9 אובייקטים.
Building Java Programs
Relational, Logical, and Equality Operators
Lecture Notes – Week 4 Chapter 5 (Loops).
Object Oriented Programming Review
Life is Full of Alternatives
Arithmetic Operations
Works Cited Page Begin your Works Cited page on the next blank page at the end of your paper. It should have the same one-inch margins and last name, page.
Chapter 2 Sets Active Learning Lecture Slides
Coming up Variables Quick look at scope Primitives Objects
Presentation transcript:

Aalborg Media Lab 27-Jun-15 Workshop / Exercises Lecture 9 Summary, Exercises

Aalborg Media Lab 27-Jun-15 Summary Chapter 1-6 core of SD course –Are general for most OO Programming Languages Additional features are listed in the rest of the book, are covered in the upcoming lectures. Two lectures have no content yet, any suggestions? project relevant topics, (game? )

Aalborg Media Lab 27-Jun-15 Leap Year Exercises Design an application that reads integer values and determines if the integer corresponds to a leap year. A leap year is divisible by 4, unless it is divisible by 100 but not 400. The entered number must be greater than 1582.

Aalborg Media Lab 27-Jun-15 Leap Year Truth-Table Year % 4Year % 100Year % 400isLeapYear False TrueFalse True False True if( year % 4 == 0 && year % 4 != 0 || year % 400 == 0)

Aalborg Media Lab 27-Jun-15 Course Exercises Design an implement a class called course that represents a course taken at school. Use the student class from book. The course class should contain an addStudent method and a roll method for printing all students attending to the course.

Aalborg Media Lab 27-Jun-15 Student -firstName: String -lastName: String -homeAddress: Address -schoolAdrees: Address -testScore: int + toString(): String Address -streetAddress: String -city: String -state: String -zipCode: long + toString(): String Course -name: String -studentList: String -scoreAverage: double -noStudents: int + toString(): String + roll(): + addStudent(Student): + getAverageScore(): int

Aalborg Media Lab 27-Jun-15

Aalborg Media Lab 27-Jun-15 Exercises so far LectureExercises SD1 – SD2 – , 2.5, 2.9, 2.11, 2.13, (2.15) SD3 – – 3.5 SD4 – , 4.8, 4.10 SD5 – , 5.2, 5.13 SD6 –