© Copyright 1992-2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Enhancing the Wage Calculator Application.

Slides:



Advertisements
Similar presentations
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Security Panel Application Introducing.
Advertisements

© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 10 – Enhancing the Wage Calculator Application:
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 13 – Salary Survey Application: Introducing.
Basic Java – Interface design. Understand: How to use TextPad for Java How to define classes and objects How to create a GUI interface How event-driven.
 2005 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 2002 Prentice Hall, Inc. All rights reserved. Chapter 14 – Exception Handling Outline 14.1 Introduction 14.2 When Exception Handling Should Be Used 14.3.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 15.1 Test-Driving the Craps Game Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 14.1 Test-Driving the Fund Raiser Application.
1 Lecture 4: Chapter 6 - Methods Outline Introduction Program Modules in Java Math -Class Methods Method Declarations Java API Packages Random-Number Generation.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 8 - Interest Calculator Application: Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Objectives –Display a date and time. –Use a JPasswordField.
1 Class 8. 2 Chapter Objectives Use Swing components to build the GUI for a Swing program Implement an ActionListener to handle events Add interface components.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 6.1 Test-Driving the Wage Calculator Application.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 9 Car Payment Calculator Application Introducing the Do While...Loop and Do Until...Loop.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 16.1 Test-Driving the Flag Quiz Application.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 2 - Welcome Application: Introduction to C++
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 8 - Interest Calculator Application: Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 20.1 Test-Driving the Screen Saver Application.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 10 – Enhancing the Wage Calculator Application:
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Enhancing the Wage Calculator Application Introducing Function Procedures and.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 7.1 Test-Driving the Wage Calculator Application.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Wage Calculator Application: Introducing.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 5 – Dental Payment Application: Introducing.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 8 Dental Payment Application Introducing CheckBox es and Message Dialogs.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 9 – Income Tax Calculator Application: Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 18.1 Test-Driving the Microwave Oven Application.
GUI Clients 1 Enterprise Applications CE00465-M Clients with Graphical User Interfaces.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 19.1 Test-Driving the Shipping Hub Application.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Security Panel Application Introducing the Select Case Multiple-Selection Statement.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 23.1 Test-Driving the Screen Scraping Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 25 – Ticket Information Application Introducing.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Class Average Application Introducing the Do...Loop While and Do...Loop Until.
1 CSE1340 Class 4. 2 Objectives Write a simple computer program in Java Use Swing components to build the GUI Use proper naming conventions for classes.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 7 – Class Average Application: Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 22.1 Test-Driving the Typing Skills Developer.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 21.1 Test-Driving the Painter Application.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Functions Outline 5.1Introduction 5.2Program Modules.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 8.1 Test-Driving the Car Payment Calculator.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 15 – Fund Raiser Application Introducing.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 11.1 Test-Driving the Security Panel Application.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 3 – Inventory Application: Introducing Variables,
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 10.1 Test-Driving the Interest Calculator.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Enhanced Car Payment.
Chapter 11 - A GUI Interacting With a Problem Domain Class1 Chapter 11 A GUI Interacting With a Problem Domain Class 11.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 13.1 Test-Driving the Enhanced Interest Calculator.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 2 – Welcome Application Introduction to Graphical.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 27.1 Test-Driving the Drawing Shapes Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 4 – Completing the Inventory Application.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Enhanced Inventory Application.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 25 - Beyond C & C++: Operators, Methods, and.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 6 – Methods Part I.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 6 - Methods Outline 6.1 Introduction 6.2 Program Modules in Java 6.3 Math -Class Methods 6.4.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 17.1 Test-Driving the Student Grades Application.
Lesson 28: More on the GUI button, frame and actions.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 28.1 Java Speech API 28.2 Downloading and.
 2003 Prentice Hall, Inc. All rights reserved. 1 Outline 11.1 Test-Driving the Interest Calculator Application 11.2 Essentials of Counter-Controlled Repetition.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 7.1 Test-Driving the Dental Payment Application.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 7 ( Book Chapter 14) GUI and Event-Driven Programming.
