PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

Size: px
Start display at page:

Download "PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON"

Transcription

1 PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Paris Cape Town Hong Kong Montreal

2 Contents TABLE OF LOCATION OF VIDEO NOTES Inside front cover Chapter 1 Introduction to Computers and C++ Programming COMPUTER SYSTEMS 32 Hardware 32 Software 37 High-Level Languages 38 Compilers 39 History Note PROGRAMMING AND PROBLEM-SOLVING 42 Algorithms 42 Program Design 45 Object-Oriented Programming 47 The Software Life Cycle INTRODUCTION TO C++ 49 Origins of the C++ Language 49 A Sample C++ Program 50 Pitfall: Using the Wrong Slash in \n 54 Programming Tip: Input and Output Syntax 54 Layout of a Simple C++ Program 54 Pitfall: Putting a Space before the include File Name 56 Compiling and Running a C++ Program 57 Programming Tip: Getting Your Program to Run TESTING AND DEBUGGING 60 Kinds of Program Errors 60 Pitfall: Assuming Your Program Is Correct 61 15

3 16 CONTENTS Chapter Summary 62 Answers to Self-Test Exercises 63 Programming Projects 66 Chapter 2 C++ Basics VARIABLES AND ASSIGNMENTS 70 Variables 70 Names: Identifiers 72 Variable Declarations 74 Assignment Statements 75 Pitfall: Uninitialized Variables 77 Programming Tip: Use Meaningful Names INPUT AND OUTPUT 80 Output Using cout 80 Include Directives and Namespaces 82 Escape Sequences 83 Programming Tip: End Each Program with a \n or endl 85 Formatting for Numbers with a Decimal Point 85 Input Using ein 86 Designing Input and Output 88 Programming Tip: Line Breaks in I/O DATA TYPES AND EXPRESSIONS 90 The Types int and double 90 Other Number Types 92 The Type char 93 The Type boo I 94 Introduction to the Class string 95 Type Compatibilities 96 Arithmetic Operators and Expressions 99 Pitfall: Whole Numbers in Division 101 More Assignment Statements SIMPLE FLOW OF CONTROL 104 A Simple Branching Mechanism 104 Pitfall: Strings of Inequalities 110 Pitfall: Using = in place of == 111 Compound Statements 112 Simple Loop Mechanisms 114

4 Increment and Decrement Operators 117 Programming Example: ChargeCard Balance 119 Pitfall: Infinite Loops PROGRAM STYLE 123 Indenting 123 Comments 124 Naming Constants 126 Chapter Summary 128 Answers to Self-Test Exercises 129 Programming Projects 134 Chapter 3 More Flow of Control USING BOOLEAN EXPRESSIONS 142 Evaluating Boolean Expressions 142 Pitfall: Boolean Expressions Convert to int Values 146 Enumeration Types (Optional) MULTIWAY BRANCHES 150 Nested Statements 150 Programming Tip: Use Braces in Nested Statements 1.51 Multiway if-else Statements 153 Programming Example: State Income Tax 155 The switch Statement 159 Pitfall: Forgetting a break in a switch Statement 163 Using switch Statements for Menus 164 Blocks 164 Pitfall: Inadvertent Local Variables MORE ABOUT C++ LOOP STATEMENTS 170 The while Statements Reviewed 171 Increment and Decrement Operators Revisited 172 The for Statement 175 Pitfall: Extra Semicolon in a for Statement 180 What Kind of Loop to Use 181 Pitfall: Uninitialized Variables and Infinite Loops 183 The break Statement 183 Pitfall: The break Statement in Nested Loops 185

5 18 CONTENTS 3.4 DESIGNING LOOPS 186 Loops for Sums and Products 186 Ending a Loop 187 Nested Loops 191 Debugging Loops 193 Chapter Summary 196 Answers to Self-Test Exercises 197 Programming Projects 203 Chapter 4 Procedural Abstraction and Functions That Return a Value TOP-DOWN DESIGN PREDEFINED FUNCTIONS 213 Using Predefined Functions 213 Type Casting 218 Older Form of Type Casting 220 Pitfall: Integer Division Drops the Fractional Part PROGRAMMER-DEFINED FUNCTIONS 222 Function Definitions 222 Functions That Return a Boolean Value 226 Alternate Form for Function Declarations 229 Pitfall: Arguments in the Wrong Order 229 Function Definition-Syntax Summary 231 More About Placement of Function Definitions 232 Programming Tip: Use Function Calls in Branching Statements PROCEDURAL ABSTRACTION 234 The Black Box Analogy 234 Programming Tip: Choosing Formal Parameter Names 236 Programming Tip: Nested Loops 238 Case Study: Buying Pizza 241 Programming Tip: Use Pseudocode LOCAL VARIABLES 248 The Small Program Analogy 248 Programming Example: Experimental Pea Patch 250 Global Constants and Global Variables 251

