CS-0401 INTERMEDIATE PROGRAMMING USING JAVA

Slides:



Advertisements
Similar presentations
CS 206 Introduction to Computer Science II 01 / 21 / 2009 Instructor: Michael Eckmann.
Advertisements

Lecturer: Dr. AJ Bieszczad Chapter 76-1 Software engineering standards Standards for you Standards for others Matching design with implementation.
1 Interactive Applications (CLI) and Math Interactive Applications Command Line Interfaces The Math Class Example: Solving Quadratic Equations Example:
Many quadratic equations can not be solved by factoring. Other techniques are required to solve them. 7.1 – Completing the Square x 2 = 20 5x =
7.1 – Completing the Square
13-1 Introduction to Quadratic Equations  CA Standards 14.0 and 21.0  Quadratic Equations in Standard Form.
Sec 5.6 Quadratic Formula & Discriminant Quadratic Formula (Yes, it’s the one with the song!) If ax 2 + bx + c = 0 and a ≠ 0, then the solutions (roots)
Warm up – Solve by Taking Roots. Solving by the Quadratic Formula.
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA Prof. Dr. Paulo Brasko Ferreira Fall 2014.
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA Prof. Dr. Paulo Brasko Ferreira Fall 2014.
Goals: To solve quadratic equations by using the Quadratic Formula.
SOLVING QUADRATIC EQUATIONS Unit 7. SQUARE ROOT PROPERTY IF THE QUADRATIC EQUATION DOES NOT HAVE A “X” TERM (THE B VALUE IS 0), THEN YOU SOLVE THE EQUATIONS.
Solving Quadratic Equations – Part 1 Methods for solving quadratic equations : 1. Taking the square root of both sides ( simple equations ) 2. Factoring.
Review How do we solve quadratic equations? 1.) Factoring using “Bottoms Up” 2.) if its not factorable by “Completing the Square”
Chapter 10.7 Notes: Solve Quadratic Equations by the Quadratic Formula Goal: You will solve quadratic equations by using the Quadratic Formula.
Learning Task/Big Idea: Students will learn how to find roots(x-intercepts) of a quadratic function and use the roots to graph the parabola.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
The Quadratic Formula & Discriminant Essential question – How do you solve a quadratic equation using the Quadratic Formula?
WARM UP WHAT TO EXPECT FOR THE REST OF THE YEAR 4 May The Discriminant May 29 Chapter Review May 30 Review May 31 Chapter 9 Test June Adding.
5-5 Solving Quadratic Equations Objectives:  Solve quadratic equations.
Pre-Calculus Lesson 5: Solving Quadratic Equations Factoring, quadratic formula, and discriminant.
Quadratic Formula You can use this formula to find the solutions(roots) to a quadratic equation. This formula can be broken up into 2 parts: b 2 – 4ac.
The Quadratic Formula Students will be able to solve quadratic equations by using the quadratic formula.
Bell Work Solve the Equation by Factoring or using Square Roots: Solve the equation by using the quadratic formula: 3. Identify the parts of a parabola:
Chapter 3: Developing Class Methods Object-Oriented Program Development Using Java: A Class-Centered Approach.
Warm-Up: Solve each equation. Essential Question  How do I use the quadratic formula?
Solve by factoring. x² = - 4 – 5x 2,. Solve by factoring. n² = -30 – 11n -4 and -1.
2.1 – Linear and Quadratic Equations Linear Equations.
Notes Over 5.6 Quadratic Formula
Chapter 4: Polynomial and Rational Functions. 4-2 Quadratic Equations For a quadratic equation in the form ax 2 + bx + c = 0 The quadratic Formula is.
CHAPTER 10 LESSON OBJECTIVES. Objectives 10.1 Students will be able to: Identify quadratic functions and determine whether they have a minimum or maximum.
Factoring & Solving Quadratics Equations Intermediate Algebra Final Exam Review.
Solving Quadratic Functions by Factoring. Factoring Review.
Concept 25 Learning Target: I can solve quadratics by using the quadratic formula.
Lesson 6.5: The Quadratic Formula and the Discriminant, pg. 313 Goals: To solve quadratic equations by using the Quadratic Formula. To use the discriminant.
9.4 Solving Quadratic Equations Standard Form: How do we solve this for x?
Chapter 4 Quadratic Equations
1.2 Quadratic Equations. Quadratic Equation A quadratic equation is an equation equivalent to one of the form ax² + bx + c = 0 where a, b, and c are real.
2.3 Output Formatting. Outputting Format Specify the number of spaces, “c”, used to print an integer value with specifier %cd, e.g., %3d, %4d. E.g. printf.
Review for Test2. Scope 8 problems, 60 points. 1 Bonus problem (5 points) Coverage: – Test 1 coverage – Exception Handling, Switch Statement – Array of.
How do I solve quadratic equations using Quadratic Formula?
4.6 Quadratic formula.
Lesson 5.6: The Quadratic Formula & the Discriminant
The Quadratic Formula & Discriminant
Warm up – Solve by Taking Roots
INTERMEDIATE PROGRAMMING USING JAVA
3 Introduction to Classes and Objects.
Quadratic Functions, Quadratic Expressions, Quadratic Equations
4.6 Quadratic formula.
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
INTERMEDIATE PROGRAMMING USING JAVA
A quadratic equation is written in the Standard Form,
Solving Quadratic Equations by Graphing
5.6 The Quadratic Formula and the Discriminant
4.8 The Quadratic Formula and the Discriminant
Unit 7 Day 4 the Quadratic Formula.
Warm up – Solve by Completing the Square
CS-0401 INTERMEDIATE PROGRAMMING USING JAVA
Zeros to Quadratic Functions
Solving Quadratic Equations by Factoring
Quadratic Formula & the Discriminant
Review: Simplify.
Quadratic Equations.
Algebra 9.6 The Discriminant.
Chapter 8 Systems of Equations
Section 4.7 – Quadratic Formula
Using the Quadratic Formula to Solve Quadratic Equations
Solving Special Cases.
  Warm Up:.