Chapter 14 – Exception Handling
“Form Ever Follows Function” Louis Henri Sullivan
13 Enhancing the Wage Calculator App
Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline Test-Driving the Microwave Oven Application Designing.
CiS 260: App Dev I Chapter 6: GUI and OOD.
Presentation transcript:

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Enhancing the Wage Calculator Application Introducing Methods Outline 12.1 Test-Driving the Enhanced Wage Calculator Application 12.2 Classes and Methods 12.3Method Declarations 12.4Finishing the Maximum Application 12.5Using Methods in the Wage Calculator Application 12.6Using the Debugger: Controlling Execution Using the step, step up and next Commands 12.7Wrap-Up

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 2 Objectives In this tutorial, you will learn to: –Construct applications modularly from pieces called methods. –Work with “built-in” methods. –Create your own methods.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test Driving the Enhanced Wage Calculator Application

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Test Driving the Enhanced Wage Calculator Application (Cont.) Figure 12.1 Wage Calculator executing. Enter 10 in the Hourly wage: JTextField Enter 45 in the Hours worked: JTextField Click the Calculate JButton

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Classes and Methods Methods –Programmer-declared classes and methods –Pre-declared classes and methods –Code reuse –Divide and conquer Construct an application from smaller, more manageable pieces

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Classes and Methods (Cont.)

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations Pythagorean theorem –The sum of the squares of the two smaller sides equals the square of the largest side (hypotenuse) of a right triangle Declaring a method –Method name –Return type –Parameter list (parameters) –Method header –Method body –Method declaration –Return statement / return keyword

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.3 Running the Hypotenuse Calculator application.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.4 Hypotenuse Calculator template code. Lengths for sides A and B Message dialog displays if negative value (or zero) is entered

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.5 Declaring method square. Method name: square Return type: double Parameter list: A double named side Method headerA right brace marks the end of a method declaration

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.6 Coding the square method. The return statement returns the value of side * side The return statement sends a value back to the method’s caller

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.7 Hypotenuse Calculator application updated.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.8 Invoking the square method. Call a method by using the method name followed by a set of parentheses containing the method’s argument ( sideA and sideB ) Calling method square for each side

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Invoking a method –A method is invoked by a method call Method call specifies the method name and arguments that the callee (method being called) receives in parameters –When a method is complete Return control to the caller (calling method)

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure 12.9 Completing the calculateJButtonActionPerformed method. Format and display the length of the hypotenuse Calling Math method sqrt The Math.sqrt method returns the square root of its argument

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Method Declarations (Cont.) Figure Running the completed Hypotenuse Calculator application.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Finishing the Maximum Application Figure Maximum application executing.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Finishing the Maximum Application (Cont.) Figure Invoking the determineMaximum method. Store user input Calling method determineMaximum

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Finishing the Maximum Application (Cont.) Figure Declaring the determineMaximum method. Empty method determineMaximum Arguments: three values of which to determine maximum Return value: double containing maximum value

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Finishing the Maximum Application (Cont.) Figure Math.max returns the larger of its two arguments. Return maximum of all three values Calling Math.max twice to determine the maximum of three values Use the Math.max method

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Finishing the Maximum Application (Cont.) Figure Maximum application executing.

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Methods in the Wage Calculator Application Figure calculateJButtonActionPerformed calls the calculatePay method. Format and display the total wage Store user input Call to method calculatePay

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Methods in the Wage Calculator Application (Cont.) Figure Declaring the calculatePay method. Method headerReturn wages for the week Calculate gross wages based on the number of hours worked

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using Methods in the Wage Calculator Application (Cont.) Figure Wage Calculator application executing.

 2004 Prentice Hall, Inc. All rights reserved. Outline 25 WageCalculator.java (1 of 7) 1 // Tutorial 12: WageCalculator.java 2 // This application inputs the hourly wage and number of hours 3 // worked for an employee, then calculates the employee's gross 4 // wages (with overtime for hours worked over 40 hours). 5 import java.awt.*; 6 import java.awt.event.*; 7 import javax.swing.*; 8 import java.text.*; 9 10 public class WageCalculator extends JFrame 11 { 12 // JLabel and JTextField for wage per hour 13 private JLabel hourlyWageJLabel; 14 private JTextField hourlyWageJTextField; // JLabel and JTextField for hours worked in a week 17 private JLabel hoursWorkedJLabel; 18 private JTextField hoursWorkedJTextField; // JLabel and JTextField for gross wages 21 private JLabel grossWagesJLabel; 22 private JTextField grossWagesJTextField; // JButton to initiate wage calculation 25 private JButton calculateJButton;

 2004 Prentice Hall, Inc. All rights reserved. Outline 26 WageCalculator.java (2 of 7) // no-argument constructor 28 public WageCalculator() 29 { 30 createUserInterface(); 31 } // create and position GUI components; register event handlers 34 public void createUserInterface() 35 { 36 // get content pane for attaching GUI components 37 Container contentPane = getContentPane(); // enable explicit positioning of GUI components 40 contentPane.setLayout( null ); // set up hourlyWageJLabel 43 hourlyWageJLabel = new JLabel(); 44 hourlyWageJLabel.setBounds( 16, 16, 90, 21 ); 45 hourlyWageJLabel.setText( "Hourly wage:" ); 46 contentPane.add( hourlyWageJLabel ); 47

 2004 Prentice Hall, Inc. All rights reserved. Outline 27 WageCalculator.java (3 of 7) 48 // set up hourlyWageJTextField 49 hourlyWageJTextField = new JTextField(); 50 hourlyWageJTextField.setBounds( 120, 16, 90, 21 ); 51 hourlyWageJTextField.setHorizontalAlignment( 52 JTextField.RIGHT ); 53 contentPane.add( hourlyWageJTextField ); // set up hoursWorkedJLabel 56 hoursWorkedJLabel = new JLabel(); 57 hoursWorkedJLabel.setBounds( 16, 56, 90, 21 ); 58 hoursWorkedJLabel.setText( "Hours worked:" ); 59 contentPane.add( hoursWorkedJLabel ); // set up hoursWorkedJTextField 62 hoursWorkedJTextField = new JTextField(); 63 hoursWorkedJTextField.setBounds( 120, 56, 90, 21 ); 64 hoursWorkedJTextField.setHorizontalAlignment( 65 JTextField.RIGHT ); 66 contentPane.add( hoursWorkedJTextField ); // set up grossWagesJLabel 69 grossWagesJLabel = new JLabel(); 70 grossWagesJLabel.setBounds( 16, 96, 90, 21 ); 71 grossWagesJLabel.setText( "Gross wages:" ); 72 contentPane.add( grossWagesJLabel );

 2004 Prentice Hall, Inc. All rights reserved. Outline 28 WageCalculator.java (4 of 7) // set up grossWagesJTextField 75 grossWagesJTextField = new JTextField(); 76 grossWagesJTextField.setBounds( 120, 96, 90, 21 ); 77 grossWagesJTextField.setHorizontalAlignment( 78 JTextField.RIGHT ); 79 grossWagesJTextField.setEditable( false ); 80 contentPane.add( grossWagesJTextField ); // set up calculateJButton 83 calculateJButton = new JButton(); 84 calculateJButton.setBounds( 120, 136, 90, 24 ); 85 calculateJButton.setText( "Calculate" ); 86 contentPane.add( calculateJButton ); 87 calculateJButton.addActionListener( new ActionListener() // anonymous inner class 90 { 91 // event handler called when calculateJButton clicked 92 public void actionPerformed ( ActionEvent event ) 93 { 94 calculateJButtonActionPerformed( event ); 95 } } // end anonymous inner class

 2004 Prentice Hall, Inc. All rights reserved. Outline 29 WageCalculator.java (5 of 7) ); // end call to addActionListener // set properties of application's window 102 setTitle( "Wage Calculator" ); // set title bar string 103 setSize( 230, 200 ); // set window size 104 setVisible( true ); // display window } // end method createUserInterface // get user input and call displayPay 109 private void calculateJButtonActionPerformed( ActionEvent event ) 110 { 111 // get hourly wage 112 double hourlyWage = 113 Double.parseDouble( hourlyWageJTextField.getText() ); // get number of hours worked this week 116 double hoursWorked = 117 Double.parseDouble( hoursWorkedJTextField.getText() ); // gross wages for week; returned from method calculatePay 120 double totalWages = calculatePay( hoursWorked, hourlyWage ); 121 Calling method calculatePay Initializing variables

 2004 Prentice Hall, Inc. All rights reserved. Outline 30 WageCalculator.java (6 of 7) 122 // specify output format 123 DecimalFormat dollars = new DecimalFormat( "$0.00" ); // display gross wages 126 grossWagesJTextField.setText( dollars.format( totalWages ) ); } // end method calculateJButtonActionPerformed // calculate and display wages in grossWagesJTextField 131 private double calculatePay( double hours, double wages ) 132 { 133 // gross wages for week; calculated in if...else statement 134 double total; // constant for maximum hours employee can 137 // work before being paid for overtime 138 final double HOUR_LIMIT = 40.0; // declare constant // determine gross wages 141 if ( hours <= HOUR_LIMIT ) 142 { 143 // regular wages for HOUR_LIMIT (40) hours or less 144 total = wages * hours; 145 } Formatting and displaying value returned from the calculatePay method Method calculatePay takes two double parameters, returns a double Variable total will contain user’s wages for the week Overtime for more than 40 hours worked Calculate standard pay

 2004 Prentice Hall, Inc. All rights reserved. Outline 31 WageCalculator.java (7 of 7) 146 else // worked more than HOUR_LIMIT (40) hours 147 { 148 // wages for first 40 hours with time and a half added 149 total = ( wages * HOUR_LIMIT ) + ( hours - HOUR_LIMIT ) * 150 ( 1.5 * wages ); 151 } return total; } // end method calculatePay // main method 158 public static void main( String[] args ) 159 { 160 WageCalculator application = new WageCalculator(); 161 application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); } // end method main } // end class WageCalculator Calculate overtime pay Return total to calling method Closing brace ends method body

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using the Debugger: Controlling execution using step, step up and next commands Figure Setting a breakpoint in the Wage Calculator application. Setting a breakpoint Starting the debugger

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 33 Figure Running the Wage Calculator application. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Running the application

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 34 Figure Reaching the breakpoint in the Wage Calculator application. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Reaching a breakpoint

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Step –Execute the next statement in the application stepUp –Execute the statements in the method and return control to the place where the method was called next –Like the step command, but if the next statement is a method call, execute the entire method

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 36 Figure Stepping into the calculatePay method. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Application currently paused at line 138 in method calculatePay Stepping through an application

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 37 Figure Stepping out of a method. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Executing remaining statements in current method

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 38 Figure Reaching the breakpoint in the Wage Calculator application. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.)

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 39 Figure Stepping over a method call. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.) Using the next command

© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 40 Figure Exiting the debugger. 12.6Using the Debugger: Controlling execution using step, step up and next commands (Cont.)