CS 106 Introduction to Computer Science I
|
|
- Rodger Warren
- 7 years ago
- Views:
Transcription
1 CS 106 Introduction to Computer Science I 04 / 06 / 2015 Instructor: Michael Eckmann
2 Today s Topics Comments and/or Questions? Let's finish Pet/Dog/Cat/TalkingDog classes Overriding methods Abstract New Topic Decimal numbers vs. Binary numbers Bit shifting Michael Eckmann - Skidmore College - CS Spring 2015
3 Inheritance Super class vs. Subclass (aka Parent class vs. Child class) Use extends keyword to describe the inheritance e.g. public class Cat extends Mammal Cat is subclass, Mammal is the superclass Classes that do not have the extends keyword implicitly extend Object (a class in the Java API) A subclass inherits all the instance variables (even private ones) from the super class. A subclass's constructor should first call the superclass's constructor (by calling super(... )) Place any parameters that the super class's constructor has inside the parens
4 Pet, Dog & Cat classes Let's create a small class hierarchy with Pet as the superclass and Dog and Cat as subclasses. All Pets have name breed Dogs additionally have a skill Let's say Cats have no additional data Let's say all Pets sleep the same... Zzzzz. Let's also have Dogs and Cats be able to speak (Dogs go woof, Cats go meow. Let's create some objects of type Cat and Dog and have them speak.
5 Pet, Dog & Cat classes Let's create an array of Pet objects. Can we call sleep() on each Pet? yes Can we call getname() on each Pet? yes Can we call speak() on each Pet? no, not as written because speak is not in the Pet class (it is only in the Cat and Dog classes) Could cast the Pet to the correct subclass type and then call speak, but there's a better way
6 Overriding methods A subclass can override a superclass's method by providing a definition for a method that exists in the superclass with the same name and number and type of parameters.
7 More on overriding methods Using the classes Pet, Dog, and Cat - We provide a speak() method in Pet but with no body. Then, any class that inherits from Pet, must implement this method (if the class intends to be instantiable (not abstract)). Further, let's assume we have a class TalkingDog which doesn't bark when he speaks, instead he speaks English. To implement this stuff...
8 Abstract classes Abstract classes Can never be instantiated Can contain both abstract methods and actual (non-abstract) methods Can contain instance variables as well as constants If a class contains any abstract methods then it MUST BE an abstract class But an abstract class is not required to have abstract methods
9 More on overriding methods So we have classes Pet (abstract), Dog, TalkingDog and Cat. We provided a speak() method in Pet with no body (and we make it abstract) which forced the Pet class to be abstract. Then, any class that inherits from Pet, must implement this method. We provided an actual (non-abstract) method sleeps() in Pet. And the class TalkingDog which doesn't bark when he speaks, instead he speaks English.
10 More on overriding methods Dog and Cat inherit from Pet. TalkingDog inherits from Dog. Note: because Pet contains an abstract method, the class is not instantiable --- the class itself must be declared as abstract.
11 abstract methods The reason we create an abstract method (with an empty method body) in the superclass is so that this guarantees that all subclasses must provide this method if they are to be instantiable. Make the method abstract if the superclass doesn't need to be instantiable and if there is no obvious default behavior for the method in the superclass --- this passes the requirement of the behavior of the abstract method to any subclass that wants to be instantiable. Notice: a subclass of Pet had to include code for the speak() method we couldn't instantiate an object of type Pet because it is abstract
12 Decimal numbers Decimal numbers are numbers in base 10. Each position in the number can be one of 10 digits (0-9). Each place represents a 10 i 's place in the number. eg. the base 10 number 965 has a 5 in the 10 0 place, a 6 in the 10 1 place and a 9 in the 10 2 place. The value of this number is 5* * *10 2 = 965.
13 Binary numbers Recall that the primitive data types (int in particular) are stored in binary. Let's review binary numbers here. Binary numbers are numbers in base 2. Each position in the number can be one of 2 digits (0-1). Each place represents a 2 i 's place in the number. eg. the binary number 100 has a 0 in the 2 0 place, a 0 in the 2 1 place and a 1 in the 2 2 place. The value of this number is 0* * *2 2 = 4 in base 10. Let's look at more examples on the board and compare to decimal numbers.
14 Binary numbers What is the value in base 10 of the binary number: 10101? What is the value in base 10 of the binary number: 11101? What is the value in base 10 of the binary number: 10111? What is the value in base 10 of the binary number: ?
15 Binary numbers What is the value in base 10 of the binary number: 10101? = 21 What is the value in base 10 of the binary number: 11101? = 29 What is the value in base 10 of the binary number: 10111? = 23 What is the value in base 10 of the binary number: ? =
16 shifting When you multiply a decimal number by 10 the result is the number shifted left by 1 position (with a 0 after it). When you multiply a decimal number by 100 the result is the number shifted left by 2 positions (with 00 after it). When you divide a decimal number by 10 the result is the number shifted to the right by 1 position. When you divide a decimal number by 100 the result is the number shifted to the right by 2 positions. And so on...
17 Bit shifting When you multiply a binary number by 2 the result is the number shifted left by 1 position (with a 0 after it). When you multiply a binary number by 4 the result is the number shifted left by 2 positions (with 00 after it). When you divide a binary number by 2 the result is the number shifted to the right by 1 position. When you divide a binary number by 4 the result is the number shifted to the right by 2 positions. And so on...
18 Bit shifting >> and << are bit shift operators. They each work on two operands. The operand to the left is the number that will be shifted. The operand to the right is the number of positions to shift.
19 Bit shifting Another programming assignment will be assigned which you will be able to start tomorrow during lab. It will require you to use the ppm images and bit shifting and more to be able to compare images based on their color content. Example idea of histogram bins on the board.
Java Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationCSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.
CSCI 253 Object Oriented Design: Java Review OOP George Blankenship George Blankenship 1 Object Oriented Programming (OOP) OO Principles Abstraction Encapsulation Abstract Data Type (ADT) Implementation
More informationAgenda. What is and Why Polymorphism? Examples of Polymorphism in Java programs 3 forms of Polymorphism
Polymorphism 1 Agenda What is and Why Polymorphism? Examples of Polymorphism in Java programs 3 forms of Polymorphism 2 What is & Why Polymorphism? 3 What is Polymorphism? Generally, polymorphism refers
More informationProgramming Languages Featherweight Java David Walker
Programming Languages Featherweight Java David Walker Overview Featherweight Java (FJ), a minimal Javalike language. Models inheritance and subtyping. Immutable objects: no mutation of fields. Trivialized
More informationCS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
More informationBuilding Java Programs
Building Java Programs Chapter 9 Lecture 9-1: Inheritance reading: 9.1 The software crisis software engineering: The practice of developing, designing, documenting, testing large computer programs. Large-scale
More informationAP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
More informationAgile Software Development
Agile Software Development Lecturer: Raman Ramsin Lecture 13 Refactoring Part 3 1 Dealing with Generalization: Pull Up Constructor Body Pull Up Constructor Body You have constructors on subclasses with
More informationHistory OOP languages Year Language 1967 Simula-67 1983 Smalltalk
History OOP languages Intro 1 Year Language reported dates vary for some languages... design Vs delievered 1957 Fortran High level programming language 1958 Lisp 1959 Cobol 1960 Algol Structured Programming
More informationChapter 1 Fundamentals of Java Programming
Chapter 1 Fundamentals of Java Programming Computers and Computer Programming Writing and Executing a Java Program Elements of a Java Program Features of Java Accessing the Classes and Class Members The
More informationChapter 13 - Inheritance
Goals Chapter 13 - Inheritance To learn about inheritance To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn about protected and package
More informationJava Programming Language
Lecture 1 Part II Java Programming Language Additional Features and Constructs Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Subclasses and
More informationJava Interfaces. Recall: A List Interface. Another Java Interface Example. Interface Notes. Why an interface construct? Interfaces & Java Types
Interfaces & Java Types Lecture 10 CS211 Fall 2005 Java Interfaces So far, we have mostly talked about interfaces informally, in the English sense of the word An interface describes how a client interacts
More informationJAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.
http://www.tutorialspoint.com/java/java_quick_guide.htm JAVA - QUICK GUIDE Copyright tutorialspoint.com What is Java? Java is: Object Oriented Platform independent: Simple Secure Architectural- neutral
More informationFundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
More informationObject-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
More informationCohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT
BSc (Hons) in Computer Applications, BSc (Hons) Computer Science with Network Security, BSc (Hons) Business Information Systems & BSc (Hons) Software Engineering Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT
More informationStructural Design Patterns Used in Data Structures Implementation
Structural Design Patterns Used in Data Structures Implementation Niculescu Virginia Department of Computer Science Babeş-Bolyai University, Cluj-Napoca email address: vniculescu@cs.ubbcluj.ro November,
More informationProblem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class
CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class This homework is to be done individually. You may, of course, ask your fellow classmates for help if you have trouble editing files,
More informationJAVA - INHERITANCE. extends is the keyword used to inherit the properties of a class. Below given is the syntax of extends keyword.
http://www.tutorialspoint.com/java/java_inheritance.htm JAVA - INHERITANCE Copyright tutorialspoint.com Inheritance can be defined as the process where one class acquires the properties methodsandfields
More informationSE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin
SE 360 Advances in Software Development Object Oriented Development in Java Polymorphism Dr. Senem Kumova Metin Modified lecture notes of Dr. Hüseyin Akcan Inheritance Object oriented programming languages
More informationLecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance
Introduction to C++ January 19, 2011 Massachusetts Institute of Technology 6.096 Lecture 7 Notes: Object-Oriented Programming (OOP) and Inheritance We ve already seen how to define composite datatypes
More informationPart 3: GridWorld Classes and Interfaces
GridWorld Case Study Part 3: GridWorld Classes and Interfaces In our example programs, a grid contains actors that are instances of classes that extend the Actor class. There are two classes that implement
More informationInheritance, overloading and overriding
Inheritance, overloading and overriding Recall with inheritance the behavior and data associated with the child classes are always an extension of the behavior and data associated with the parent class
More informationSpecialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools Objective: At the end of the course, Students will be able to: Understand various open source tools(programming tools and databases)
More informationDescription of Class Mutation Mutation Operators for Java
Description of Class Mutation Mutation Operators for Java Yu-Seung Ma Electronics and Telecommunications Research Institute, Korea ysma@etri.re.kr Jeff Offutt Software Engineering George Mason University
More informationThe Interface Concept
Multiple inheritance Interfaces Four often used Java interfaces Iterator Cloneable Serializable Comparable The Interface Concept OOP: The Interface Concept 1 Multiple Inheritance, Example Person name()
More informationAbstract Class & Java Interface
Abstract Class & Java Interface 1 Agenda What is an Abstract method and an Abstract class? What is Interface? Why Interface? Interface as a Type Interface vs. Class Defining an Interface Implementing an
More informationSpecialized Programme on Web Application Development using Open Source Tools
Specialized Programme on Web Application Development using Open Source Tools A. NAME OF INSTITUTE Centre For Development of Advanced Computing B. NAME/TITLE OF THE COURSE C. COURSE DATES WITH DURATION
More informationJava Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
More informationCS 106 Introduction to Computer Science I
CS 106 Introduction to Computer Science I 01 / 21 / 2014 Instructor: Michael Eckmann Today s Topics Introduction Homework assignment Review the syllabus Review the policies on academic dishonesty and improper
More informationJava EE Web Development Course Program
Java EE Web Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive types, variables, basic operators, expressions,
More informationMultichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is
Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is preceded by an equal sign d. its name has undereline 2. Associations
More informationCS193j, Stanford Handout #10 OOP 3
CS193j, Stanford Handout #10 Summer, 2003 Manu Kumar OOP 3 Abstract Superclass Factor Common Code Up Several related classes with overlapping code Factor common code up into a common superclass Examples
More informationHandout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
More informationJava Classes. GEEN163 Introduction to Computer Programming
Java Classes GEEN163 Introduction to Computer Programming Never interrupt someone doing what you said couldn't be done. Amelia Earhart Classes, Objects, & Methods Object-oriented programming uses classes,
More informationIn order to understand Perl objects, you first need to understand references in Perl. See perlref for details.
NAME DESCRIPTION perlobj - Perl object reference This document provides a reference for Perl's object orientation features. If you're looking for an introduction to object-oriented programming in Perl,
More informationGlossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
More informationEXCLUDED HEREDITARY CONDITIONS BY BREED *
EXCLUDED HEREDITARY CONDITIONS BY BREED * CATS Please refer to your policy for a full list of exclusions that apply to all breeds, including mixed breed cats. *We regard these conditions as hereditary
More informationSemantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
More informationJava 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition
Java 6 'th edition Concepts INTERNATIONAL STUDENT VERSION CONTENTS PREFACE vii SPECIAL FEATURES xxviii chapter i INTRODUCTION 1 1.1 What Is Programming? 2 J.2 The Anatomy of a Computer 3 1.3 Translating
More informationJAVA INTERVIEW QUESTIONS
JAVA INTERVIEW QUESTIONS http://www.tutorialspoint.com/java/java_interview_questions.htm Copyright tutorialspoint.com Dear readers, these Java Interview Questions have been designed especially to get you
More informationJava is an Object-Oriented Language. As a language that has the Object Oriented feature, Java supports the following fundamental concepts:
JAVA OBJECTS JAVA OBJECTS AND CLASSES Java is an Object-Oriented Language. As a language that has the Object Oriented feature, Java supports the following fundamental concepts: Polymorphism Inheritance
More informationFree Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third
More informationFree Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2014 Jill Seaman
More informationCS170 Lab 11 Abstract Data Types & Objects
CS170 Lab 11 Abstract Data Types & Objects Introduction: Abstract Data Type (ADT) An abstract data type is commonly known as a class of objects An abstract data type in a program is used to represent (the
More informationC++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
More informationComputing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
More informationAP Computer Science A 2004 Free-Response Questions
AP Computer Science A 2004 Free-Response Questions The materials included in these files are intended for noncommercial use by AP teachers for course and exam preparation; permission for any other use
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationNumber of bits needed to address hosts 8
Advanced Subnetting Example 1: Your ISP has assigned you a Class C network address of 198.47.212.0. You have 3 networks in your company with the largest containing 134 hosts. You need to figure out if
More informationExtending Classes with Services
Chapter 2 Extending Classes with Services Chapter Objectives After studying this chapter, you should be able to: Extend an existing class with new commands Explain how a message sent to an object is resolved
More informationException Handling. Overloaded methods Interfaces Inheritance hierarchies Constructors. OOP: Exception Handling 1
Exception Handling Error handling in general Java's exception handling mechanism The catch-or-specify priciple Checked and unchecked exceptions Exceptions impact/usage Overloaded methods Interfaces Inheritance
More informationAn Introduction To UML Class Diagrams Classes
An Introduction To UML Class Diagrams Classes 1. Represent a user-created or defined data type a. they are an abstract data type (ADT) b. they implement data hiding and encapsulation c. they establish
More informationWhat is Java? Applications and Applets: Result of Sun s efforts to remedy bad software engineering practices
What is Java? Result of Sun s efforts to remedy bad software engineering practices It is commonly thought of as a way to make Web pages cool. It has evolved into much more. It is fast becoming a computing
More informationJava SE 8 Programming
Oracle University Contact Us: 1.800.529.0165 Java SE 8 Programming Duration: 5 Days What you will learn This Java SE 8 Programming training covers the core language features and Application Programming
More informationUsing Inheritance and Polymorphism
186 Chapter 16 Using Inheritance and Polymorphism In this chapter we make use of inheritance and polymorphism to build a useful data structure. 16.1 Abstract Classes Circle1a ( 16.1) is a variation of
More informationJAVA - OBJECT & CLASSES
JAVA - OBJECT & CLASSES http://www.tutorialspoint.com/java/java_object_classes.htm Copyright tutorialspoint.com Java is an Object-Oriented Language. As a language that has the Object Oriented feature,
More informationD06 PROGRAMMING with JAVA
Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch13 Inheritance PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com, for accompanying
More informationAndroid Application Development Course Program
Android Application Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive data types, variables, basic operators,
More informationCourse Number: IAC-SOFT-WDAD Web Design and Application Development
Course Number: IAC-SOFT-WDAD Web Design and Application Development Session 1 (10 Hours) Client Side Scripting Session 2 (10 Hours) Server Side Scripting - I Session 3 (10 hours) Database Session 4 (10
More informationAP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities
AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities The classroom is set up like a traditional classroom on the left side of the room. This is where I will conduct my
More informationJava How to Program, 5/e Test Item File 1 of 5
Java How to Program, 5/e Test Item File 1 of 5 Chapter 8 Section 8.1 8.1 Q1: Object-Oriented Programming encapsulates: a.data and methods. b.information hiding. c.classes. d.adjectives ANS: a. Data and
More informationJava Cheatsheet. http://introcs.cs.princeton.edu/java/11cheatsheet/ Tim Coppieters Laure Philips Elisa Gonzalez Boix
Java Cheatsheet http://introcs.cs.princeton.edu/java/11cheatsheet/ Tim Coppieters Laure Philips Elisa Gonzalez Boix Hello World bestand genaamd HelloWorld.java naam klasse main methode public class HelloWorld
More informationIntroduction: Abstract Data Types and Java Review
Introduction: Abstract Data Types and Java Review Computer Science E-119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Welcome to Computer Science E-119! We will study fundamental data structures.
More informationThe resulting tile cannot merge with another tile again in the same move. When a 2048 tile is created, the player wins.
2048 2048 is number puzzle game created in March 2014 by 19-year-old Italian web developer Gabriele Cirulli, in which the objective is to slide numbered tiles on a grid to combine them and create a tile
More informationFractions to decimals
Worksheet.4 Fractions and Decimals Section Fractions to decimals The most common method of converting fractions to decimals is to use a calculator. A fraction represents a division so is another way of
More informationAdvanced Data Structures
C++ Advanced Data Structures Chapter 8: Advanced C++ Topics Zhijiang Dong Dept. of Computer Science Middle Tennessee State University Chapter 8: Advanced C++ Topics C++ 1 C++ Syntax of 2 Chapter 8: Advanced
More informationJava (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
More informationUnder the Hood: The Java Virtual Machine. Lecture 24 CS 2110 Fall 2011
Under the Hood: The Java Virtual Machine Lecture 24 CS 2110 Fall 2011 Compiling for Different Platforms Program written in some high-level language (C, Fortran, ML,...) Compiled to intermediate form Optimized
More informationHabanero Extreme Scale Software Research Project
Habanero Extreme Scale Software Research Project Comp215: Java Method Dispatch Zoran Budimlić (Rice University) Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead
More informationPRINT AWARENESS ASSESSMENT. Instructions and Teacher Recording Form
PRINT AWARENESS ASSESSMENT Instructions and Teacher Recording Form Instructions: This form includes instructions for each section and allows room for the teacher or assessor to write comments while the
More informationIntroduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
More informationThe Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0
The following applies to all exams: Once exam vouchers are purchased you have up to one year from the date of purchase to use it. Each voucher is valid for one exam and may only be used at an Authorized
More informationChapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
More information1 Description of The Simpletron
Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies
More informationPLV Goldstein 315, Tuesdays and Thursdays, 6:00PM-7:50PM. Tuesdays and Thursdays, 4:00PM-5:30PM and 7:50PM 9:30PM at PLV G320
CRN:22430/21519 Pace University Spring 2006 CS122/504 Computer Programming II Instructor Lectures Office Hours Dr. Lixin Tao, ltao@pace.edu, http://csis.pace.edu/~lixin Pleasantville Office: G320, (914)773-3449
More information1.1.3 Syntax The syntax for creating a derived class is very simple. (You will wish everything else about it were so simple though.
Stewart Weiss Inheritance is a feature that is present in many object-oriented languages such as C++, Eiffel, Java, Ruby, and Smalltalk, but each language implements it in its own way. This chapter explains
More informationCompile-time type versus run-time type. Consider the parameter to this function:
CS107L Handout 07 Autumn 2007 November 16, 2007 Advanced Inheritance and Virtual Methods Employee.h class Employee public: Employee(const string& name, double attitude, double wage); virtual ~Employee();
More informationCIS 190: C/C++ Programming. Polymorphism
CIS 190: C/C++ Programming Polymorphism Outline Review of Inheritance Polymorphism Car Example Virtual Functions Virtual Function Types Virtual Table Pointers Virtual Constructors/Destructors Review of
More informationOutline of this lecture G52CON: Concepts of Concurrency
Outline of this lecture G52CON: Concepts of Concurrency Lecture 10 Synchronisation in Java Natasha Alechina School of Computer Science nza@cs.nott.ac.uk mutual exclusion in Java condition synchronisation
More informationRARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science
I. Basic Course Information RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE CISY 105 Foundations of Computer Science A. Course Number and Title: CISY-105, Foundations of Computer Science B. New
More informationUML Class Diagrams (1.8.7) 9/2/2009
8 UML Class Diagrams Java programs usually involve multiple classes, and there can be many dependencies among these classes. To fully understand a multiple class program, it is necessary to understand
More information3 Pillars of Object-oriented Programming. Industrial Programming Systems Programming & Scripting. Extending the Example.
Industrial Programming Systems Programming & Scripting Lecture 12: C# Revision 3 Pillars of Object-oriented Programming Encapsulation: each class should be selfcontained to localise changes. Realised through
More information5. Advanced Object-Oriented Programming Language-Oriented Programming
5. Advanced Object-Oriented Programming Language-Oriented Programming Prof. Dr. Bernhard Humm Faculty of Computer Science Hochschule Darmstadt University of Applied Sciences 1 Retrospective Functional
More informationCompuScholar, Inc. Alignment to Utah's Computer Programming II Standards
CompuScholar, Inc. Alignment to Utah's Computer Programming II Standards Course Title: TeenCoder: Java Programming Course ISBN: 978 0 9887070 2 3 Course Year: 2015 Note: Citation(s) listed may represent
More informationCS1002: COMPUTER SCIENCE OO MODELLING & DESIGN: WEEK 5
This Week CS1002: COMPUTER SCIENCE OO MODELLING & DESIGN: WEEK 5 School of Computer Science University of St Andrews Graham Kirby Alan Dearle More on Java classes Constructors Modifiers cdn.videogum.com/img/thumbnails/photos/commenter.jpg
More informationThe Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1
The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose
More information1. Polymorphism in C++...2
1. Polymorphism in C++...2 1.1 Polymorphism and virtual functions... 2 1.2 Function call binding... 3 1.3 Virtual functions... 4 1.4 How C++ implements late binding... 6 1.4.1 Why do I have to know at
More informationCS-XXX: Graduate Programming Languages. Lecture 25 Multiple Inheritance and Interfaces. Dan Grossman 2012
CS-XXX: Graduate Programming Languages Lecture 25 Multiple Inheritance and Interfaces Dan Grossman 2012 Multiple Inheritance Why not allow class C extends C1,C2,...{...} (and C C1 and C C2)? What everyone
More informationwww.virtualians.pk CS506 Web Design and Development Solved Online Quiz No. 01 www.virtualians.pk
CS506 Web Design and Development Solved Online Quiz No. 01 Which of the following is a general purpose container? JFrame Dialog JPanel JApplet Which of the following package needs to be import while handling
More informationFormal Engineering for Industrial Software Development
Shaoying Liu Formal Engineering for Industrial Software Development Using the SOFL Method With 90 Figures and 30 Tables Springer Contents Introduction 1 1.1 Software Life Cycle... 2 1.2 The Problem 4 1.3
More informationNumber Representation
Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data
More informationChapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems
Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems This assignment is designed to familiarize you with different numbering systems, specifically: binary, octal, hexadecimal (and decimal)
More informationLewis, Loftus, and Cocking. Java Software Solutions for AP Computer Science 3rd Edition. Boston, Mass. Addison-Wesley, 2011.
Dear Parent/Guardian: Please find a summary of instructional goals and activities for the class indicated below, in which your student is enrolled. Although what is set forth is subject to change, the
More informationIdea 1: Idea 2: Idea 1: Idea 2: Idea 3: Idea 4:
WHAT Idea 1: Use a barrier (bag, box) to hide materials of the activity from view. Talk about the fun things in the bag/box. If necessary, let the person hear/feel that there is stuff in there. Idea 2:
More informationYosemite National Park, California. CSE 114 Computer Science I Inheritance
Yosemite National Park, California CSE 114 Computer Science I Inheritance Containment A class contains another class if it instantiates an object of that class HAS-A also called aggregation PairOfDice
More informationComputer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
More informationjava Features Version April 19, 2013 by Thorsten Kracht
java Features Version April 19, 2013 by Thorsten Kracht Contents 1 Introduction 2 1.1 Hello World................................................ 2 2 Variables, Types 3 3 Input/Output 4 3.1 Standard I/O................................................
More information