JAVA Programming Language Practice02: O-O Programming. 张 成 伟 Zhang Chengwei Phone:

Size: px
Start display at page:

Download "JAVA Programming Language Practice02: O-O Programming. 张 成 伟 Zhang Chengwei Phone: 1398 6214 512"

Transcription

1 JAVA Programming Language Practice02: O-O Programming 张 成 伟 Zhang Chengwei Phone:

2 PRACTICE 2 Java Programming Language 2

3 Exercise 8.4 (Rectangle Class) On book: Java How to Program(6th) [ link ] Create a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has methods that calculate the perimeter and the area of the rectangle. It has set and get methods for both length and width. The set methods should verify that length and width are each floating-point numbers larger than 0.0 and less than Write a program to test class Rectangle. Java Programming Language 3

4 Exercise 8.6 (Savings Account Class) Create class SavingsAccount. Use a static variable annualinterestrate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsbalance indicating the amount the saver currently has on deposit. Provide method calculatemonthlyinterest to calculate the monthly interest by multiplying the savingsbalance by annualinterestrate divided by 12 this interest should be added to savingsbalance. Provide a static method modifyinterestrate that sets the annualinterestrate to a new value. Write a program to test class SavingsAccount. Instantiate two savingsaccount objects, saver1 and saver2, with balances of $ and $ , respectively. Set annualinterestrate to 4%, then calculate the monthly interest and print the new balances for both savers. Then set the annualinterestrate to 5%, calculate the next month's interest and print the new balances for both savers. Java Programming Language 4

5 Exercise 8.6: Sample output Java Programming Language 5

6 Exercise 8.12 Java Programming Language 6

7 Exercise 8.14 (Enhanced Rectangle Class) Create a more sophisticated Rectangle class than the one you created in Exercise 8.4. This class stores only the Cartesian coordinates of the four corners of the rectangle. The constructor calls a set method that accepts four sets of coordinates and verifies that each of these is in the first quadrant with no single x- or y- coordinate larger than The set method also verifies that the supplied coordinates specify a rectangle. Provide methods to calculate the length, width, perimeter and area. The length is the larger of the two dimensions. Include a predicate method issquare which determines whether the rectangle is a square. Write a program to test class Rectangle. Java Programming Language 7

8 Exercise 8.15 (Set of Integers) Create class IntegerSet. Each IntegerSet object can hold integers in the range The set is represented by an array of booleans. Array element a[i] is true if integer i is in the set. Array element a[j] is false if integer j is not in the set. The no-argument constructor initializes the Java array to the "empty set" (i.e., a set whose array representation contains all false values). Provide the following methods: Method union creates a third set that is the set-theoretic union of two existing sets (i.e., an element of the third set's array is set to true if that element is true in either or both of the existing sets otherwise, the element of the third set is set to false). Method intersection creates a third set which is the set-theoretic intersection of two existing sets (i.e., an element of the third set's array is set to false if that element is false in either or both of the existing setsotherwise, the element of the third set is set to true). Method insertelement inserts a new integer k into a set (by setting a[k] to true). Method deleteelement deletes integer m (by setting a[m] to false). Method tosetstring returns a string containing a set as a list of numbers separated by spaces. Include only those elements that are present in the set. Use --- to represent an empty set. Method isequalto determines whether two sets are equal. Write a program to test class IntegerSet. Instantiate several IntegerSet objects. Test that all your methods work properly. Java Programming Language 8

9 Exercise 8.19 (Tic-Tac-Toe) Create an project TicTacToe that will enable you to play the game of Tic-Tac-Toe. The game contains a private 3-by-3 two-dimensional array of integers. The first step should initialize the empty board to all zeros. Allow two human players. Wherever the first player moves, place a 1 in the specified square, and place a 2 wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won and whether it is a draw. If you feel ambitious, modify your program so that the computer makes the moves for one of the players. Also, allow the player to specify whether he or she wants to go first or second. Java Programming Language 9

10 Exercise 8.19: Sample output Java Programming Language 10

11 Learning Issues Class/Object Class Members: attributes and behaviors Attributes: variables are defined in the class scope Behaviors: methods are defined in the class scope Define a class Class constructors Method overloading/ Constructor overload Create an object from the existing class public/private/package access Java package (import/package) Keywords: this, static, final Java Programming Language 11

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

AP Computer Science Java Mr. Clausen Program 9A, 9B

