Student Guide Revision 1.0

Size: px
Start display at page:

Download "Student Guide Revision 1.0"

Transcription

1 Robert J. Oberg Student Guide Revision 1.0 Object Innovations Course 411

2 C# Essentials Rev. 1.0 Student Guide Information in this document is subject to change without notice. Companies, names and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Object Innovations. Product and company names mentioned herein are the trademarks or registered trademarks of their respective owners. Copyright 2002 Object Innovations, Inc. All rights reserved. Object Innovations, Inc Emory Lane Charlotte, NC Printed in the United States of America. Rev. 1.0 Copyright 2002 Object Innovations, Inc. ii

3 Table of Contents (Overview) Chapter 1.NET: What You Need To Know Chapter 2 C# Overview for the Sophisticated Programmer Chapter 3 Object-Oriented Programming in C# Chapter 4 C# and the.net Framework Chapter 5 Introduction to Windows Forms Appendix A Appendix B Using Visual Studio.NET Learning Resources Rev. 1.0 Copyright 2002 Object Innovations, Inc. iii

4 Rev. 1.0 Copyright 2002 Object Innovations, Inc. iv

5 Table of Contents (Detailed) Chapter 1.NET: What You Need to Know... 1 Getting Started... 3.NET: What Is Really Happening... 4.NET Programming in a Nutshell... 5.NET Program Example... 6 Viewing the Assembly... 7 Viewing Intermediate Language... 8 Understanding.NET... 9.NET Documentation Visual C#.NET and GUI Programs Summary Chapter 2 C# Overview for the Sophisticated Programmer Hello, World Compiling, Running (Command Line) Program Structure Namespaces Variables...21 Input in C# More About Classes InputWrapper Class Sample Program Input Wrapper Implementation Compiling Multiple Files Control Structures switch C# Operators Precedence Table Types in C# Simple Types Types in System Namespace Integer Data Types Floating Point Data Types Implicit Conversions Explicit Conversions Boolean Data Type struct Uninitialized Variables Enumeration Types Reference Types Class Types object Rev. 1.0 Copyright 2002 Object Innovations, Inc. v

6 string Classes and Structs CHotel Class Hotel Struct Test Program RaisePrice Methods Comparing Struct and Class Arrays One Dimensional Arrays System.Array Jagged Arrays Rectangular Arrays foreach for Arrays Boxing and Unboxing Output in C# Formatting Formatting Example Exceptions Exception Example Checked Integer Arithmetic Throwing New Exceptions finally System.Exception Lab Summary Chapter 3 Object-Oriented Programming in C# C# Object-Oriented Features Encapsulation and Accessors Using a Property Indexers Bank Example Account Class Namespace Constructors Static Members Static in Main Inheritance in C# New Version of Base Class Features of the New Base Class Derived Class Overriding a Virtual Function Fragile Base Class Problem Access Control and Assemblies Assembly Example Internal Accessibility Building Modules and Assemblies Rev. 1.0 Copyright 2002 Object Innovations, Inc. vi

7 Lab Summary Chapter 4 C# and the.net Framework Components and OO in C# Copy Semantics in C# Arrays Embedded Objects Copying a Class Instance class vs. struct Copying a Struct Instance Shallow Copy Shallow Copy Output Deep Copy and ICloneable Interfaces Generic Interfaces Implementing ICloneable Using an Interface is Operator as Operator NET and COM Arrays and Collections Lab 4A Sorting an Array Anatomy of Array.Sort Using the is Operator The Use of Dynamic Type Checking Implementing IComparable An Incomplete Solution Overriding ToString Understanding Frameworks Delegates Stock Market Simulation Running the Simulation Delegate Code Random Number Generation Using the Delegates Events Events in C# and.net Client Side Event Code Chat Room Example Lab 4B Summary Chapter 5 Introduction to Windows Forms Creating a Windows Forms App Windows Forms Event Handling Add Events for a Control Rev. 1.0 Copyright 2002 Object Innovations, Inc. vii

8 Events Documentation Lab Summary Appendix A Using Visual Studio.NET Visual Studio.NET Overview of VS.NET Toolbars Customizing a Toolbar Creating a Console Application Adding a C# File Using the Visual Studio Text Editor Build and Run the Bytes Project Project Configurations Creating a New Configuration Setting Build Settings for a Configuration Debugging Just-in-Time Debugging Standard Debugging -- Breakpoints Standard Debugging -- Watch Variables Debugger Options Stepping with the Debugger Demo: Stepping with the Debugger The Call Stack Summary Appendix B Learning Resources Rev. 1.0 Copyright 2002 Object Innovations, Inc. viii

9 Chapter 3 Object-Oriented Programming in C# Rev. 1.0 Copyright 2002 Object Innovations, Inc. 73

10 Object-Oriented Programming in C# Objectives After completing this unit you will be able to: Give an overview of the object-oriented features of C#. Implement accessors and indexers to provide access to encapsulated data. Describe the use of constructors in C#. Use static data and methods. Use inheritance and virtual functions. Discuss the fragile base class problem and explain the uses of new and override in C#. Describe the access control facilities of C#. Work with assemblies in your C# programs. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 74

11 C# Object-Oriented Features C# is a fully object-oriented language having many similarities to C++ and Java but also some important differences. C# fully supports encapsulation. In addition to methods for accessing encapsulated data, C# also provides accessors and indexers. Besides private and protected access control, C# also has internal access control, restricting access to an assembly. C# has a single inheritance model. In this regard C# is more akin to Smalltalk and Java than to C++. All classes (and effectively all data types) in C# inherit from a root class object. C# has the notion of interfaces. A class in C# may inherit from only one other class, but it may support many interfaces. We discuss interfaces in the next chapter. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 75