6 Call-by-Value Formal Parameters Are Local Variables 254 Namespaces Revisited 256 Programming Example: The Factorial Function OVERLOADING FUNCTION NAMES 260 Introduction to Overloading 261 Programming Example: Revised Pizza-Buying Program 263 Automatic Type Conversion 266 Chapter Summary 269 Answers to Self-Test Exercises 269 Programming Projects 274 Chapter 5 Functions for All Subtasks void FUNCTIONS 282 Definitions of void Functions 282 Programming Example: Converting Temperatures 285 return Statements in void Functions CALL-BY-REFERENCE PARAMETERS 289 A First View of Call-by-Reference 289 Call-by-Reference in Detail 292 Programming Example: The swap_values Function 296 Mixed Parameter Lists 298 Programming Tip: What Kind of Parameter to Use 298 Pitfall: Inadvertent Local Variables USING PROCEDURAL ABSTRACTION 302 Functions Calling Functions 303 Preconditions and Postconditions 303 Case Study: Supermarket Pricing TESTING AND DEBUGGING FUNCTIONS 312 Stubs and Drivers GENERAL DEBUGGING TECHNIQUES 317 Keep an Open Mind 317 Check Common Errors 318 Localize the Error 318 The assert macro 321

7 Chapter Summary 322 Answers to Self-Test Exercises 323 Programming Projects 327 Chapter 6 I/O Streams as an Introduction to Objects and Classes STREAMS AND BASIC FILE I/O 336 Why Use Files for I/O? 337 File I/O 338 Introduction to Classes and Objects 342 Programming Tip: Check Whether a File Was Opened Successfully 343 Techniques for File I/O 346 Appending to a File (Optional) 350 File Names as Input (Optional) TOOLS FOR STREAM I/O 353 Formatting Output with Stream Functions 353 Manipulators 358 Streams as Arguments to Functions 362 Programming Tip: Checking for the End of a File 362 A Note on Namespaces 366 Programming Example: Cleaning Up a File Format CHARACTER I/O 368 The Member Functions get and put 369 The putback Member Function (Optional) 372 Programming Example: Checking Input 373 Pitfall: Unexpected '\n' in Input 376 The eof Member Function 379 Programming Example: Editing a Text File 382 Predefined Character Functions 382 Pitfall: toupper and tolower Return Values 385 Chapter Summary 387 Answers to Self-Test Exercises 389 Programming Projects 394

8 Chapter 7 Arrays INTRODUCTION TO ARRAYS 406 Declaring and Referencing Arrays 406 Programming Tip: Use for Loops with Arrays 408 Pitfall: Array Indexes Always Start with Zero 408 Programming Tip: Use a Defined Constant for the Size of an Array Arrays in Memory 410 Pitfall: Array Index Out of Range 411 Initializing Arrays ARRAYS IN FUNCTIONS 415 Indexed Variables as Function Arguments 415 Entire Arrays as Function Arguments 418 The const Parameter Modifier 421 Pitfall: Inconsistent Use of const Parameters 423 Functions That Return an Array 424 Case Study: Production Graph PROGRAMMING WITH ARRAYS 438 Partially Filled Arrays 438 Programming Tip: Do Not Skimp on Formal Parameters 441 Programming Example: Searching an Array 442 Programming Example: Sorting an Array MULTIDIMENSIONAL ARRAYS 449 Multidimensional Array Basics 450 Multidimensional Array Parameters 450 Programming Example: Two-Dimensional Grading Program 452 Pitfall: Using Commas Between Array Indexes 457 Chapter Summary 457 Answers to Self-Test Exercises 458 Programming Projects 463 Chapter 8 Strings and Vectors AN ARRAY TYPE FOR STRINGS 477 C-String Values and C-String Variables 477 Pitfall: Using = and == with С Strings 481

9 Other Functions in <cstring> 483 C-String Input and Output 487 C-String-to-Number Conversions and Robust Input THE STANDARD string CLASS 495 Introduction to the Standard Class string 495 I/O with the Class string 498 Programming Tip: More Versions of getline 502 Pitfall: Mixing ein» variable; and getline 502 String Processing with the Class string 504 Programming Example: Palindrome Testing 506 Converting between string Objects and С Strings VECTORS 512 Vector Basics 512 Pitfall: Using Square Brackets Beyond the Vector Size 514 Programming Tip: Vector Assignment Is Well Behaved 516 Efficiency Issues 517 Chapter Summary 518 Answers to Self-Test Exercises 519 Programming Projects 521 Chapter 9 Pointers and Dynamic Arrays POINTERS 530 Pointer Variables 531 Basic Memory Management 538 Pitfall: Dangling Pointers 539 Static Variables and Automatic Variables 540 Programming Tip: Define Pointer Types DYNAMIC ARRAYS 543 Array Variables and Pointer Variables 543 Creating and Using Dynamic Arrays 543 Pointer Arithmetic (Optional) 549 Multidimensional Dynamic Arrays (Optional) 551 Chapter Summary 553 Answers to Self-Test Exercises 553 Programming Projects 554