AP Computer Science Java Mr. Clausen Program 9A, 9B AP Computer Science Java Mr. Clausen Program 9A, 9B PROGRAM 9A I m_sort_of_searching (20 points now, 60 points when all parts are finished) The purpose of this project is to set up a program that will

More information

You are to simulate the process by making a record of the balls chosen, in the sequence in which they are chosen. Typical output for a run would be:

You are to simulate the process by making a record of the balls chosen, in the sequence in which they are chosen. Typical output for a run would be: Lecture 7 Picking Balls From an Urn The problem: An urn has n (n = 10) balls numbered from 0 to 9 A ball is selected at random, its' is number noted, it is set aside, and another ball is selected from

More information

APPLICATIONS AND MODELING WITH QUADRATIC EQUATIONS

APPLICATIONS AND MODELING WITH QUADRATIC EQUATIONS APPLICATIONS AND MODELING WITH QUADRATIC EQUATIONS Now that we are starting to feel comfortable with the factoring process, the question becomes what do we use factoring to do? There are a variety of classic

More information

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may Chapter 1 Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may work on applications that contain hundreds,

More information

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following: In creating objects of the type, we have used statements similar to the following: f = new (); The parentheses in the expression () makes it look like a method, yet we never created such a method in our

More information

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT

Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT - BCNS/05/FT - BIS/06/FT - BIS/05/FT - BSE/05/FT - BSE/04/PT-BSE/06/FT BSc (Hons) in Computer Applications, BSc (Hons) Computer Science with Network Security, BSc (Hons) Business Information Systems & BSc (Hons) Software Engineering Cohort: BCA/07B/PT - BCA/06/PT - BCNS/06/FT

More information

J a v a Quiz (Unit 3, Test 0 Practice)

J a v a Quiz (Unit 3, Test 0 Practice) Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points

More information

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game Directions: In mobile Applications the Control Model View model works to divide the work within an application.

More information

3. How many winning lines are there in 5x5 Tic-Tac-Toe? 4. How many winning lines are there in n x n Tic-Tac-Toe?

3. How many winning lines are there in 5x5 Tic-Tac-Toe? 4. How many winning lines are there in n x n Tic-Tac-Toe? Winning Lines in Tic-Tac-Toe 1. The standard Tic-Tac-Toe is played on a 3 x 3 board, where there are vertical winning lines, horizontal winning lines, diagonal winning lines. This is a grand total of winning

More information

Efficient Data Structures for Decision Diagrams

Efficient Data Structures for Decision Diagrams Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

More information

Chapter 13 - Inheritance

Chapter 13 - Inheritance Goals Chapter 13 - Inheritance To learn about inheritance To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn about protected and package

More information

CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus

CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus CSS 543 Program 3: Online Tic-Tac-Toe Game Professor: Munehiro Fukuda Due date: see the syllabus 1. Purpose This assignment exercises how to write a peer-to-peer communicating program using non-blocking

More information

CISC 181 Project 3 Designing Classes for Bank Accounts

CISC 181 Project 3 Designing Classes for Bank Accounts CISC 181 Project 3 Designing Classes for Bank Accounts Code Due: On or before 12 Midnight, Monday, Dec 8; hardcopy due at beginning of lecture, Tues, Dec 9 What You Need to Know This project is based on

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

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

The Snake Game Java Case Study

The Snake Game Java Case Study The Snake Game Java Case Study John Latham January 27, 2014 Contents 1 Introduction 2 2 Learning outcomes 2 3 Description of the game 2 4 The classes of the program 4 5 The laboratory exercise and optional

More information

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A Developed By Brian Weinfeld Course Description: AP Computer

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

Microsoft Access 3: Understanding and Creating Queries

Microsoft Access 3: Understanding and Creating Queries Microsoft Access 3: Understanding and Creating Queries In Access Level 2, we learned how to perform basic data retrievals by using Search & Replace functions and Sort & Filter functions. For more complex

More information

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Data Structures Using C++ 2E. Chapter 5 Linked Lists Data Structures Using C++ 2E Chapter 5 Linked Lists Doubly Linked Lists Traversed in either direction Typical operations Initialize the list Destroy the list Determine if list empty Search list for a given

More information

Chapter 7: Sequential Data Structures

Chapter 7: Sequential Data Structures Java by Definition Chapter 7: Sequential Data Structures Page 1 of 112 Chapter 7: Sequential Data Structures We have so far explored the basic features of the Java language, including an overview of objectoriented

