Implementing Classes

Similar documents
Implementing Classes (P1 2006/2007)

2/9/2012. Chapter Three: Implementing Classes. Chapter Goals

9/2/2011. Chapter Goals

Agenda: Notes on Chapter 3. Create a class with constructors and methods.

ICOM 4015: Advanced Programming

CSEN401 Computer Programming Lab. Topics: Introduction and Motivation Recap: Objects and Classes

Inheritance Advanced Programming ICOM 4015 Lecture 11 Reading: Java Concepts Chapter 13

Inheritance (P1 2006/2007)

CHAPTER 10 INHERITANCE

Arrays and Array Lists

STUDENT LESSON A5 Designing and Using Classes

Chapter Goals. Chapter 9 Inheritance. Inheritance Hierarchies. Inheritance Hierarchies. Set of classes can form an inheritance hierarchy

CS 170, Section /3/2009 CS170, Section 000, Fall

Intro to Computer Science 2. Inheritance

public class Account { private int id; private static int nextaccountid = 0; private String name; private double balance;

OBJECTS AND CLASSES CHAPTER. Final Draft 10/30/2011. Slides by Donald W. Smith TechNeTrain.com

Chapter 8. Arrays and Array Lists. Chapter Goals. Chapter Goals. Arrays. Arrays. Arrays

Introduction to Computer Science and Object-Oriented Programming

Chapter 10 Inheritance. Big Java by Cay Horstmann Copyright 2009 by John Wiley & Sons. All rights reserved.

Chapter 2 An Introduction to Objects and Classes. Big Java by Cay Horstmann Copyright 2009 by John Wiley & Sons. All rights reserved.

CS112 Lecture: Defining Instantiable Classes

Encapsulation. Mason Vail Boise State University Computer Science

Fundamentos de programação

Chapter Goals. Chapter 7 Designing Classes. Discovering Classes Actors (end in -er, -or) objects do some kinds of work for you: Discovering Classes

Chapter 8 Designing Classes. Big Java by Cay Horstmann Copyright 2009 by John Wiley & Sons. All rights reserved.

Chapter Seven: Arrays and Array Lists. Chapter Goals

Basics of Java Programming. Hendrik Speleers

Practical Session 2 Correction Don't forget to put the InputValue.java file in each project

CSC Inheritance. Fall 2009

Software Design and Analysis for Engineers

Lecture 06: Classes and Objects

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

Review. these are the instance variables. these are parameters to the methods

Chapter Goals. T To understand the concept of regression testing. Chapter 6 Arrays and Array Lists. Arrays Array: Sequence of values of the same type

CS-140 Fall Binghamton University. Methods. Sect. 3.3, 8.2. There s a method in my madness.

Objects and Classes -- Introduction

Designing Classes Advanced Programming ICOM 4015 Lecture 8 Reading: Java Concepts Chapter 8

What will this print?

BankAccount account1 = new BankAccount(...);,this

by Pearson Education, Inc. All Rights Reserved. 2

Object-Oriented Programming (Java)

Classes and Methods: Classes

ENGR 2710U Midterm Exam UOIT SOLUTION SHEET

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

COMP-202 Unit 8: Defining Your Own Classes. CONTENTS: Class Definitions Attributes Methods and Constructors Access Modifiers and Encapsulation

Lecture 7 Objects and Classes

Week 1 Exercises. All cs121 exercise and homework programs must in the default package and use the class names as given.

Outline CSE 142. Specification vs Implementation - Review. CSE142 Wi03 F-1. Instance Variables

CSE 413 Winter 2001 Midterm Exam

Imperative Languages!

Chapter 15. Exception Handling. Chapter Goals. Error Handling. Error Handling. Throwing Exceptions. Throwing Exceptions

CS 106X, Lecture 14 Classes and Pointers

CSE 143 Lecture 3. More ArrayList; object-oriented programming. reading: 10.1;

CPS122 Lecture: Defining a Class

Chapter 9. Designing Classes. Chapter Goals. Chapter Goals. Choosing Classes. Choosing Classes. Self Test

ESc101 : Fundamental of Computing. Object Oriented programming

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Introduction to Objects. James Brucker

Container Vs. Definition Classes. Container Class

COMP-202. Objects, Part III. COMP Objects Part III, 2013 Jörg Kienzle and others

$ % $ % BankAccount. public class BankAccount {... private??? balance; } "commands, transformers, mutators! "abstract state! "queries, accessors!

Interfaces and Polymorphism Advanced Programming

Creating and Using Objects

The Scanner class reads data entered by the user. Methods: COSC Dr. Ramon Lawrence. Page 3. COSC Dr. Ramon Lawrence A) A = 6, B = 3