12 Encapsulation and Accessors It is good programming practice to encapsulate data within the class and provide public methods to access the data. But it would be nice to be able to access the data as if it were public. You can do just that with the C# accessor feature. public class Course private string title; private int numstudents = 0; private string[] students; private int maxsize; public string Title get return title; set title = value; // value is keyword... Title is now a property, and has easy to use syntax in a client program. You can implement a read-only property by providing only the get accessor (and write-only via set byitself). Rev. 1.0 Copyright 2002 Object Innovations, Inc. 76

13 Using a Property You can obtain the value of a property using the standard dot notation. Course c1 = new Course("Intro to C#", 10); Console.WriteLine(c1.Title); // use the field You can also use the property on the right-hand side: C1.Title = ".NET Programming"; // set the field If you are familiar with Visual Basic, you will be very familiar with properties..net brings the convenience and ease-of-use of properties to all.net languages. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 77

14 Indexers C# provides another easy to use feature that adds the capability to access an object as if it were an array. Through implementing an indexer on a class, you can use array notation on both left and right hand sides. public class Course private string title; private string[] students;... public string this[int i] get return students[i]; set students[i] = value; Course c1 = new Course("Intro to C#", 10); Console.WriteLine(c1[0]); // use indexer c1[0] = "John New Name"; // on LHS As with accessors, you can have read-only and writeonly indexers. Our example illustrates both accessors and indexers. See Course. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 78

15 Bank Example We will illustrate many object-oriented features of C# with a simple bank example. See Bank\Step1 for the first step. The project consists of the following classes, each in its own file: SimpleMath provides operations Add and Subtract. Account maintains a private balance exposed through the public read-only property Balance. Methods Deposit and Withdraw are provided. There is a read/write property Owner and a static read/write property BankName. InputWrapper class makes input operations more concise. TestBank is an interactive console test program. Here is the output of a sample run of the program (run from inside Visual Studio): Welcome to Fiduciary Bank balance = 100 Enter command, quit to exit : deposit amount: 25 balance = 125 : quit Press any key to continue Rev. 1.0 Copyright 2002 Object Innovations, Inc. 79

16 Account Class Here is the code for the Account class: // Account.cs namespace OI.NetCs.Examples using OI.NetCs.Examples; public class Account private int balance; private string owner; static private string bankname = "Fiduciary Bank"; public Account(int balance) this.balance = balance; public Account(int balance, string owner) this.balance = balance; this.owner = owner; public void Deposit(int amount) balance = SimpleMath.Add( balance, amount); public void Withdraw(int amount) balance = SimpleMath.Subtract( balance, amount); Rev. 1.0 Copyright 2002 Object Innovations, Inc. 80

17 Account Class (Cont d) public int Balance get return balance; public string Owner get return owner; set owner = value; static public string BankName get return bankname; set bankname = value; Rev. 1.0 Copyright 2002 Object Innovations, Inc. 81

18 Namespace The namespace directive places the following elements inside the OI.NetCs.Examples namespace. namespace OI.NetCs.Examples... The using directive gives us concise access to the names in the namespace OI.NetCs.Examples. using OI.NetCs.Examples; SimpleMath is in this namespace, so we can use this code: balance = SimpleMath.Add(balance, amount);... in place of the following code using a fully qualified name: balance = OI.NetCs.Examples.SimpleMath.Add( balance, amount); Note our use of a hierarchy in our namespace: OI is a company/brand (Object Innovations) NetCs is an acronym for.net using C# Examples for the example programs Rev. 1.0 Copyright 2002 Object Innovations, Inc. 82

19 Constructors An important issue for classes is initialization. When an object is created, what initial values are assigned to the instance data? Through a constructor you can initialize an object in any way you wish. A constructor is like a special method which is automatically called when an object is created. A constructor has no return type A constructor has the same name as the class A constructor may take parameters, which are passed when invoking new. There may be several overloaded constructors. public Account(int balance) this.balance = balance; public Account(int balance, string owner) this.balance = balance; this.owner = owner; Note use of keyword this to refer to current object. C# does not have default arguments, so we need two constructors in this example. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 83

20 Static Members In C# a static member applies to the entire class, not to a particular instance of a class. public class Account private int balance; private string owner; static private string bankname = "Fiduciary Bank";... All instances of the class share the same static field (for all accounts the bank name is the same). A static method or property can access static data members but cannot access non-static data members. static public string BankName get return bankname; set bankname = value; A client program does not have to instantiate an instance in order to access a static member. The class name is used rather than an object instance. Console.WriteLine("Welcome to 0", Account.BankName); Rev. 1.0 Copyright 2002 Object Innovations, Inc. 84

21 Static in Main The Main method of a class is static. The runtime must be able to invoke Main without instantiating an object instance. This implies that any helper methods you call from within Main should also be static. public static void Main()... private static void show(account acc) Console.WriteLine("owner = 0, balance = 1", acc.owner, acc.balance); private static void help() Console.WriteLine( "The following commands are available:"); Console.WriteLine( "\tdeposit -- make a deposit"); Console.WriteLine( "\twithdraw -- make a withdrawal"); Console.WriteLine( "\towner -- change owner name"); Console.WriteLine( "\tshow -- show account information"); Console.WriteLine( "\tquit -- exit the program"); Rev. 1.0 Copyright 2002 Object Innovations, Inc. 85

22 Inheritance in C# The next step of our bank example illustrates inheritance. See Bank\Step2 Here is the scenario. We wish to implement a special kind of an account, a checking account. A checking account has a fee based on the number of transactions The fee is waived if the minimum balance is at least a certain threshold value. Here is the design: Define a class CheckingAccount derived from the base class Account. Add to the base class some generic code that might apply to other kinds of accounts besides checking (a counter of number of transactions and a read-only property that will return this count). Add to the derived class specific code that applies only to checking accounts (track the minimum balance and compute fee) Rev. 1.0 Copyright 2002 Object Innovations, Inc. 86