More information

Arrays. Atul Prakash Readings: Chapter 10, Downey Sun s Java tutorial on Arrays: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.

Arrays. Atul Prakash Readings: Chapter 10, Downey Sun s Java tutorial on Arrays: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays. Arrays Atul Prakash Readings: Chapter 10, Downey Sun s Java tutorial on Arrays: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html 1 Grid in Assignment 2 How do you represent the state

More information

Unit Testing & JUnit

Unit Testing & JUnit Unit Testing & JUnit Lecture Outline Communicating your Classes Introduction to JUnit4 Selecting test cases UML Class Diagrams Rectangle height : int width : int resize(double,double) getarea(): int getperimeter():int

More information

Description of Class Mutation Mutation Operators for Java

Description of Class Mutation Mutation Operators for Java Description of Class Mutation Mutation Operators for Java Yu-Seung Ma Electronics and Telecommunications Research Institute, Korea ysma@etri.re.kr Jeff Offutt Software Engineering George Mason University

More information

Object-Oriented Programming Lecture 2: Classes and Objects

Object-Oriented Programming Lecture 2: Classes and Objects Object-Oriented Programming Lecture 2: Classes and Objects Dr. Lê H!ng Ph"#ng -- Department of Mathematics, Mechanics and Informatics, VNUH July 2012 1 Content Class Object More on class Enum types Package

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

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

3. Add an Event: Alarm Alarm 0 a. Add an Action: Set Variable i. Applies to: Self ii. Variable: time_left iii. Value: +1 iv. Check the Relative box

3. Add an Event: Alarm Alarm 0 a. Add an Action: Set Variable i. Applies to: Self ii. Variable: time_left iii. Value: +1 iv. Check the Relative box Creating a Timer: You can have a timer that shows how long the player has been playing the game. 1. Create a new object and give it a name. This example is called object_timer. 2. Add an Event: Create

More information

History OOP languages Year Language 1967 Simula-67 1983 Smalltalk

History OOP languages Year Language 1967 Simula-67 1983 Smalltalk History OOP languages Intro 1 Year Language reported dates vary for some languages... design Vs delievered 1957 Fortran High level programming language 1958 Lisp 1959 Cobol 1960 Algol Structured Programming

More information

CmpSci 187: Programming with Data Structures Spring 2015

CmpSci 187: Programming with Data Structures Spring 2015 CmpSci 187: Programming with Data Structures Spring 2015 Lecture #12 John Ridgway March 10, 2015 1 Implementations of Queues 1.1 Linked Queues A Linked Queue Implementing a queue with a linked list is

More information

Software Engineering Techniques

Software Engineering Techniques Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary

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

Chapter 3: Restricted Structures Page 1

Chapter 3: Restricted Structures Page 1 Chapter 3: Restricted Structures Page 1 1 2 3 4 5 6 7 8 9 10 Restricted Structures Chapter 3 Overview Of Restricted Structures The two most commonly used restricted structures are Stack and Queue Both

More information

Area and Perimeter: The Mysterious Connection TEACHER EDITION

Area and Perimeter: The Mysterious Connection TEACHER EDITION Area and Perimeter: The Mysterious Connection TEACHER EDITION (TC-0) In these problems you will be working on understanding the relationship between area and perimeter. Pay special attention to any patterns

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

Multiplication. Year 1 multiply with concrete objects, arrays and pictorial representations

Multiplication. Year 1 multiply with concrete objects, arrays and pictorial representations Year 1 multiply with concrete objects, arrays and pictorial representations Children will experience equal groups of objects and will count in 2s and 10s and begin to count in 5s. They will work on practical

More information

The Interface Concept

The Interface Concept Multiple inheritance Interfaces Four often used Java interfaces Iterator Cloneable Serializable Comparable The Interface Concept OOP: The Interface Concept 1 Multiple Inheritance, Example Person name()

More information

(Eng. Hayam Reda Seireg) Sheet Java

(Eng. Hayam Reda Seireg) Sheet Java (Eng. Hayam Reda Seireg) Sheet Java 1. Write a program to compute the area and circumference of a rectangle 3 inche wide by 5 inches long. What changes must be made to the program so it works for a rectangle