10 Chapter 10 Defining Classes STRUCTURES 560 Structures for Diverse Data 560 Pitfall: Forgetting a Semicolon in a Structure Definition 565 Structures as Function Arguments 566 Programming Tip: Use Hierarchical Structures 567 Initializing Structures CLASSES 572 Defining Classes and Member Functions 572 Public and Private Members 577 Programming Tip: Make All Member Variables Private 585 Programming Tip: Define Accessor and Mutator Functions 585 Programming Tip: Use the Assignment Operator with Objects 587 Programming Example: BankAccount Class Version Summary of Some Properties of Classes 592 Constructors for Initialization 594 Programming Tip: Always Include a Default Constructor 602 Pitfall: Constructors with No Arguments ABSTRACT DATA TYPES 605 Classes to Produce Abstract Data Types 606 Programming Example: Alternative Implementation of a Class INTRODUCTION TO INHERITANCE 614 Inheritance Among Stream Classes 615 Programming Example: Another new.line Function 618 Default Arguments for Functions (Optional) 619 Defining Derived Classes 621 Chapter Summary 624 Answers to Self-Test Exercises 625 Programming Projects 633 Chapter 11 Friends, Overloaded Operators, and Arrays in Classes FRIEND FUNCTIONS 640 Programming Example: An Equality Function 640 Friend Functions 644

11 24 CONTENTS Programming Tip: Define Both Accessor Functions and Friend Functions 646 Programming Tip: Use Both Member and Nonmember Functions 648 Programming Example: Money Class (Version 1) 648 Implementation of digi.t_to_i.nt (Optional) 655 Pitfall: Leading Zeros in Number Constants 656 The const Parameter Modifier 658 Pitfall: Inconsistent Use of const OVERLOADING OPERATORS 663 Overloading Operators 664 Constructors for Automatic Type Conversion 668 Overloading Unary Operators 670 Overloading» and « ARRAYS AND CLASSES 681 Arrays of Classes 681 Arrays as Class Members 685 Programming Example: A Class for a Partially Filled Array CLASSES AND DYNAMIC ARRAYS 689 Programming Example: A String Variable Class 689 Destructors 693 Pitfall: Pointers as Call-by-Value Parameters 695 Copy Constructors 697 Overloading the Assignment Operator 702 Chapter Summary 705 Answers to Self-Test Exercises 706 Programming Projects 716 Chapter 12 Separate Compilation and Namespaces SEPARATE COMPILATION 726 ADTs Reviewed 727 Case Study: DigitalTime A Class Compiled Separately 728 Using #ifndef 737 Programming Tip: Defining Other Libraries 740

12 12.2 NAMESPACES 742 Namespaces and using Directives 742 Creating a Namespace 744 Qualifying Names 747 A Subtle Point About Namespaces (Optional) 748 Unnamed Namespaces 749 Programming Tip: Choosing a Name for a Namespace 752 Pitfall: Confusing the Global Namespace and the Unnamed Namespace 754 Chapter Summary 757 Answers to Self-Test Exercises 757 Programming Projects 759 Chapter 13 Pointers and Linked Lists NODES AND LINKED LISTS 764 Nodes 764 Linked Lists 770 Inserting a Node at the Head of a List 771 Pitfall: Losing Nodes 774 Searching a Linked List 775 Pointers as Iterators 779 Inserting and Removing Nodes Inside a List 779 Pitfall: Using the Assignment Operator with Dynamic Data Structures 782 Variations on Linked Lists 784 Linked Lists of Classes STACKS AND QUEUES 790 Stacks 790 Programming Example: A Stack Class 791 Queues 796 Programming Example: A Queue Class 797 Chapter Summary 801 Answers to Self-Test Exercises 802 Programming Projects 805

13 Chapter 14 Recursion RECURSIVE FUNCTIONS FOR TASKS 813 Case Study: Vertical Numbers 813 A Closer Look at Recursion 820 Pitfall: Infinite Recursion 821 Stacks for Recursion 823 Pitfall: Stack Overflow 824 Recursion Versus Iteration RECURSIVE FUNCTIONS FOR VALUES 826 General Form for a Recursive Function That Returns a Value 826 Programming Example: Another Powers Function THINKING RECURSIVELY 831 Recursive Design Techniques 831 Case Study: Binary Search An Example of Recursive Thinking 833 Programming Example: A Recursive Member Function 840 Chapter Summary 845 Answers to Self-Test Exercises 845 Programming Projects 850 Chapter 15 Inheritance INHERITANCE BASICS 856 Derived Classes 857 Constructors in Derived Classes 865 Pitfall: Use of Private Member Variables from the Base Class 868 Pitfall: Private Member Functions Are Effectively Not Inherited 870 The protected Qualifier 870 Redefinition of Member Functions 873 Redefining Versus Overloading 877 Access to a Redefined Base Function INHERITANCE DETAILS 879 Functions That Are Not Inherited 880 Assignment Operators and Copy Constructors in Derived Classes 880 Destructors in Derived Classes 881