23 New Version of Base Class public class Account... protected int numxact = 0; // number of // transactions virtual public void Deposit(int amount) numxact++; balance = SimpleMath.Add(balance, amount); virtual public void Withdraw(int amount) numxact++; balance = SimpleMath.Subtract( balance, amount); public int Transactions get return numxact; Rev. 1.0 Copyright 2002 Object Innovations, Inc. 87

24 Features of the New Base Class The class counts the number of transactions with a private field exposed by a read-only public method. This counter is declared protected so that the derived class can access it. The Deposit and Withdraw methods are declared virtual so that the derived class will be able to override them. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 88

25 Derived Class public class CheckingAccount : Account private int minbalance; public CheckingAccount(int bal) : base(bal) minbalance = balance; public CheckingAccount(int bal, string owner) : base(bal, owner) minbalance = bal; public int Fee get if (minbalance < 100) return numxact; else return 0;... The constructors pass parameters to the base class using the keyword base. The Fee property has access to the numxact field in the base class, because numxact was declared protected. The Fee property is an illustration of a property which is calculated at runtime and not simply stored in a private field. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 89

26 Overriding a Virtual Function The Withdraw method in the base class is overridden to update a minimum balance field, for the purpose of being able to calculate the fee. override public void Withdraw(int amount) base.withdraw(amount); if (balance < minbalance) minbalance = balance; The base keyword is used to call the base class, as was done in the constructors. Note use of the keyword override to tell the compiler that you are explicitly overriding an inherited virtual function. Without the override the compiler will issue a warning message, saying that you are hiding the original method with a new one. If you do want to hide the original method (and defeat any polymorphic behavior), you can use the new keyword. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 90

27 Fragile Base Class Problem Inheritance is a powerful feature in object-oriented programming, but there is a subtle pitfall known as the fragile base class problem. Suppose you are responsible for a class D that is derived from a base class B and you have a method f in your class (which does not override any such method in the base class). Then a new version of class B is released which provides a new virtual function that happens to match the name and signature of your f but does something completely different. Then polymorphic code which uses a reference to an object of B and calls f will wind up calling your version of f rather than the f in the base class. This kind of difficulty can arise in a large framework. Here is a scenario. The base class is a Windows class with many methods. The derived class implements a custom control, which responds to its own methods directly and to methods from the Windows class through inheritance. Application code may be called by the framework, and code that uses your custom control may suddenly not work properly with the installation of a new version of the framework that has a new method matching one of yours. This problem was an argument for COM not supporting implementation inheritance. The issue is addressed in C# and.net with the override keyword. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 91

28 Access Control and Assemblies Object-oriented languages such as C++, Java and C# have access control features, which can control access to a class, method or other entity through keywords such as public, private and protected. C# adds assembly-level access as an option. C# has a very rich set of access control modifiers: public protected internal internal protected private access not restricted access restricted to the containing type or derived types access restricted to files in the same assembly access restricted to the containing type or derived types or files in the same assembly access restricted to the containing type Rev. 1.0 Copyright 2002 Object Innovations, Inc. 92

29 Assembly Example We redo our bank example into three assemblies: Account.dll is an assembly consisting of two modules Bank.dll is an assembly built from two source files TestBank.exe is a test program Account.DLL Bank.DLL Account CheckingAccount SimpleMath Statement TestBank.EXE The code is illustrated in three steps: Bank\Step3A is a monolithic program Bank\Step3B has three assemblies as shown Rev. 1.0 Copyright 2002 Object Innovations, Inc. 93

30 Internal Accessibility Step3A illustrates internal accessibility. internal is the default accessibility for a class, and means accessible within the assembly. All Step3A is within one project and so within the same assembly, so internal classes and members are accessible. // Statement.cs using OI.NetDev.Examples; internal class Statement internal static string GetStatement( CheckingAccount acc) string s = "Statement for " + acc.owner + "\n" + acc.numxact + " transactions, balance = " + acc.balance + ", fee = " + acc.fee; return s; The field numxact has the accessibility changed to internal, so the Statement class can access the field in Account without going through the public Transactions property. public class Account... internal int numxact = 0; // number of // transactions Rev. 1.0 Copyright 2002 Object Innovations, Inc. 94

31 Building Modules and Assemblies Step3B illustrates building multiple assemblies. To have a finer degree of control of the build process, we use command-line build tools. First we build Account.dll: csc /t:module /out:simplemath.mod SimpleMath.cs csc /t:library /addmodule:simplemath.mod Account.cs Next we build Bank.dll: csc /t:library /r:account.dll /out:bank.dll CheckingAccount.cs Statement.cs Finally we build TestBank.exe: csc /t:exe /r:bank.dll /r:account.dll /out:testbank.exe TestBank.cs InputWrapper.cs Batch file build.bat automates the build. We return to public accessibility in Statement.cs. public class Statement public static string GetStatement( CheckingAccount acc) string s = "Statement for " + acc.owner + "\n" + acc.transactions + " transactions, balance = " + acc.balance + ", fee = " + acc.fee; return s; Rev. 1.0 Copyright 2002 Object Innovations, Inc. 95

32 Lab 3 A Bank Account Hierarchy In this lab you will practice working with inheritance in C# by adding a savings account class to a simple bank account hierarchy. You will also observe the use of virtual and override in C#. Account CheckingAccount SavingsAccount NOTE: This version of the bank example is a little different than the one used in the lecture. Detailed instructions are contained in the Lab 3 write-up at the end of the chapter. Suggested time: 30 minutes Rev. 1.0 Copyright 2002 Object Innovations, Inc. 96