More information

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013 CSE 530A Database Management Systems Introduction Washington University Fall 2013 Overview Time: Mon/Wed 7:00-8:30 PM Location: Crow 206 Instructor: Michael Plezbert TA: Gene Lee Websites: http://classes.engineering.wustl.edu/cse530/

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

Three daily lessons. Year 5

Three daily lessons. Year 5 Unit 6 Perimeter, co-ordinates Three daily lessons Year 4 Autumn term Unit Objectives Year 4 Measure and calculate the perimeter of rectangles and other Page 96 simple shapes using standard units. Suggest

More information

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Why? A central concept in Computer Science. Algorithms are ubiquitous. Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

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

Computer Programming I

Computer Programming I Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement (e.g. Exploring

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

called and explain why it cannot be factored with algebra tiles? and explain why it cannot be factored with algebra tiles?

called and explain why it cannot be factored with algebra tiles? and explain why it cannot be factored with algebra tiles? Factoring Reporting Category Topic Expressions and Operations Factoring polynomials Primary SOL A.2c The student will perform operations on polynomials, including factoring completely first- and second-degree

More information

A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles

A Concrete Introduction. to the Abstract Concepts. of Integers and Algebra using Algebra Tiles A Concrete Introduction to the Abstract Concepts of Integers and Algebra using Algebra Tiles Table of Contents Introduction... 1 page Integers 1: Introduction to Integers... 3 2: Working with Algebra Tiles...

More information

o Graph an expression as a function of the chosen independent variable to determine the existence of a minimum or maximum

o Graph an expression as a function of the chosen independent variable to determine the existence of a minimum or maximum Two Parabolas Time required 90 minutes Teaching Goals:. Students interpret the given word problem and complete geometric constructions according to the condition of the problem.. Students choose an independent

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

Envisioneer Technical Note

Envisioneer Technical Note Title Blocks By default there are four pre-defined Worksheet view windows available (Floor Plan, Elevations, Details, and Site Plan). Each one contains a generic border and title block supplied by Cadsoft.

More information

Inheritance, overloading and overriding

Inheritance, overloading and overriding Inheritance, overloading and overriding Recall with inheritance the behavior and data associated with the child classes are always an extension of the behavior and data associated with the parent class

More 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

Grade 5 Work Sta on Perimeter, Area, Volume

Grade 5 Work Sta on Perimeter, Area, Volume Grade 5 Work Sta on Perimeter, Area, Volume #ThankATeacher #TeacherDay #TeacherApprecia onweek 6. 12. Folder tab label: RC 3 TEKS 5(4)(H) Perimeter, Area, and Volume Cover: Reporting Category 3 Geometry

More information

UNIVERSITY OF CALIFORNIA BERKELEY Engineering 7 Department of Civil and Environmental Engineering. Object Oriented Programming and Classes in MATLAB 1

UNIVERSITY OF CALIFORNIA BERKELEY Engineering 7 Department of Civil and Environmental Engineering. Object Oriented Programming and Classes in MATLAB 1 UNIVERSITY OF CALIFORNIA BERKELEY Engineering 7 Department of Civil and Environmental Engineering Spring 2013 Professor: S. Govindjee Object Oriented Programming and Classes in MATLAB 1 1 Introduction

More information

Datum > Curve KIM,ME,NIU

Datum > Curve KIM,ME,NIU Datum > Curve Intersect First create at least one quilt on the surface of the model. Feature > Surface (> New) > Copy (do not use offset that creates a surface off the solid surface even with zero offset)

More information

Introduction to scripting with Unity

Introduction to scripting with Unity Introduction to scripting with Unity Scripting is an essential part of Unity as it defines the behaviour of your game. This tutorial will introduce the fundamentals of scripting using Javascript. No prior

More information

Free Pre-Algebra Lesson 55! page 1

Free Pre-Algebra Lesson 55! page 1 Free Pre-Algebra Lesson 55! page 1 Lesson 55 Perimeter Problems with Related Variables Take your skill at word problems to a new level in this section. All the problems are the same type, so that you can

More information

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013

Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013 Masters programmes in Computer Science and Information Systems Object-Oriented Design and Programming Sample module entry test xxth December 2013 This sample paper has more questions than the real paper

More information

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit.

Scanner. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit. Scanner The Scanner class is intended to be used for input. It takes input and splits it into a sequence of tokens. A token is a group of characters which form some unit. For example, suppose the input

More information

COMPUTER SCIENCE. Paper 1 (THEORY)

COMPUTER SCIENCE. Paper 1 (THEORY) COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------

More information

WebSphere Business Monitor

WebSphere Business Monitor WebSphere Business Monitor Monitor models 2010 IBM Corporation This presentation should provide an overview of monitor models in WebSphere Business Monitor. WBPM_Monitor_MonitorModels.ppt Page 1 of 25

More information

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous Contents 1. Introduction 2. Types and Variables 3. Statements and Control Flow 4. Reading Input 5. Classes and Objects 6. Arrays 7. Methods 8. Scope and Lifetime 9. Utility classes 10. Introduction to

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

LAB4 Making Classes and Objects

LAB4 Making Classes and Objects LAB4 Making Classes and Objects Objective The main objective of this lab is class creation, how its constructer creation, object creation and instantiation of objects. We will use the definition pane to

More information

Part 1 Foundations of object orientation

Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 1 Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 2 1 OFWJ_C01.QXD 2/3/06 2:14 pm Page 3 CHAPTER 1 Objects and classes Main concepts discussed

More information

To Evaluate an Algebraic Expression

To Evaluate an Algebraic Expression 1.5 Evaluating Algebraic Expressions 1.5 OBJECTIVES 1. Evaluate algebraic expressions given any signed number value for the variables 2. Use a calculator to evaluate algebraic expressions 3. Find the sum

More information

3 Improving the Crab more sophisticated programming

3 Improving the Crab more sophisticated programming 3 Improving the Crab more sophisticated programming topics: concepts: random behavior, keyboard control, sound dot notation, random numbers, defining methods, comments In the previous chapter, we looked

More information

Specialized Programme on Web Application Development using Open Source Tools

Specialized Programme on Web Application Development using Open Source Tools Specialized Programme on Web Application Development using Open Source Tools Objective: At the end of the course, Students will be able to: Understand various open source tools(programming tools and databases)

More information

Visual Basic Programming. An Introduction

Visual Basic Programming. An Introduction Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides

More information

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship.

CSCI 253. Object Oriented Programming (OOP) Overview. George Blankenship 1. Object Oriented Design: Java Review OOP George Blankenship. CSCI 253 Object Oriented Design: Java Review OOP George Blankenship George Blankenship 1 Object Oriented Programming (OOP) OO Principles Abstraction Encapsulation Abstract Data Type (ADT) Implementation

More information

Problem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class

Problem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class This homework is to be done individually. You may, of course, ask your fellow classmates for help if you have trouble editing files,

More 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

D06 PROGRAMMING with JAVA. Ch3 Implementing Classes

D06 PROGRAMMING with JAVA. Ch3 Implementing Classes Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch3 Implementing Classes PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com,

More information

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and: Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)