14 15.3 POLYMORPHISM 883 Late Binding 883 Virtual Functions in C Virtual Functions and Extended Type Compatibility 890 Pitfall: The Slicing Problem 894 Pitfall: Not Using Virtual Member Functions 894 Pitfall: Attempting to Compile Class Definitions Without Definitions for Every Virtual Member Function 895 Programming Tip: Make Destructors Virtual 896 Chapter Summary 897 Answers to Self-Test Exercises 898 Programming Projects 902 Chapter 16 Exception Handling EXCEPTION-HANDLING BASICS 913 A Toy Example of Exception Handling 913 Defining Your Own Exception Classes 922 Multiple Throws and Catches 922 Pitfall: Catch the More Specific Exception First 926 Programming Tip: Exception Classes Can Be Trivial 927 Throwing an Exception in a Function 928 Exception Specification 928 Pitfall: Exception Specification in Derived Classes PROGRAMMING TECHNIQUES FOR EXCEPTION HANDLING 933 When to Throw an Exception 933 Pitfall: Uncaught Exceptions 935 Pitfall: Nested try-catch Blocks 935 Pitfall: Overuse of Exceptions 935 Exception Class Hierarchies 936 Testing for Available Memory 936 Rethrowing an Exception 937 Chapter Summary 937 Answers to Self-Test Exercises 937 Programming Projects 939

15 Chapter 17 Templates TEMPLATES FOR ALGORITHM ABSTRACTION 944 Templates for Functions 945 Pitfall: Compiler Complications 949 Programming Example: A Generic Sorting Function 951 Programming Tip: How to Define Templates 955 Pitfall: Using a Template with an Inappropriate Type TEMPLATES FOR DATA ABSTRACTION 957 Syntax for Class Templates 957 Programming Example: An Array Class 960 Chapter Summary 966 Answers to Self-Test Exercises 966 Programming Projects 969 Chapter 18 Standard Template Library ITERATORS 975 using Declarations 975 Iterator Basics 976 Pitfall: Compiler Problems 981 Kinds of Iterators 982 Constant and Mutable Iterators 986 Reverse Iterators 987 Other Kinds of Iterators CONTAINERS 990 Sequential Containers 990 Pitfall: Iterators and Removing Elements 995 Programming Tip: Type Definitions in Containers 995 Container Adapters stack and queue 996 Associative Containers set and map 1000 Efficiency GENERIC ALGORITHMS 1007 Running Times and Big-0 Notation 1008 Container Access Running Times 1012 Nonmodifying Sequence Algorithms 1013 Container Modifying Algorithms 1019

16 CONTENTS 29 Set Algorithms 1019 Sorting Algorithms 1021 Chapter Summary 1021 Answers to Self-Test Exercises 1022 Programming Projects 1024 APPENDICES 1 C++ Keywords Precedence of Operators The ASCII Character Set Some Library Functions Inline Functions Overloading the Array Index Square Brackets The this Pointer Overloading Operators as Member Operators 1047 INDEX 1049

ABSOLUTE C++ WALTER SAVITCH University of California, San Diego

ABSOLUTE C++ WALTER SAVITCH University of California, San Diego 00_FM.fm Page i Saturday, October 20, 2001 6:23 PM ABSOLUTE C++ WALTER SAVITCH University of California, San Diego Boston San Francisco New York London Toronto Sydney Tokyo Singapore Madrid Mexico City

More information

ENGINEERING PROBLEM SOLVING WITH C++

ENGINEERING PROBLEM SOLVING WITH C++ ENGINEERING PROBLEM SOLVING WITH C++ Third Edition Delores M. Etter Electrical Engineering Department Southern Methodist University, Dallas, TX Jeanine A. Ingber Accurate Solutions in Applied Physics,

More information

Summary. Pre requisition. Content Details: 1. Basics in C++

Summary. Pre requisition. Content Details: 1. Basics in C++ Summary C++ Language is one of the approaches to provide object-oriented functionality with C like syntax. C++ adds greater typing strength, scoping and other tools useful in object-oriented programming

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

Glossary of Object Oriented Terms

Glossary 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 information

BHARATHIAR UNIVERSITY: COIMBATORE CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++ LANGUAGE