33 Summary C# is a fully object-oriented language with a single inheritance model. You can implement accessors and indexers to provide access to encapsulated data. Constructors are used in C# for initialization. Static data and methods apply on a per class basis. C# provides inheritance and virtual functions. C# provides the new and override keywords, which can mitigate the fragile base class problem. C# has elaborate access control facilities, including controlling access on an assembly basis. You can inherit a class in C# from a class implemented in another.net language. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 97

34 Lab 3 A Bank Account Hierarchy Introduction In this lab you will practice working with inheritance in C# by adding a savings account class to a simple bank account hierarchy. You will also observe the use of virtual and override in C#. Account CheckingAccount SavingsAccount NOTE: This version of the bank example is a little different than the one used in the lecture. Our example will consists of four classes, each in its own file. Account. This class encapsulates a single bank account consisting of an Id, an Owner, and a Balance. Operations are Deposit and Withdraw. There is also a field holding the number of transactions, and a GetStatement method is provided to show the current data for an account. The Account class counts the number of transactions. CheckingAccount. This derived class adds a monthly fee, which is assessed to checking accounts but not to other accounts. SavingsAccount. This derived class adds interest, which is paid to savings accounts but not to other accounts. TestAccount. This class provides a hardcoded test program, which instantiates some classes, performs some transactions, and obtains statements. Suggested Time: 30 minutes Rev. 1.0 Copyright 2002 Object Innovations, Inc. 98

35 Root Directory: OIC\CsEss Directories: Labs\Lab3\BankLab Chap03\BankLab\Step1 Chap03\BankLab\Step2 Chap03\BankLab\Step3 (Do your work here) (Backup of starter files) (Answer to first part) (Answer to second part) Files: Account.cs SavingsAccount.cs CheckingAccount.cs TestAccount.cs.cs Instructions 1. Build the starter program and study the code. There is only a CheckingAccount class at this point. 2. Add a SavingsAccount class, derived from Account, to implement the interest feature. Interest is 6% per year, paid on the minimum balance. You will need to hide the Withdraw method to update the minimum balance. You will also need to hide the GetStatement method to show the interest amount as well as the standard information for a statement. 3. Modify the test program to create a SavingsAccount object and perform a few transactions, and show the account before and after. Notice that at this point you have three overloaded ShowAccount helper methods, one for each kind of account. You are now at Step Modify the program to use virtual methods, and collapse the ShowAccount methods to a single method that applies polymorphically to all the different kinds of accounts. Rev. 1.0 Copyright 2002 Object Innovations, Inc. 99

36 Rev. 1.0 Copyright 2002 Object Innovations, Inc. 100

Object-Oriented Programming in C# (VS 2015)

Object-Oriented Programming in C# (VS 2015) Object-Oriented Programming in C# (VS 2015) This thorough and comprehensive 5-day course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes

More information

Object-Oriented Programming in C# (VS 2012)

Object-Oriented Programming in C# (VS 2012) Object-Oriented Programming in C# (VS 2012) This thorough and comprehensive course is a practical introduction to programming in C#, utilizing the services provided by.net. This course emphasizes the C#

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Prerequisites: The student should have programming experience in a high-level language. ITCourseware, LLC Page 1. Object-Oriented Programming in C#

Prerequisites: The student should have programming experience in a high-level language. ITCourseware, LLC Page 1. Object-Oriented Programming in C# Microsoft s.net is a revolutionary advance in programming technology that greatly simplifies application development and is a good match for the emerging paradigm of Web-based services, as opposed to proprietary

More information

Course Syllabus C # Course Title. Who should attend? Course Description

Course Syllabus C # Course Title. Who should attend? Course Description Course Title C # Course Description C # is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the.net Framework.

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211 02 Features of C#, Part 1 Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211 Module Overview Constructing Complex Types Object Interfaces and Inheritance Generics Constructing

More information

C++/CLI Essentials. Student Guide Revision 1.0. Object Innovations Course 431

C++/CLI Essentials. Student Guide Revision 1.0. Object Innovations Course 431 C++/CLI Essentials Student Guide Revision 1.0 Object Innovations Course 431 C++/CLI Essentials Rev. 1.0 Student Guide Information in this document is subject to change without notice. Companies, names

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

Evaluation Copy. Visual Basic Essentials. Student Guide Revision 4.5. Object Innovations Course 4202

Evaluation Copy. Visual Basic Essentials. Student Guide Revision 4.5. Object Innovations Course 4202 Visual Basic Essentials Student Guide Revision 4.5 Object Innovations Course 4202 Visual Basic Essentials Rev. 4.5 Student Guide Information in this document is subject to change without notice. Companies,

More information

DC69 C# &.NET DEC 2015

DC69 C# &.NET DEC 2015 Q.2 a. Briefly explain the advantage of framework base classes in.net. (5).NET supplies a library of base classes that we can use to implement applications quickly. We can use them by simply instantiating

More information

Introduce C# as Object Oriented programming language. Explain, tokens,

Introduce C# as Object Oriented programming language. Explain, tokens, Module 2 98 Assignment 1 Introduce C# as Object Oriented programming language. Explain, tokens, lexicals and control flow constructs. 99 The C# Family Tree C Platform Independence C++ Object Orientation

More information

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Introduction History, Characteristics of Java language Java Language Basics Data types, Variables, Operators and Expressions Anatomy of a Java Program

More information

C# Programming in the.net Framework

C# Programming in the.net Framework 50150B - Version: 2.1 04 May 2018 C# Programming in the.net Framework C# Programming in the.net Framework 50150B - Version: 2.1 6 days Course Description: This six-day instructor-led course provides students