More information

Part I. Multiple Choice Questions (2 points each):

Part I. Multiple Choice Questions (2 points each): Part I. Multiple Choice Questions (2 points each): 1. Which of the following is NOT a key component of object oriented programming? (a) Inheritance (b) Encapsulation (c) Polymorphism (d) Parallelism ******

More information

FACTORING QUADRATICS 8.1.1 and 8.1.2

FACTORING QUADRATICS 8.1.1 and 8.1.2 FACTORING QUADRATICS 8.1.1 and 8.1.2 Chapter 8 introduces students to quadratic equations. These equations can be written in the form of y = ax 2 + bx + c and, when graphed, produce a curve called a parabola.

More information

Assignment # 2: Design Patterns and GUIs

Assignment # 2: Design Patterns and GUIs CSUS COLLEGE OF ENGINEERING AND COMPUTER SCIENCE Department of Computer Science CSc 133 Object-Oriented Computer Graphics Programming Spring 2014 John Clevenger Assignment # 2: Design Patterns and GUIs

More information

Section IV.1: Recursive Algorithms and Recursion Trees

Section IV.1: Recursive Algorithms and Recursion Trees Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller

More information

CS 378 Big Data Programming. Lecture 24 RDDs

CS 378 Big Data Programming. Lecture 24 RDDs CS 378 Big Data Programming Lecture 24 RDDs Review Assignment 10 Download and run Spark WordCount implementaeon WordCount alternaeve implementaeon Basic RDD TransformaEons we ve discussed filter(function)

More information

Computational Geometry. Lecture 1: Introduction and Convex Hulls