QUADRATIC FUNCTION PARABOLA.
Presentation transcript:

CS-0401 INTERMEDIATE PROGRAMMING USING JAVA Prof. Dr. Paulo Brasko Ferreira Fall 2014

Chapter 5 Methods

Chapter 5 Presentation Outline Introduction to Methods Passing Arguments to a Method More About Local Variables Returning a Value from a Method Problem Solving with Methods This class will be mostly hands on, using NetBeans and the PC projector

Introduction to Methods

Introduction to Methods What is best for my company? Having a single person to handle all the tasks? Having a team of specialized persons in each area?

Introduction to Methods What is best for my program? To have a single main() method that handles all code tasks To have many methods, each one handling a specific code task

Developing a program that finds the roots of a quadratic equation

Quadratic Equation Solver Requirements: Input: - via command line (e.g., “java myProgram 2 3 4”) - user must provide three real numbers a, b, and c Output: - the roots of the about equation, i.e., the values of x that makes the above equation equals to zero

Discriminants vs Parabola Types Quadratic Formula Discriminants vs Parabola Types

Implementing the code QuadraticEquationSolver: all functionality inside the main() method QuadraticEquationSolver2: splitting the functionality in many methods, which are called by the main() method

Main Points to Talk About Method names (e.g., calculateTaxes()) Method modifiers (e.g., private static) Private, public, protected, static, final Method input arguments Void, list of arguments Method returning values Void, a single output type Calling methods With and without input arguments (primitive data are passed by value; objects are passed by reference) With and without returning type Documenting methods Variable scopes Throwing Exceptions

That’s an order Soldier! Essential Reading It is essential for you to read the supplemental power point presentation called CSO_Gaddis_Java_Chapter5.ppt That’s an order Soldier!

That’s the End of Chapter 5

Any Questions?