BHARATHIAR UNIVERSITY: COIMBATORE CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++ LANGUAGE Certificate in Advanced Programming - C++ Language Page 1 of 7 BHARATHIAR UNIVERSITY: COIMBATORE 641046 CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

NIIT. Table of Contents. Introduction. Lesson 1 Introduction to Object-Oriented Approach. Lesson 2 Creating Objects

NIIT. Table of Contents. Introduction. Lesson 1 Introduction to Object-Oriented Approach. Lesson 2 Creating Objects Introduction Table of Contents About This Course...i Who Should Attend this Course...i How to Use this Book... ii Conventions Used in this Book... ii Lesson 1 Introduction to Object-Oriented Approach Object-Oriented

More information

Java (12 Weeks) Introduction to Java Programming Language

Java (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 information

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 2: Basic Elements of C++

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with the basic components of a C++ program,

More information

Computer Programming I

Computer Programming I Computer Programming I COP 2210 Syllabus Spring Semester 2012 Instructor: Greg Shaw Office: ECS 313 (Engineering and Computer Science Bldg) Office Hours: Tuesday: 2:50 4:50, 7:45 8:30 Thursday: 2:50 4:50,

More information

Computing Concepts with Java Essentials

Computing 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 information

OBJECT ORIENTED PROGRAMMING IN C++

OBJECT ORIENTED PROGRAMMING IN C++ OBJECT ORIENTED PROGRAMMING IN C++ For Off Campus BSc Computer Science Programme UNIT 1 1. The goal of programmers is to develop software that are. A. Correct B. Reliable and maintainable C. Satisfy all

More information

Curriculum Map. Discipline: Computer Science Course: C++

Curriculum Map. Discipline: Computer Science Course: C++ Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code

More information

AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING

AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING Sp2 AFF 826 Sub. Code 4BSO1C1 B.Sc. DEGREE EXAMINATION, NOVEMBER 2015 First Semester Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING (CBCS 2014 onwards) Time : 3 Hours Maximum : 75 Marks Part A (10

More information

C++ Keywords. If/else Selection Structure. Looping Control Structures. Switch Statements. Example Program

C++ Keywords. If/else Selection Structure. Looping Control Structures. Switch Statements. Example Program C++ Keywords There are many keywords in C++ that are not used in other languages. bool, const_cast, delete, dynamic_cast, const, enum, extern, register, sizeof, typedef, explicit, friend, inline, mutable,

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Marathwada Institute of Technology

Marathwada Institute of Technology Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part - I (Question

More information

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++

Adjusted/Modified by Nicole Tobias. Chapter 2: Basic Elements of C++ Adjusted/Modified by Nicole Tobias Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

A First Book of C++ Chapter 2 Data Types, Declarations, and Displays

A First Book of C++ Chapter 2 Data Types, Declarations, and Displays A First Book of C++ Chapter 2 Data Types, Declarations, and Displays Objectives In this chapter, you will learn about: Data Types Arithmetic Operators Variables and Declarations Common Programming Errors

More information

Course Title: Software Development

Course Title: Software Development Course Title: Software Development Unit: Customer Service Content Standard(s) and Depth of 1. Analyze customer software needs and system requirements to design an information technology-based project plan.

More information

Chapter 2: Problem Solving Using C++

Chapter 2: Problem Solving Using C++ Chapter 2: Problem Solving Using C++ 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common

More information

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 4: Control Structures I (Selection)

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 4: Control Structures I (Selection) C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 4: Control Structures I (Selection) Objectives In this chapter, you will: Learn about control structures Examine relational

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

Java Application Developer Certificate Program Competencies

Java 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 information

Chapter 8. Arithmetic in C++

Chapter 8. Arithmetic in C++ Christian Jacob Chapter 8 Arithmetic in C++ 8.1 The C++ Vocabulary 8.2 Variables and Types 8.2.1 Data Objects 8.2.2 Variables 8.2.3 Declaration of Variables 8.3 Elementary C++ Data Types 8.3.1 Integers

More information

Fundamentals of Java Programming

Fundamentals 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 information

Bhakta Kavi Narsinh Mehta University, Junagadh

Bhakta Kavi Narsinh Mehta University, Junagadh Bhakta Kavi Narsinh Mehta University, Junagadh Draft Syllabus for B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1) Effective From June - 2016 B.Sc. (C.S.) (Semester - 1) CS-101:

More information

Basic Programming and PC Skills: Basic Programming and PC Skills:

Basic Programming and PC Skills: Basic Programming and PC Skills: Texas University Interscholastic League Contest Event: Computer Science The contest challenges high school students to gain an understanding of the significance of computation as well as the details of

More information

Which of the following is the correct operator to compare two variables? A. := B. = C. equal D. ==

Which of the following is the correct operator to compare two variables? A. := B. = C. equal D. == Group 1 Question 1. What is the correct value to return to the operating system upon the successful completion of a program? A. -1 B. 1 C. 0 D. Programs do not return a value. Question 2. What is the only

More information

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction Standard 2: Technology and Society Interaction Technology and Ethics Analyze legal technology issues and formulate solutions and strategies that foster responsible technology usage. 1. Practice responsible

More information

Final Exam Review. CS 1428 Fall Jill Seaman. Final Exam

Final Exam Review. CS 1428 Fall Jill Seaman. Final Exam Final Exam Review CS 1428 Fall 2011 Jill Seaman 1 Final Exam Friday, December 9, 11:00am to 1:30pm Derr 241 (here) Closed book, closed notes, clean desk Comprehensive (covers entire course) 25% of your

More information

C++ Basics. C++ Basics: Names: Identifiers. Names: Identifiers. Display 2.1 A C++ Program (1 of 2) Display 2.1 A C++ Program (2 of 2)

C++ Basics. C++ Basics: Names: Identifiers. Names: Identifiers. Display 2.1 A C++ Program (1 of 2) Display 2.1 A C++ Program (2 of 2) C++ Basics C++ Basics: 2.1 Variables and Assignments Variables and Assignments Input and Output Data Types and Expressions Simple Flow of Control Program Style A C++ variable can hold a number or other

More information

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical

More information

An Incomplete C++ Primer. University of Wyoming MA 5310

An Incomplete C++ Primer. University of Wyoming MA 5310 An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages

More information

Chapter 2: Basic Elements of C++

Chapter 2: Basic Elements of C++ Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates

More information

Java 6 'th. Concepts INTERNATIONAL STUDENT VERSION. edition

Java 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 information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

C++ for Game Programmers

C++ for Game Programmers C++ for Game Programmers Course Description C++ has become one of the favourite programming language for game programmers. Reasons for wide spread acceptability of C++ are plenty, but primary reasons are,

More information

An Introduction to Object-Oriented Programming with

An Introduction to Object-Oriented Programming with An Introduction to Object-Oriented Programming with TM Java C. Thomas Wu Naval Postgraduate School Ml McGraw-Hill Boston Burr Ridge, IL Dubuque, IA Madison, WI New York San Francisco St. Louis Bangkok

More information

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER Course Outline (2015) Basic Programming With Procedural & Object Oriented Concepts (C, C++) Training Office# Road: 11, House: 1 A, Nikunja 2, Khilkhet,

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

Object Oriented Programming With C++(10CS36) Question Bank. UNIT 1: Introduction to C++

Object Oriented Programming With C++(10CS36) Question Bank. UNIT 1: Introduction to C++ Question Bank UNIT 1: Introduction to C++ 1. What is Procedure-oriented Programming System? Dec 2005 2. What is Object-oriented Programming System? June 2006 3. Explain the console I/O functions supported

More information

Object Oriented Software Design II

Object Oriented Software Design II Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February

More information

COMPUTER SCIENCE (5651) Test at a Glance

COMPUTER SCIENCE (5651) Test at a Glance COMPUTER SCIENCE (5651) Test at a Glance Test Name Computer Science Test Code 5651 Time Number of Questions Test Delivery 3 hours 100 selected-response questions Computer delivered Content Categories Approximate

More information

C++ INTERVIEW QUESTIONS

C++ 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 information

Course: Introduction to Java Using Eclipse Training

Course: Introduction to Java Using Eclipse Training Course: Introduction to Java Using Eclipse Training Course Length: Duration: 5 days Course Code: WA1278 DESCRIPTION: This course introduces the Java programming language and how to develop Java applications

More information

6.096 Lab 1. Due: 7 January 12:30:00. September 20, 2011

6.096 Lab 1. Due: 7 January 12:30:00. September 20, 2011 6.096 Lab 1 Due: 7 January 1:30:00 September 0, 011 1 Additional Material 1.1 Constants A constant is an expressions with a fixed value. Kinds of constants: Literals: used to express particular values

More information

BCS2B02: OOP Concepts and Data Structures Using C++

BCS2B02: OOP Concepts and Data Structures Using C++ SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal

More information

09336863931 : provid.ir

09336863931 : provid.ir provid.ir 09336863931 : NET Architecture Core CSharp o Variable o Variable Scope o Type Inference o Namespaces o Preprocessor Directives Statements and Flow of Execution o If Statement o Switch Statement

More information

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science Program Schedule CTech Computer Science Credits CS101 Computer Science I 3 MATH100 Foundations of Mathematics and

More information

AP 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 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 information

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

RARITAN 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 information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

More information

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40 SOFTWARE DEVELOPMENT, 15.1200.40 1.0 APPLY PROBLEM-SOLVING AND CRITICAL THINKING SKILLS TO INFORMATION TECHNOLOGY 1.1 Describe methods and considerations for prioritizing and scheduling software development

More information

The programmers guide to C++

The programmers guide to C++ The programmers guide to C++ Adrian P. Robson Northumbria University April 1996 Preprint for Ann, Alice and John Copyright 1997, 2011 by Adrian P. Robson Issue 2.1 - Pre-print draft with post-print errata

More information

Advanced C++ Programming

Advanced C++ Programming Advanced C++ Programming Course ID CPP110 Course Description The comprehensive, five-day course consists of three modules. A preliminary module reviews topics, including inheritance, the ANSI C++ Standard

More information

C programming. Intro to syntax & basic operations

C programming. Intro to syntax & basic operations C programming Intro to syntax & basic operations Example 1: simple calculation with I/O Program, line by line Line 1: preprocessor directive; used to incorporate code from existing library not actually

More information

GETTING STARTED WITH C++ C++ BASICS - 1 -

GETTING STARTED WITH C++ C++ BASICS - 1 - - 1 - GETTING STARTED WITH C++ Programming is a core activity in the process of performing tasks or solving problems with the aid of a computer. An idealised picture is: PROBLEM COMPUTER SOLUTION Unfortunately

More information

Object-Oriented Programming with C#

Object-Oriented Programming with C# Object-Oriented Programming with C# Description: Prerequisites: Audience: Length: This course introduces the student to writing object-oriented programs in C#. Prior study in object-orientation and UML

More information

OKLAHOMA SUBJECT AREA TESTS (OSAT )

OKLAHOMA SUBJECT AREA TESTS (OSAT ) CERTIFICATION EXAMINATIONS FOR OKLAHOMA EDUCATORS (CEOE ) OKLAHOMA SUBJECT AREA TESTS (OSAT ) FIELD 081: COMPUTER SCIENCE September 2008 Subarea Range of Competencies I. Computer Use in Educational Environments

More information

Visual Basic. murach's TRAINING & REFERENCE

Visual Basic. murach's TRAINING & REFERENCE TRAINING & REFERENCE murach's Visual Basic 2008 Anne Boehm lbm Mike Murach & Associates, Inc. H 1-800-221-5528 (559) 440-9071 Fax: (559) 440-0963 murachbooks@murach.com www.murach.com Contents Introduction

More information

Domains and Competencies

Domains and Competencies Domains and Competencies DOMAIN I TECHNOLOGY APPLICATIONS CORE Standards Assessed: Computer Science 8 12 I VII Competency 001: The computer science teacher knows technology terminology and concepts; the

More information

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage

More information

Introduction to C ++ : Questions

Introduction to C ++ : Questions Introduction to C ++ : Questions Thomas Branch 28th November 204. A Tutorial Introduction. Getting Started Aim: Make sure the program compiles and runs, learn to get the program to output text. [Debug]

More information

> Essential C# 5.0. Mark Michaelis. with Eric Lippert. AAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco

> Essential C# 5.0. Mark Michaelis. with Eric Lippert. AAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco > Essential p C# 5.0 Mark Michaelis with Eric Lippert AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo

More information

Syllabus for CS 134 Java Programming

Syllabus for CS 134 Java Programming - Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.

More information

3) Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

3) Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging? Freshers Club Important 100 C Interview Questions & Answers 1) How do you construct an increment statement or decrement statement in C? There are actually two ways you can do this. One is to use the increment