Computational Geometry. Lecture 1: Introduction and Convex Hulls Lecture 1: Introduction and convex hulls 1 Geometry: points, lines,... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space (higher-dimensional), R d A point in the plane, 3-dimensional space,

More information

Annotated work sample portfolios are provided to support implementation of the Foundation Year 10 Australian Curriculum.

Annotated work sample portfolios are provided to support implementation of the Foundation Year 10 Australian Curriculum. Work sample portfolio summary WORK SAMPLE PORTFOLIO Annotated work sample portfolios are provided to support implementation of the Foundation Year 10 Australian Curriculum. Each portfolio is an example

More information

Number Sense and Operations

Number Sense and Operations Number Sense and Operations representing as they: 6.N.1 6.N.2 6.N.3 6.N.4 6.N.5 6.N.6 6.N.7 6.N.8 6.N.9 6.N.10 6.N.11 6.N.12 6.N.13. 6.N.14 6.N.15 Demonstrate an understanding of positive integer exponents

More information

Chapter 8: Bags and Sets

Chapter 8: Bags and Sets Chapter 8: Bags and Sets In the stack and the queue abstractions, the order that elements are placed into the container is important, because the order elements are removed is related to the order in which

More information

Field Properties Quick Reference

Field Properties Quick Reference Field Properties Quick Reference Data types The following table provides a list of the available data types in Microsoft Office Access 2007, along with usage guidelines and storage capacities for each

More information

Computational Mathematics with Python

Computational Mathematics with Python Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40

More information

Logic in Computer Science: Logic Gates

Logic in Computer Science: Logic Gates Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers

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

WORK SCHEDULE: MATHEMATICS 2007

WORK SCHEDULE: MATHEMATICS 2007 , K WORK SCHEDULE: MATHEMATICS 00 GRADE MODULE TERM... LO NUMBERS, OPERATIONS AND RELATIONSHIPS able to recognise, represent numbers and their relationships, and to count, estimate, calculate and check

More information

Sample Problems. Practice Problems

Sample Problems. Practice Problems Lecture Notes Quadratic Word Problems page 1 Sample Problems 1. The sum of two numbers is 31, their di erence is 41. Find these numbers.. The product of two numbers is 640. Their di erence is 1. Find these

More information

Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12

Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12 Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12 Table of contents PDF417 Barcode Structure...3 Generator Function...3 Text Encoding Object...4

More information

A generic framework for game development

A generic framework for game development A generic framework for game development Michael Haller FH Hagenberg (MTD) AUSTRIA haller@hagenberg.at Werner Hartmann FAW, University of Linz AUSTRIA werner.hartmann@faw.unilinz.ac.at Jürgen Zauner FH

More information

Chapter 6: Programming Languages

Chapter 6: Programming Languages Chapter 6: Programming Languages Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright 2012 Pearson Education, Inc. Chapter 6: Programming Languages 6.1 Historical Perspective

More information

Data Structures using OOP C++ Lecture 1

Data Structures using OOP C++ Lecture 1 References: 1. E Balagurusamy, Object Oriented Programming with C++, 4 th edition, McGraw-Hill 2008. 2. Robert Lafore, Object-Oriented Programming in C++, 4 th edition, 2002, SAMS publishing. 3. Robert

More information

Introduction to Java. CS 3: Computer Programming in Java

Introduction to Java. CS 3: Computer Programming in Java Introduction to Java CS 3: Computer Programming in Java Objectives Begin with primitive data types Create a main class with helper methods Learn how to call built-in class methods and instance methods

More information

Intel Retail Client Manager Audience Analytics

Intel Retail Client Manager Audience Analytics Intel Retail Client Manager Audience Analytics By using this document, in addition to any agreements you have with Intel, you accept the terms set forth below. You may not use or facilitate the use of

More information

GED Practice Test #3 (34 Questions - each question is worth 2.94 points)

GED Practice Test #3 (34 Questions - each question is worth 2.94 points) GED Practice Test #3 (34 Questions - each question is worth 2.94 points) 1) Pickins community will be constructing fourteen identical rectangle gardens below. How many feet of fencing will they need? 1)

More information

Sect 6.7 - Solving Equations Using the Zero Product Rule

Sect 6.7 - Solving Equations Using the Zero Product Rule Sect 6.7 - Solving Equations Using the Zero Product Rule 116 Concept #1: Definition of a Quadratic Equation A quadratic equation is an equation that can be written in the form ax 2 + bx + c = 0 (referred

More information