Chapter 5: Arrays. Chapter 5. Arrays. Java Programming FROM THE BEGINNING. Copyright 2000 W. W. Norton & Company. All rights reserved.

Building Java Programs

JAVA: A Primer. By: Amrita Rajagopal

Handout 9 OO Inheritance.

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

CHAPTER 7 OBJECTS AND CLASSES

UNIT 3 ARRAYS, RECURSION, AND COMPLEXITY CHAPTER 11 CLASSES CONTINUED

EXAMINATIONS 2012 END-OF-YEAR SWEN222. Software Design. Question Topic Marks 1. Design Quality Design Patterns Design by Contract 12

CSE115 Introduction to Computer Science I Coding Exercise #7 Retrospective Fall 2017

ECE 122. Engineering Problem Solving with Java

Object-Oriented Programming Concepts

OBJECT ORİENTATİON ENCAPSULATİON

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

Lecture 07: Object Encapsulation & References AITI Nigeria Summer 2012 University of Lagos.

Intro to Computer Science II. Exceptions

Programming a Bank Database. We ll store the information in two tables: INTEGER DECIMAL(10, 2)

CS111: PROGRAMMING LANGUAGE II. Lecture 1: Introduction to classes

Chapter Goals. Chapter Eight: Designing Classes Contined. Choosing Classes

Handout 8 Classes and Objects Continued: Static Variables and Constants.

G Programming Languages - Fall 2012

CHAPTER 7 OBJECTS AND CLASSES

An introduction to Java II

Sample Solution Assignment 5. Question R3.1

Classes and Objects. COMP1400/INFS1609 Week 8. Monday, 10 September 12

CPS 109 Lab 3 Alexander Ferworn Updated Fall 05. Ryerson University. School of Computer Science CPS109. Lab 3

CS112 Lecture: Working with Numbers

Package. A package is a set of related classes Syntax to put a class into a package: Two rules: Example:

Inheritance and Subclasses

Defining Classes and Methods. Objectives. Objectives 6/27/2014. Chapter 5

Defining Classes and Methods

Lecture 12: Classes II

3.1 Class Declaration

12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension.

C++ : Object Oriented Features. What makes C++ Object Oriented

Contents. 8-1 Copyright (c) N. Afshartous

Transcription:

Implementing Classes Advanced Programming ICOM 4015 Lecture 3 Reading: Java Concepts Chapter 3 Fall 2006 Slides adapted from Java Concepts companion slides 1

Chapter Goals To become familiar with the process of implementing classes To be able to implement simple methods To understand the purpose and use of constructors To understand how to access instance fields and local variables To appreciate the importance of documentation comments Fall 2006 Slides adapted from Java Concepts companion slides 2

Black Boxes A black box magically does its thing Hides its inner workings Encapsulation: the hiding of unimportant details What is the right concept for each particular black box? Continued Fall 2006 Slides adapted from Java Concepts companion slides 3

Black Boxes Concepts are discovered through abstraction Abstraction: taking away inessential features, until only the essence of the concept remains In object-oriented programming the black boxes from which a program is manufactured are called objects Fall 2006 Slides adapted from Java Concepts companion slides 4

Levels of Abstraction: A Real-Life Example Black boxes in a car: transmission, electronic control module, etc. Figure 1: Levels of Abstraction in Automobile Design Fall 2006 Slides adapted from Java Concepts companion slides 5

Levels of Abstraction: A Real- Life Example Users of a car do not need to understand how black boxes work Interaction of a black box with outside world is well-defined Drivers interact with car using pedals, buttons, etc. Mechanic can test that engine control module sends the right firing signals to the spark plugs For engine control module manufacturers, transistors and capacitors are black boxes magically produced by an electronics component manufacturer Fall 2006 Slides adapted from Java Concepts companion slides 6 Continued