More information

C++ How to Program, 8/e by Pearson Education, Inc. All Rights Reserved.

C++ How to Program, 8/e by Pearson Education, Inc. All Rights Reserved. C++ How to Program, 8/e 1992-2012 by Pearson Education, Inc. 1992-2012 by Pearson Education, Inc. 1992-2012 by Pearson Education, Inc. We ve studied fixed-size data structures such as one-dimensional arrays

More information

CS1020E: DATA STRUCTURES AND ALGORITHMS I

CS1020E: DATA STRUCTURES AND ALGORITHMS I CS1020E: DATA STRUCTURES AND ALGORITHMS I Tutorial 1 Basic C++, OOP Problem Solving (Week 3, starting 22 August 2016) 1. Evaluation Order (Note: You can use any other C++ code editor/compiler). Examine

More information

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES Subarea Educational Computing and Technology Literacy Computer Systems, Data, and Algorithms Program Design and Verification Programming Language

More information

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction 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 information

Texas Essential Knowledge and Skills Correlation to Video Game Design Foundations 2011 N130.0993. Video Game Design

Texas Essential Knowledge and Skills Correlation to Video Game Design Foundations 2011 N130.0993. Video Game Design Texas Essential Knowledge and Skills Correlation to Video Game Design Foundations 2011 N130.0993. Video Game Design STANDARD CORRELATING PAGES Standard (1) The student demonstrates knowledge and appropriate