More information

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(800) Toll Free (804) Fax   Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented

More information

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo Learning C# 3.0 Jesse Liberty and Brian MacDonald O'REILLY Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo Table of Contents Preface xv 1. C# and.net Programming 1 Installing C# Express 2 C# 3.0

More information

"Charting the Course... MOC Programming in C# with Microsoft Visual Studio Course Summary

Charting the Course... MOC Programming in C# with Microsoft Visual Studio Course Summary Course Summary NOTE - The course delivery has been updated to Visual Studio 2013 and.net Framework 4.5! Description The course focuses on C# program structure, language syntax, and implementation details

More information

Objective of the Course: (Why the course?) Brief Course outline: (Main headings only) C# Question Bank Chapter1: Philosophy of.net

Objective of the Course: (Why the course?) Brief Course outline: (Main headings only) C# Question Bank Chapter1: Philosophy of.net Objective of the Course: (Why the course?) To provide a brief introduction to the.net platform and C# programming language constructs. Enlighten the students about object oriented programming, Exception

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#) Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#) Course Number: 6367A Course Length: 3 Days Course Overview This three-day course will enable students to start designing

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

Encapsulation. Mason Vail Boise State University Computer Science

Encapsulation. Mason Vail Boise State University Computer Science Encapsulation Mason Vail Boise State University Computer Science Pillars of Object-Oriented Programming Encapsulation Inheritance Polymorphism Abstraction (sometimes) Object Identity Data (variables) make

More information

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led CENTER OF KNOWLEDGE, PATH TO SUCCESS Website: PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO 2010 Course: 10550A; Duration: 5 Days; Instructor-led WHAT YOU WILL LEARN This course teaches you

More information

C# Programming: From Problem Analysis to Program Design. Fourth Edition

C# Programming: From Problem Analysis to Program Design. Fourth Edition C# Programming: From Problem Analysis to Program Design Fourth Edition Preface xxi INTRODUCTION TO COMPUTING AND PROGRAMMING 1 History of Computers 2 System and Application Software 4 System Software 4

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Developing Microsoft.NET Applications for Windows (Visual Basic.NET) Developing Microsoft.NET Applications for Windows (Visual Basic.NET) Course Number: 2555 Length: 1 Day(s) Certification Exam This course will help you prepare for the following Microsoft Certified Professional

More information

Programming in Visual Basic with Microsoft Visual Studio 2010

Programming in Visual Basic with Microsoft Visual Studio 2010 Programming in Visual Basic with Microsoft Visual Studio 2010 Course 10550; 5 Days, Instructor-led Course Description This course teaches you Visual Basic language syntax, program structure, and implementation

More information

Chapter 5 Object-Oriented Programming

Chapter 5 Object-Oriented Programming Chapter 5 Object-Oriented Programming Develop code that implements tight encapsulation, loose coupling, and high cohesion Develop code that demonstrates the use of polymorphism Develop code that declares

More information

Evaluation Copy. C# Essentials. Student Guide Revision 4.5. Object Innovations Course 4102

Evaluation Copy. C# Essentials. Student Guide Revision 4.5. Object Innovations Course 4102 C# Essentials Student Guide Revision 4.5 Object Innovations Course 4102 C# Essentials Rev. 4.5 Student Guide Information in this document is subject to change without notice. Companies, names and data

More information

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018 Java + OOP CSC207 Winter 2018 1 Why OOP? Modularity: code can be written and maintained separately, and easily passed around the system Information-hiding: internal representation hidden from the outside

More information

102. Introduction to Java Programming

102. Introduction to Java Programming 102. Introduction to Java Programming Version 5.0 Java is a popular and powerful language. Although comparatively simple in its language structure, there are a number of subtleties that can trip up less

More information

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class. 1. What is C#? C# (pronounced "C sharp") is a simple, modern, object oriented, and type safe programming language. It will immediately be familiar to C and C++ programmers. C# combines the high productivity

More information

Programming in C# with Microsoft Visual Studio 2010

Programming in C# with Microsoft Visual Studio 2010 Programming in C# with Microsoft Visual Studio 2010 Course 10266; 5 Days, Instructor-led Course Description: The course focuses on C# program structure, language syntax, and implementation details with.net

More information

TeenCoder : Java Programming (ISBN )

TeenCoder : Java Programming (ISBN ) TeenCoder : Java Programming (ISBN 978-0-9887070-2-3) and the AP * Computer Science A Exam Requirements (Alignment to Tennessee AP CS A course code 3635) Updated March, 2015 Contains the new 2014-2015+

More information

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio Introduction XXV Part I: C# Fundamentals 1 Chapter 1: The.NET Framework 3 What s the.net Framework? 3 Common Language Runtime 3.NET Framework Class Library 4 Assemblies and the Microsoft Intermediate Language

More information

Saikat Banerjee Page 1

Saikat Banerjee Page 1 1. What s the advantage of using System.Text.StringBuilder over System.String? StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each

More information

C# Programming for Developers Course Labs Contents

C# Programming for Developers Course Labs Contents C# Programming for Developers Course Labs Contents C# Programming for Developers...1 Course Labs Contents...1 Introduction to C#...3 Aims...3 Your First C# Program...3 C# The Basics...5 The Aims...5 Declaring

More information

Table of Contents Preface Bare Necessities... 17

Table of Contents Preface Bare Necessities... 17 Table of Contents Preface... 13 What this book is about?... 13 Who is this book for?... 14 What to read next?... 14 Personages... 14 Style conventions... 15 More information... 15 Bare Necessities... 17

More information

Introduction to Inheritance

Introduction to Inheritance Introduction to Inheritance James Brucker These slides cover only the basics of inheritance. What is Inheritance? One class incorporates all the attributes and behavior from another class -- it inherits