Levels of Abstraction: A Real- Life Example Encapsulation leads to efficiency: Mechanic deals only with car components (e.g. electronic control module), not with sensors and transistors Driver worries only about interaction with car (e.g. putting gas in the tank), not about motor or electronic control module Fall 2006 Slides adapted from Java Concepts companion slides 7

Levels of Abstraction: Software Design Figure 2: Levels of Abstraction in Software Design Fall 2006 Slides adapted from Java Concepts companion slides 8

Levels of Abstraction: Software Design Old times: computer programs manipulated primitive types such as numbers and characters Manipulating too many of these primitive quantities is too much for programmers and leads to errors Solution: Encapsulate routine computations to software black boxes Continued Fall 2006 Slides adapted from Java Concepts companion slides 9

Levels of Abstraction: Software Design Abstraction used to invent higher-level data types In object-oriented programming, objects are black boxes Encapsulation: Programmer using an object knows about its behavior, but not about its internal structure Continued Fall 2006 Slides adapted from Java Concepts companion slides 10

Levels of Abstraction: Software Design In software design, you can design good and bad abstractions with equal facility; understanding what makes good design is an important part of the education of a software engineer First, define behavior of a class; then, implement it Fall 2006 Slides adapted from Java Concepts companion slides 11

Self Check 1. In Chapters 1 and 2, you used System.out as a black box to cause output to appear on the screen. Who designed and implemented System.out? 2. Suppose you are working in a company that produces personal finance software. You are asked to design and implement a class for representing bank accounts. Who will be the users of your class? Fall 2006 Slides adapted from Java Concepts companion slides 12

Answers 1. The programmers who designed and implemented the Java library 2. Other programmers who work on the personal finance application Fall 2006 Slides adapted from Java Concepts companion slides 13

Designing the Public Interface of a Class Behavior of bank account (abstraction): deposit money withdraw money get balance Fall 2006 Slides adapted from Java Concepts companion slides 14

Designing the Public Interface of a Class: Methods Methods of BankAccount class: deposit withdraw getbalance We want to support method calls such as the following: harryschecking.deposit(2000); harryschecking.withdraw(500); System.out.println(harrysChecking.getBalance()); Fall 2006 Slides adapted from Java Concepts companion slides 15

Designing the Public Interface of a Class: Method Definition access specifier (such as public) return type (such as String or void) method name (such as deposit) list of parameters (double amount for deposit) method body in { } Continued Fall 2006 Slides adapted from Java Concepts companion slides 16

Designing the Public Interface of a Class: Method Definition Examples public void deposit(double amount) {... } public void withdraw(double amount) {... } public double getbalance() {... } Fall 2006 Slides adapted from Java Concepts companion slides 17

Syntax 3.1: Method Definition accessspecifier returntype methodname(parametertype parametername,...) { method body } Example: public void deposit(double amount) {... } Purpose: To define the behavior of a method Fall 2006 Slides adapted from Java Concepts companion slides 18