More information

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority) Boolean Expressions, Conditions, Loops, and Enumerations Relational Operators == // true if two values are equivalent!= // true if two values are not equivalent < // true if left value is less than the

More information

JavaScript: Control Statements I

JavaScript: Control Statements I 1 7 JavaScript: Control Statements I 7.1 Introduction 2 The techniques you will learn here are applicable to most high-level languages, including JavaScript 1 7.2 Algorithms 3 Any computable problem can

More information

Java the UML Way: Integrating Object-Oriented Design and Programming

Java the UML Way: Integrating Object-Oriented Design and Programming Java the UML Way: Integrating Object-Oriented Design and Programming by Else Lervik and Vegard B. Havdal ISBN 0-470-84386-1 John Wiley & Sons, Ltd. Table of Contents Preface xi 1 Introduction 1 1.1 Preliminaries

More information

An Introduction to Programming and Computer Science

An Introduction to Programming and Computer Science An Introduction to Programming and Computer Science Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Software, Inc. Skylight Publishing Andover, Massachusetts Copyright 1998 by

More information

10266A: Programming in C# with Microsoft Visual Studio 2010

10266A: Programming in C# with Microsoft Visual Studio 2010 10266A: Programming in C# with Microsoft Visual Studio 2010 Course Overview The course focuses on the C# program structure, language syntax, and implementation details with.net Framework 4.0. This course