More information

Course Hours

Course Hours Programming the.net Framework 4.0/4.5 with C# 5.0 Course 70240 40 Hours Microsoft's.NET Framework presents developers with unprecedented opportunities. From 'geoscalable' web applications to desktop and

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object

More information

Introduction to Microsoft.NET Framework Programming using VS 2005 (C#)

Introduction to Microsoft.NET Framework Programming using VS 2005 (C#) Introduction to Microsoft.NET Framework Programming using VS 2005 (C#) Course Length: 5 Days Course Overview This instructor-led course teaches introductory-level developers who are not familiar with the

More information

CS 251 Intermediate Programming Methods and Classes

CS 251 Intermediate Programming Methods and Classes CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with

More information

CS 251 Intermediate Programming Methods and More

CS 251 Intermediate Programming Methods and More CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with

More information

The C# Programming Language. Overview

The C# Programming Language. Overview The C# Programming Language Overview Microsoft's.NET Framework presents developers with unprecedented opportunities. From web applications to desktop and mobile platform applications - all can be built

More information

C++ Important Questions with Answers

C++ Important Questions with Answers 1. Name the operators that cannot be overloaded. sizeof,.,.*,.->, ::,? 2. What is inheritance? Inheritance is property such that a parent (or super) class passes the characteristics of itself to children

More information

COP 3330 Final Exam Review

COP 3330 Final Exam Review COP 3330 Final Exam Review I. The Basics (Chapters 2, 5, 6) a. comments b. identifiers, reserved words c. white space d. compilers vs. interpreters e. syntax, semantics f. errors i. syntax ii. run-time

More information

Standard. Number of Correlations

Standard. Number of Correlations Computer Science 2016 This assessment contains 80 items, but only 80 are used at one time. Programming and Software Development Number of Correlations Standard Type Standard 2 Duty 1) CONTENT STANDARD

More information

Framework Fundamentals

Framework Fundamentals Questions Framework Fundamentals 1. Which of the following are value types? (Choose all that apply.) A. Decimal B. String C. System.Drawing.Point D. Integer 2. Which is the correct declaration for a nullable

More information

10266 Programming in C Sharp with Microsoft Visual Studio 2010

10266 Programming in C Sharp with Microsoft Visual Studio 2010 10266 Programming in C Sharp with Microsoft Visual Studio 2010 Course Number: 10266A Category: Visual Studio 2010 Duration: 5 days Course Description The course focuses on C# program structure, language

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

C # Language Specification

C # Language Specification C # Language Specification Copyright Microsoft Corporation 1999-2001. All Rights Reserved. Please send corrections, comments, and other feedback to sharp@microsoft.com Notice 1999-2001 Microsoft Corporation.

More information

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations

C#.Net. Course Contents. Course contents VT BizTalk. No exam, but laborations , 1 C#.Net VT 2009 Course Contents C# 6 hp approx. BizTalk 1,5 hp approx. No exam, but laborations Course contents Architecture Visual Studio Syntax Classes Forms Class Libraries Inheritance Other C# essentials

More information

Programming II (CS300)

Programming II (CS300) 1 Programming II (CS300) Chapter 05: Inheritance and Interfaces MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Inheritance and Interfaces 2 Introduction Inheritance and Class Hierarchy Polymorphism Abstract Classes

More information

C++ (Non for C Programmer) (BT307) 40 Hours

C++ (Non for C Programmer) (BT307) 40 Hours C++ (Non for C Programmer) (BT307) 40 Hours Overview C++ is undoubtedly one of the most widely used programming language for implementing object-oriented systems. The C++ language is based on the popular

More information

Object-oriented basics. Object Class vs object Inheritance Overloading Interface

Object-oriented basics. Object Class vs object Inheritance Overloading Interface Object-oriented basics Object Class vs object Inheritance Overloading Interface 1 The object concept Object Encapsulation abstraction Entity with state and behaviour state -> variables behaviour -> methods

More information

Murach s Beginning Java with Eclipse

Murach s Beginning Java with Eclipse Murach s Beginning Java with Eclipse Introduction xv Section 1 Get started right Chapter 1 An introduction to Java programming 3 Chapter 2 How to start writing Java code 33 Chapter 3 How to use classes

More information

Handout 9 OO Inheritance.

Handout 9 OO Inheritance. Handout 9 CS603 Object-Oriented Programming Fall 2016 Page 1 of 11 Handout 9 OO Inheritance. All classes in Java form a hierarchy. The top of the hierarchy is class Object Example: classicalarchives.com

More information

Computer Science II (20073) Week 1: Review and Inheritance

Computer Science II (20073) Week 1: Review and Inheritance Computer Science II 4003-232-01 (20073) Week 1: Review and Inheritance Richard Zanibbi Rochester Institute of Technology Review of CS-I Hardware and Software Hardware Physical devices in a computer system

More information

Using the Xcode Debugger

Using the Xcode Debugger g Using the Xcode Debugger J Objectives In this appendix you ll: Set breakpoints and run a program in the debugger. Use the Continue program execution command to continue execution. Use the Auto window

More information

Introduction To C#.NET

Introduction To C#.NET Introduction To C#.NET Microsoft.Net was formerly known as Next Generation Windows Services(NGWS).It is a completely new platform for developing the next generation of windows/web applications. However

More information

CS112 Lecture: Defining Classes. 1. To describe the process of defining an instantiable class

CS112 Lecture: Defining Classes. 1. To describe the process of defining an instantiable class CS112 Lecture: Defining Classes Last revised 2/3/06 Objectives: 1. To describe the process of defining an instantiable class Materials: 1. BlueJ SavingsAccount example project 2. Handout of code for SavingsAccount

More information

CompuScholar, Inc. 9th - 12th grades

CompuScholar, Inc. 9th - 12th grades CompuScholar, Inc. Alignment to the College Board AP Computer Science A Standards 9th - 12th grades AP Course Details: Course Title: Grade Level: Standards Link: AP Computer Science A 9th - 12th grades

More information

CS313T ADVANCED PROGRAMMING LANGUAGE

CS313T ADVANCED PROGRAMMING LANGUAGE CS313T ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 1 : Introduction Lecture Contents 2 Course Info. Course objectives Course plan Books and references Assessment methods and grading

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 10 Creating Classes and Objects Objectives After studying this chapter, you should be able to: Define a class Instantiate an object from a class

More information

DEPARTMENT OF INFORMATION TECHNOLOGY Academic Year 2015-2016 QUESTION BANK-EVEN SEMESTER NAME OF THE SUBJECT SUBJECT CODE SEMESTER YEAR DEPARTMENT C# and.net Programming CS6001 VI III IT UNIT 1 PART A

More information

B.E /B.TECH DEGREE EXAMINATIONS,

B.E /B.TECH DEGREE EXAMINATIONS, B.E /B.TECH DEGREE EXAMINATIONS, November / December 2012 Seventh Semester Computer Science and Engineering CS2041 C# AND.NET FRAMEWORK (Common to Information Technology) (Regulation 2008) Time : Three

More information

Very similar to Java C++ C-Based syntax (if, while, ) object base class no pointers, object parameters are references All code in classes

Very similar to Java C++ C-Based syntax (if, while, ) object base class no pointers, object parameters are references All code in classes C# Very similar to Java C++ C-Based syntax (if, while, ) object base class no pointers, object parameters are references All code in classes Before we begin You already know and have programmed with Java

More information

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept F1 A Java program Ch 1 in PPIJ Introduction to the course The computer and its workings The algorithm concept The structure of a Java program Classes and methods Variables Program statements Comments Naming

More information

What are the characteristics of Object Oriented programming language?

What are the characteristics of Object Oriented programming language? What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is

More information

CH. 2 OBJECT-ORIENTED PROGRAMMING

CH. 2 OBJECT-ORIENTED PROGRAMMING CH. 2 OBJECT-ORIENTED PROGRAMMING ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN JAVA, GOODRICH, TAMASSIA AND GOLDWASSER (WILEY 2016) OBJECT-ORIENTED

More information

CHAPTER 1: INTRODUCING C# 3

CHAPTER 1: INTRODUCING C# 3 INTRODUCTION xix PART I: THE OOP LANGUAGE CHAPTER 1: INTRODUCING C# 3 What Is the.net Framework? 4 What s in the.net Framework? 4 Writing Applications Using the.net Framework 5 What Is C#? 8 Applications

More information

Object oriented programming. Encapsulation. Polymorphism. Inheritance OOP

Object oriented programming. Encapsulation. Polymorphism. Inheritance OOP OOP Object oriented programming Polymorphism Encapsulation Inheritance OOP Class concepts Classes can contain: Constants Delegates Events Fields Constructors Destructors Properties Methods Nested classes

More information

Basic Principles of OO. Example: Ice/Water Dispenser. Systems Thinking. Interfaces: Describing Behavior. People's Roles wrt Systems

Basic Principles of OO. Example: Ice/Water Dispenser. Systems Thinking. Interfaces: Describing Behavior. People's Roles wrt Systems Basics of OO Programming with Java/C# Basic Principles of OO Abstraction Encapsulation Modularity Breaking up something into smaller, more manageable pieces Hierarchy Refining through levels of abstraction

More information

Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#)

Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#) Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#) Course Number: 4994A Length: 3 Day(s) Certification Exam There are no exams associated with this

More information

CSC Java Programming, Fall Java Data Types and Control Constructs

CSC Java Programming, Fall Java Data Types and Control Constructs CSC 243 - Java Programming, Fall 2016 Java Data Types and Control Constructs Java Types In general, a type is collection of possible values Main categories of Java types: Primitive/built-in Object/Reference

More information

2609 : Introduction to C# Programming with Microsoft.NET

2609 : Introduction to C# Programming with Microsoft.NET 2609 : Introduction to C# Programming with Microsoft.NET Introduction In this five-day instructor-led course, developers learn the fundamental skills that are required to design and develop object-oriented

More information

Building non-windows applications (programs that only output to the command line and contain no GUI components).

Building non-windows applications (programs that only output to the command line and contain no GUI components). C# and.net (1) Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck,

More information

CHAPTER 7 OBJECTS AND CLASSES

CHAPTER 7 OBJECTS AND CLASSES CHAPTER 7 OBJECTS AND CLASSES OBJECTIVES After completing Objects and Classes, you will be able to: Explain the use of classes in Java for representing structured data. Distinguish between objects and

More information

What is Inheritance?

What is Inheritance? Inheritance 1 Agenda What is and Why Inheritance? How to derive a sub-class? Object class Constructor calling chain super keyword Overriding methods (most important) Hiding methods Hiding fields Type casting

More information

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7) Software Development & Education Center Java Platform, Standard Edition 7 (JSE 7) Detailed Curriculum Getting Started What Is the Java Technology? Primary Goals of the Java Technology The Java Virtual