Designing the Public Interface of a Class: Constructor Definition A constructor initializes the instance variables Constructor name = class name public BankAccount() { // body--filled in later } Continued Fall 2006 Slides adapted from Java Concepts companion slides 19

Designing the Public Interface of a Class: Constructor Definition Constructor body is executed when new object is created Statements in constructor body will set the internal data of the object that is being constructed All constructors of a class have the same name Compiler can tell constructors apart because they take different parameters Fall 2006 Slides adapted from Java Concepts companion slides 20

Syntax 3.2: Constructor Definition accessspecifier ClassName(parameterType parametername,...) { constructor body } Example: public BankAccount(double initialbalance) {... } Purpose: To define the behavior of a constructor Fall 2006 Slides adapted from Java Concepts companion slides 21

BankAccount Public Interface The public constructors and methods of a class form the public interface of the class. public class BankAccount { // Constructors public BankAccount() { // body--filled in later } public BankAccount(double initialbalance) { // body--filled in later } // Methods public void deposit(double amount) Continued Fall 2006 Slides adapted from Java Concepts companion slides 22

BankAccount Public Interface } { } // body--filled in later public void withdraw(double amount) { // body--filled in later } public double getbalance() { // body--filled in later } // private fields--filled in later Fall 2006 Slides adapted from Java Concepts companion slides 23

Syntax 3.3: Class Definition accessspecifier class ClassName { constructors methods fields } Example: public class BankAccount { public BankAccount(double initialbalance) {... } public void deposit(double amount) {... }... } Purpose: To define a class, its public interface, and its implementation details Fall 2006 Slides adapted from Java Concepts companion slides 24

Self Check 1. How can you use the methods of the public interface to empty the harryschecking bank account? 2. Suppose you want a more powerful bank account abstraction that keeps track of an account number in addition to the balance. How would you change the public interface to accommodate this enhancement? Fall 2006 Slides adapted from Java Concepts companion slides 25

Answers 1. harryschecking.withdraw(harryschecking.getbalance()) 2. Add an accountnumber parameter to the constructors, and add a getaccountnumber method. There is no need for a setaccountnumber method the account number never changes after construction. Fall 2006 Slides adapted from Java Concepts companion slides 26

Commenting on the Public Interface /** Withdraws money from the bank account. @param amlount the amount to withdraw */ public void withdraw(double amount) { // implementation filled in later } /** Gets the current balance of the bank account. @return the current balance */ public double getbalance() { // implementation filled in later } Fall 2006 Slides adapted from Java Concepts companion slides 27

Class Comment /** A bank account has a balance that can be changed by deposits and withdrawals. */ public class BankAccount {... } Provide documentation comments for every class every method every parameter every return value. Fall 2006 Slides adapted from Java Concepts companion slides 28

Javadoc Method Summary Figure 3: A Method Summary Generated by javadoc Fall 2006 Slides adapted from Java Concepts companion slides 29

Javadoc Method Detail Figure 4: Method Detail Generated by javadoc Fall 2006 Slides adapted from Java Concepts companion slides 30

Self Check 1. Why is the following documentation comment questionable? /** Each account has an account number. @return the account number of this account. */ int getaccountnumber() Fall 2006 Slides adapted from Java Concepts companion slides 31

Answers 1. T /** Constructs a new bank account with a given initial balance. @param accountnumber the account number for this account @param initialbalance the initial balance for this account */ 1. The first sentence of the method description should describe the method it is displayed in isolation in the summary table Fall 2006 Slides adapted from Java Concepts companion slides 32

Instance Fields An object stores its data in instance fields Field: a technical term for a storage location inside a block of memory Instance of a class: an object of the class The class declaration specifies the instance fields: public class BankAccount {... private double balance; } Fall 2006 Slides adapted from Java Concepts companion slides 33

Instance Fields An instance field declaration consists of the following parts: access specifier (such as private) type of variable (such as double) name of variable (such as balance) Each object of a class has its own set of instance fields You should declare all instance fields as private Fall 2006 Slides adapted from Java Concepts companion slides 34

Instance Fields Figure 5: Instance Fields Fall 2006 Slides adapted from Java Concepts companion slides 35

Syntax 3.4: Instance Field Declaration accessspecifier class ClassName {... accessspecifier fieldtype fieldname;... } Example: public class BankAccount {... private double balance;... } Purpose: To define a field that is present in every object of a class Fall 2006 Slides adapted from Java Concepts companion slides 36

Accessing Instance Fields The deposit method of the BankAccount class can access the private instance field: public void deposit(double amount) { double newbalance = balance + amount; balance = newbalance; } Continued Fall 2006 Slides adapted from Java Concepts companion slides 37

Accessing Instance Fields Other methods cannot: public class BankRobber { public static void main(string[] args) { BankAccount momssavings = new BankAccount(1000);... momssavings.balance = -1000; // ERROR } } Encapsulation = Hiding data and providing access through methods Fall 2006 Slides adapted from Java Concepts companion slides 38

Self Check 1. Suppose we modify the BankAccount class so that each bank account has an account number. How does this change affect the instance fields? 2. What are the instance fields of the Rectangle class? Fall 2006 Slides adapted from Java Concepts companion slides 39

Answers 1. An instance field private int accountnumber; needs to be added to the class 2. private int x; private int y; private int width; private int height; Fall 2006 Slides adapted from Java Concepts companion slides 40

Implementing Constructors Constructors contain instructions to initialize the instance fields of an object public BankAccount() { balance = 0; } public BankAccount(double initialbalance) { balance = initialbalance; } Fall 2006 Slides adapted from Java Concepts companion slides 41

Constructor Call Example BankAccount harryschecking = new BankAccount(1000); Create a new object of type BankAccount Call the second constructor (since a construction parameter is supplied) Set the parameter variable initialbalance to 1000 Set the balance instance field of the newly created object to initialbalance Return an object reference, that is, the memory location of the object, as the value of the new expression Store that object reference in the harryschecking variable Fall 2006 Slides adapted from Java Concepts companion slides 42

Implementing Methods Some methods do not return a value public void withdraw(double amount) { double newbalance = balance - amount; balance = newbalance; } Some methods return an output value public double getbalance() { return balance; } Fall 2006 Slides adapted from Java Concepts companion slides 43

Method Call Example harryschecking.deposit(500); Set the parameter variable amount to 500 Fetch the balance field of the object whose location is stored in harryschecking Add the value of amount to balance and store the result in the variable newbalance Store the value of newbalance in the balance instance field, overwriting the old value Fall 2006 Slides adapted from Java Concepts companion slides 44

Syntax 3.5: The return Statement return expression; or return; Example: return balance; Purpose: To specify the value that a method returns, and exit the method immediately. The return value becomes the value of the method call expression. Fall 2006 Slides adapted from Java Concepts companion slides 45

File BankAccount.java 01: /** 02: A bank account has a balance that can be changed by 03: deposits and withdrawals. 04: */ 05: public class BankAccount 06: { 07: /** 08: Constructs a bank account with a zero balance. 09: */ 10: public BankAccount() 11: { 12: balance = 0; 13: } 14: 15: /** 16: Constructs a bank account with a given balance. 17: @param initialbalance the initial balance 18: */ Continued Fall 2006 Slides adapted from Java Concepts companion slides 46

File BankAccount.java 19: public BankAccount(double initialbalance) 20: { 21: balance = initialbalance; 22: } 23: 24: /** 25: Deposits money into the bank account. 26: @param amount the amount to deposit 27: */ 28: public void deposit(double amount) 29: { 30: double newbalance = balance + amount; 31: balance = newbalance; 32: } 33: 34: /** 35: Withdraws money from the bank account. 36: @param amount the amount to withdraw Continued Fall 2006 Slides adapted from Java Concepts companion slides 47

File BankAccount.java 37: */ 38: public void withdraw(double amount) 39: { 40: double newbalance = balance - amount; 41: balance = newbalance; 42: } 43: 44: /** 45: Gets the current balance of the bank account. 46: @return the current balance 47: */ 48: public double getbalance() 49: { 50: return balance; 51: } 52: 53: private double balance; 54: } Fall 2006 Slides adapted from Java Concepts companion slides 48

Self Check 1. How is the getwidth method of the Rectangle class implemented? 2. How is the translate method of the Rectangle class implemented? Fall 2006 Slides adapted from Java Concepts companion slides 49

Answers 1. public int getwidth() { return width; } 1. There is more than one correct answer. One possible implementation is as follows: public void translate(int dx, int dy) { int newx = x + dx; x = newx; int newy = y + dy; y = newy; } Fall 2006 Slides adapted from Java Concepts companion slides 50

Testing a Class with JUnit Import Junit TestCase and Assert classes Wite a testing subclass of TestCase Create testing objects in setup() method Cleanup code in teardown() method Write one method for each test Run testing class as Junit from Eclipse Continued Fall 2006 Slides adapted from Java Concepts companion slides 51

Testing a Class with JUnit import junit.framework.assert; import junit.framework.testcase; public class BankAccountTest extends TestCase { private BankAccount account1; private BankAccount account2; protected void setup(){ account1 = new BankAccount(); account2 = new BankAccount(0); } protected void teardown(){ // No cleanup needed } Continued Fall 2006 Slides adapted from Java Concepts companion slides 52

Testing a Class with JUnit public void testconstructors() { Assert.assertTrue((0.0 == account1.getbalance()) Assert.assertTrue(account1.getBalance() == account2.getbalance()); } public void testdeposit() { account1.deposit(100.00); Assert.assertTrue(account1.getBalance() == 100.00); } } //... More tests here Continued Fall 2006 Slides adapted from Java Concepts companion slides 53

Systematic Testing Principles Test incrementally Test each module independently Test from simple to complex modules Know what output to expect Verify boudary cases Verify conservation properties of methods Incrementally build a test suite Re-run test suite after every code change Fall 2006 Slides adapted from Java Concepts companion slides 54

Categories of Variables Categories of variables Instance fields (balance in BankAccount) Local variables (newbalance in deposit method) Parameter variables (amount in deposit method) An instance field belongs to an object The fields stay alive until no method uses the object any longer Fall 2006 Slides adapted from Java Concepts companion slides 55

Categories of Variables In Java, the garbage collector periodically reclaims objects when they are no longer used Local and parameter variables belong to a method Instance fields are initialized to a default value, but you must initialize local variables Fall 2006 Slides adapted from Java Concepts companion slides 56

Lifetime of Variables harryschecking.deposit(500); double newbalance = balance + amount; balance = newbalance; Objects live until no longer referred to Local and parameter variables die when method ends Instance fields live until object dies Continued Fall 2006 Slides adapted from Java Concepts companion slides 57

Lifetime of Variables Figure 7: Lifetime of Variables Continued Fall 2006 Slides adapted from Java Concepts companion slides 58

Lifetime of Variables Figure 7: Lifetime of Variables Fall 2006 Slides adapted from Java Concepts companion slides 59

Self Check 1. What do local variables and parameter variables have in common? In which essential aspect do they differ? Fall 2006 Slides adapted from Java Concepts companion slides 60

Answers 1. Variables of both categories belong to methods they come alive when the method is called, and they die when the method exits. They differ in their initialization. Parameter variables are initialized with the call values; local variables must be explicitly initialized. Continued Fall 2006 Slides adapted from Java Concepts companion slides 61

Implicit and Explicit Method Parameters The implicit parameter of a method is the target object on which the method is invoked The this reference denotes the implicit parameter Fall 2006 Slides adapted from Java Concepts companion slides 62

Implicit and Explicit Method Parameters Use of an instance field name in a method denotes the instance field of the implicit parameter public void withdraw(double amount) { double newbalance = balance - amount; balance = newbalance; } Fall 2006 Slides adapted from Java Concepts companion slides 63

Implicit and Explicit Method Parameters balance is the balance of the target object to the left of the dot: momssavings.withdraw(500) means double newbalance = momssavings.balance - amount; momssavings.balance = newbalance; Fall 2006 Slides adapted from Java Concepts companion slides 64

Implicit Parameters and this Every method has one implicit parameter The implicit parameter is always called this Exception: Static methods do not have an implicit parameter (more on Chapter 9) double newbalance = balance + amount; // actually means double newbalance = this.balance + amount; Fall 2006 Slides adapted from Java Concepts companion slides 65

Implicit Parameters and this When you refer to an instance field in a method, the compiler automatically applies it to the this parameter momssavings.deposit(500); Fall 2006 Slides adapted from Java Concepts companion slides 66

Implicit Parameters and this Figure 8: The Implicit Parameter of a Method Call Fall 2006 Slides adapted from Java Concepts companion slides 67

Self Check 1. How many implicit and explicit parameters does the withdraw method of the BankAccount class have, and what are their names and types? 2. In the deposit method, what is the meaning of this.amount? Or, if the expression has no meaning, why not? 3. How many implicit and explicit parameters does the main method of the BankAccountTester class have, and what are they called? Fall 2006 Slides adapted from Java Concepts companion slides 68

Answers 1. One implicit parameter, called this, of type BankAccount, and one explicit parameter, called amount, of type double. 2. It is not a legal expression. this is of type BankAccount and the BankAccount class has no field named amount. 3. No implicit parameter the method is static and one explicit parameter, called args. Fall 2006 Slides adapted from Java Concepts companion slides 69

Electronic Voting Machines Figure 9: Punch Card Ballot Fall 2006 Slides adapted from Java Concepts companion slides 70

Electronic Voting Machines Figure 10: Touch Screen Voting Machine Fall 2006 Slides adapted from Java Concepts companion slides 71