More information

AP Computer Science AB Syllabus 1

AP Computer Science AB Syllabus 1 AP Computer Science AB Syllabus 1 Course Resources Java Software Solutions for AP Computer Science, J. Lewis, W. Loftus, and C. Cocking, First Edition, 2004, Prentice Hall. Video: Sorting Out Sorting,

More information

Tutorial-3a: First steps with C++ programming

Tutorial-3a: First steps with C++ programming HTTP://WWW.HEP.LU.SE/COURSES/MNXB01 Introduction to Programming and Computing for Scientists (2015 HT) Tutorial-3a: First steps with C++ programming Programming for Scientists Tutorial 3a 1 / 17 Quick

More information

Computer Programming C++ Classes and Objects 15 th Lecture

Computer Programming C++ Classes and Objects 15 th Lecture Computer Programming C++ Classes and Objects 15 th Lecture 엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University Copyrights 2013 Eom, Hyeonsang All Rights Reserved Outline

More information

CS 111 Classes I 1. Software Organization View to this point:

CS 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 information

C++ Language Tutorial

C++ Language Tutorial cplusplus.com C++ Language Tutorial Written by: Juan Soulié Last revision: June, 2007 Available online at: http://www.cplusplus.com/doc/tutorial/ The online version is constantly revised and may contain

More information

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40 SOFTWARE DEVELOPMENT, 15.1200.40 STANDARD 1.0 APPLY PROBLEM-SOLVING AND CRITICAL THINKING SKILLS TO INFORMATION 1.1 Describe methods of establishing priorities 1.2 Prepare a plan of work and schedule information

More information

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

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 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 information

Programming and Software Development (PSD)

Programming and Software Development (PSD) Programming and Software Development (PSD) Course Descriptions Fundamentals of Information Systems Technology This course is a survey of computer technologies. This course may include computer history,

More information

The D Programming Language

The D Programming Language The D Programming Language Andrei Alexandrescu v:addison-wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo Singapore

More information

AP Computer Science Java Subset

AP 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 information

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples

Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples Identifiers and Expressions CSE 130: Introduction to C Programming Spring 2005 Punctuation in C Statements are terminated with a ; Groups of statements are enclosed by curly braces: { and } Commas separate

More information

Chapter 2: Elements of Java

Chapter 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 information

IS0020 Program Design and Software Tools Midterm, Feb 24, 2004. Instruction

IS0020 Program Design and Software Tools Midterm, Feb 24, 2004. Instruction IS0020 Program Design and Software Tools Midterm, Feb 24, 2004 Name: Instruction There are two parts in this test. The first part contains 50 questions worth 80 points. The second part constitutes 20 points

More information

Charles Dierbach. Wiley

Charles Dierbach. Wiley Charles Dierbach Wiley Contents Preface Acknowledgments About the Author XXI xxv xxvii Introduction 1 MOTIVATION 2 FUNDAMENTALS 2 1.1 What Is Computer Science? 2 1.1.1 The Essence of Computational Problem

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

More information

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is

More information

The IC Language Specification. Spring 2006 Cornell University

The IC Language Specification. Spring 2006 Cornell University The IC Language Specification Spring 2006 Cornell University The IC language is a simple object-oriented language that we will use in the CS413 project. The goal is to build a complete optimizing compiler

More information

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY

More information