More information

CSS 342 Data Structures, Algorithms, and Discrete Mathematics I. Lecture 2. Yusuf Pisan

CSS 342 Data Structures, Algorithms, and Discrete Mathematics I. Lecture 2. Yusuf Pisan CSS 342 Data Structures, Algorithms, and Discrete Mathematics I Lecture 2 Yusuf Pisan Compiled helloworld yet? Overview C++ fundamentals Assignment-1 CSS Linux Cluster - submitting assignment Call by Value,

More information

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018

CSC207H: Software Design. Java + OOP. CSC207 Winter 2018 Java + OOP CSC207 Winter 2018 1 Why OOP? Modularity: code can be written and maintained separately, and easily passed around the system Information-hiding: internal representation hidden from the outside

More information

CPSC 481 Tutorial 4. Intro to Visual Studio and C#

CPSC 481 Tutorial 4. Intro to Visual Studio and C# CPSC 481 Tutorial 4 Intro to Visual Studio and C# Brennan Jones bdgjones@ucalgary.ca (based on previous tutorials by Alice Thudt, Fateme Rajabiyazdi, and David Ledo) Announcements I emailed you an example

More information

Introduction to C++/CLI 3. What C++/CLI can do for you 6 The rationale behind the new syntax Hello World in C++/CLI 13

