AP CS Be able to fix a program written in Java

Slides:



Advertisements
Similar presentations
Finding Complex Roots of Quadratics
Advertisements

Chapter 5 Section 4: Complex Numbers. VOCABULARY Not all quadratics have real- number solutions. For instance, x 2 = -1 has no real-number solutions because.
EXAMPLE 4 Use the discriminant Find the discriminant of the quadratic equation and give the number and type of solutions of the equation. a. x 2 – 8x +
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Java Programming Practice.
Complex Number A number consisting of a real and imaginary part. Usually written in the following form (where a and b are real numbers): Example: Solve.
4.8 Quadratic Formula and Discriminant
Bell Ringer: Find the zeros of each function.
5.6 Complex Numbers. Solve the following quadratic: x = 0 Is this quadratic factorable? What does its graph look like? But I thought that you could.
MORE PROBLEMS. Calculate. 1. Write Java code that defines a real number called A, and gives it the value of Then define an additional number with.
Piecewise Functions Objective: Students will be able to graph, write and evaluate piecewise functions.
1 What you will learn today 1. How to evaluate piecewise functions 2. How to graph piecewise functions 3. How to determine piecewise functions from a graph.
5.6 Quadratic Equations and Complex Numbers
1. Understanding the Problem 2. Brainstorming 3. Drawing an I/O (Input/Output) diagram 4. 5-step Process (or: Small iPods Make Copying Tough) Developing.
Copyright © 2014, 2010, 2006 Pearson Education, Inc. 1 Chapter 3 Quadratic Functions and Equations.
Solving Quadratic Equations
CP104 Introduction to Programming Selection structures_2 Lecture 10 __ 1 If statement (preview version) Syntax form: if ( condition) Statements else Statements.
5.6 Quadratic Formula & Discriminant
3.8 Warm Up Write the function in vertex form (by completing the square) and identify the vertex. a. y = x² + 14x + 11 b. y = 2x² + 4x – 5 c. y = x² -
5.8 Quadratic Formula. For quadratic equations written in standard form, the roots can be found using the following formula: This is called the Quadratic.
The Quadratic Formula & Discriminant Essential question – How do you solve a quadratic equation using the Quadratic Formula?
To find time and a half rates & double time rates based on and hourly wage 1. 5 ½ =.5 = 5/10 Hourly rate X 1.5 Overtime rate 2 Hourly rate X 2__ Overtime.
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.
4.2 Quadratic Functions Objective: Solve quadratic equations. Use the discriminant to describe the roots of a quadratic equation.
Quadratic Equations. PROGRAM QuadraticEquations_1 IMPLICIT NONE REAL A, B, C, Discriminant, Root_1, Root_2 ! Get the coefficients PRINT *, "Enter the.
5-7: COMPLEX NUMBERS Goal: Understand and use complex numbers.
Textbook Problem Java – An Introduction to Problem Solving & Programming, Walter Savitch, pp.217, Problem 04.
Getting Started The objective is to be able to solve any quadratic equation by using the quadratic formula. Quadratic Equation - An equation in x that.
Notes Over 5.6 Quadratic Formula
9.2 THE DISCRIMINANT. The number (not including the radical sign) in the quadratic formula is called the, D, of the corresponding quadratic equation,.
SAT Problem of the Day. 5.6 Quadratic Equations and Complex Numbers 5.6 Quadratic Equations and Complex Numbers Objectives: Classify and find all roots.
Warm Up  1.) Write 15x 2 + 6x = 14x in standard form. (ax 2 + bx + c = 0)  2.) Evaluate b 2 – 4ac when a = 3, b = -6, and c = 5.
SOLVE QUADRATIC EQUATIONS BY USING THE QUADRATIC FORMULA. USE THE DISCRIMINANT TO DETERMINE THE NUMBER AND TYPE OF ROOTS OF A QUADRATIC EQUATION. 5.6 The.
The Quadratic Formula & Discriminant
The Quadratic Formula..
Solving quadratics methods
Do Now – Take out your homework. Take You have 5 minutes.
How much should I get for working??…
PreCalculus 1st Semester
Complex integers? Here a and b are integers.
Solve an equation with two real solutions
Each instruction on a separate line
For Monday Read WebCT quiz 18.
Math 20-1 Chapter 4 Quadratic Equations
Program options Write a program for one of the following
Java Fix a program that has if Online time for Monday’s Program
Unit 7 Day 4 the Quadratic Formula.
5.9 The Quadratic Formula 12/11/2013.
Zeros to Quadratic Functions
AP Java Review If else.
3.2 Complex Numbers.
Java Fix a program that has if Online time for Monday’s Program
Quadratic Formula & the Discriminant
Review: Simplify.
Solving Equations Involving Decimals
Let’s all Repeat Together
AP Java 9/21/2018.
AP Java Review If else.
CS150 Introduction to Computer Science 1
Chapter 3 Quadratic Equations
CS150 Introduction to Computer Science 1
Using the Quadratic Formula to Solve Quadratic Equations
  Warm Up:.
F&P 10 Earning Extra Income.
Program options Write a program for one of the following
Quadratic Formula & Discriminant
Bell Work: Machine Lab What is the equation to find Input Work? (look at note guide from yesterday) Calculate the input work for your ramp in trial 1.
©2009 – Not to be sold/Free to use
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
Presentation transcript:

AP CS 9-19-2016 Be able to fix a program written in Java Be able to write a program that uses if else

Fix9-19-2016.java on the class website Fix the following Fix9-19-2016.java on the class website You might need to to this to BlueJ. BlueJ is in the Program Files(x86) filder.

Programs: Complete the following. Modify the quadratic equation program to also calculate imaginary roots. If b2 – 4ac >= 0 then display the real roots Else show the imaginary roots Input three real numbers, and print the numbers in sorted order. Write a program that inputs a persons name, rate of pay, and the number of hours worked during the week. The program will calculate the pay for the person. For every hour of overtime work (over 40 hours in the week) the person gets paid 150 percent of the regular wage. Example: Input: Sue, $10.00 per hour rate, 45 hours Calculation: pay = 10*40 + 1.5*10*5 = $475 Input a value representing a person’s percent score (example inputting 80 represents an 80% score), write a program that will output the corresponding letter grade. ‘A’ for 90-100, ‘B’ for 80 to 89, etc.