Introduction to C++/CLI 3. What C++/CLI can do for you 6 The rationale behind the new syntax Hello World in C++/CLI 13 contents preface xv acknowledgments xvii about this book xix PART 1 THE C++/CLI LANGUAGE... 1 1 Introduction to C++/CLI 3 1.1 The role of C++/CLI 4 What C++/CLI can do for you 6 The rationale behind the

More information

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

XII- COMPUTER SCIENCE VOL-II MODEL TEST I MODEL TEST I 1. What is the significance of an object? 2. What are Keyword in c++? List a few Keyword in c++?. 3. What is a Pointer? (or) What is a Pointer Variable? 4. What is an assignment operator?

More information

Data Structures (list, dictionary, tuples, sets, strings)

Data Structures (list, dictionary, tuples, sets, strings) Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in brackets: l = [1, 2, "a"] (access by index, is mutable sequence) Tuples are enclosed in parentheses: t = (1, 2, "a") (access

More information

Java Object Oriented Design. CSC207 Fall 2014

Java Object Oriented Design. CSC207 Fall 2014 Java Object Oriented Design CSC207 Fall 2014 Design Problem Design an application where the user can draw different shapes Lines Circles Rectangles Just high level design, don t write any detailed code

More information

Learning to Program in Visual Basic 2005 Table of Contents

Learning to Program in Visual Basic 2005 Table of Contents Table of Contents INTRODUCTION...INTRO-1 Prerequisites...INTRO-2 Installing the Practice Files...INTRO-3 Software Requirements...INTRO-3 Installation...INTRO-3 Demonstration Applications...INTRO-3 About

More information

EVALUATION COPY. Object-Oriented Programming in C# Student Guide Revision 4.6. Unauthorized reproduction or distribution is prohibited.

EVALUATION COPY. Object-Oriented Programming in C# Student Guide Revision 4.6. Unauthorized reproduction or distribution is prohibited. Object-Oriented Programming in C# Student Guide Revision 4.6 Object Innovations Course 4101 Object-Oriented Programming in C# Rev. 4.6 Student Guide Information in this document is subject to change without

More information

Visual C# 2008 How to Program, 3/E Outline

Visual C# 2008 How to Program, 3/E Outline vcsharp2008htp_outline.fm Page ix Monday, December 17, 2007 4:39 PM Visual C# 2008 How to Program, 3/E Outline ( subject to change) current as of 12/17/07. As the contents change, we ll post updates at

More information

ENCAPSULATION AND POLYMORPHISM

ENCAPSULATION AND POLYMORPHISM MODULE 3 ENCAPSULATION AND POLYMORPHISM Objectives > After completing this lesson, you should be able to do the following: Use encapsulation in Java class design Model business problems using Java classes

More information

Objects and Classes. Lecture 10 of TDA 540 (Objektorienterad Programmering) Chalmers University of Technology Gothenburg University Fall 2017

Objects and Classes. Lecture 10 of TDA 540 (Objektorienterad Programmering) Chalmers University of Technology Gothenburg University Fall 2017 Objects and Classes Lecture 10 of TDA 540 (Objektorienterad Programmering) Carlo A. Furia Alex Gerdes Chalmers University of Technology Gothenburg University Fall 2017 All labs have been published Descriptions

More information

Java for Non Majors. Final Study Guide. April 26, You will have an opportunity to earn 20 extra credit points.

Java for Non Majors. Final Study Guide. April 26, You will have an opportunity to earn 20 extra credit points. Java for Non Majors Final Study Guide April 26, 2017 The test consists of 1. Multiple choice questions 2. Given code, find the output 3. Code writing questions 4. Code debugging question 5. Short answer

More information

Chapter 12. OOP: Creating Object-Oriented Programs The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 12. OOP: Creating Object-Oriented Programs The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 12 OOP: Creating Object-Oriented Programs McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives - 1 Use object-oriented terminology correctly Create a two-tier

More information

CLASSES AND OBJECTS IN JAVA

CLASSES AND OBJECTS IN JAVA Lesson 8 CLASSES AND OBJECTS IN JAVA (1) Which of the following defines attributes and methods? (a) Class (b) Object (c) Function (d) Variable (2) Which of the following keyword is used to declare Class

More information

From Java to C++ From Java to C++ CSE250 Lecture Notes Weeks 1 2, part of 3. Kenneth W. Regan University at Buffalo (SUNY) September 10, 2009

From Java to C++ From Java to C++ CSE250 Lecture Notes Weeks 1 2, part of 3. Kenneth W. Regan University at Buffalo (SUNY) September 10, 2009 From Java to C++ CSE250 Lecture Notes Weeks 1 2, part of 3 Kenneth W. Regan University at Buffalo (SUNY) September 10, 2009 C++ Values, References, and Pointers 1 C++ Values, References, and Pointers 2

More information