3 length + 23 size = 2
|
|
- Elvin Harvey
- 8 years ago
- Views:
Transcription
1 This pledged exam is closed textbook, open class web site, and two pieces of paper with notes. You may not access any other code or websites including your own. Write your id and name on every page of the test. The only window to be open on your computer is a single browser. Whenever you are writing a message method as your answer to an exercise, there is a grading preference for the use of the this variable and inspectors and mutators when appropriate. Pledge: Warm up 1. Write a complete program Shoe.java that prompts its user for the length of the user s foot in centimeters. The program reports the person s metric shoe size. Metric shoe size can be approximated as follows: 3 length + 23 size = 2, are the mathematical symbols for casting a decimal value to an integer. The following where demonstrates a sample run. Enter foot length (centimeters): 29.5 Metric shoe size: 39 import java.util.*; public class Shoe { public static void main( String[] args ) { Page 1 of 14
2 2. Suppose x and y are initialized object variables of the same type (e.g., they are both Color variables). Complete the initialization of boolean variable b so that it indicates whether x and y reference the same object. boolean b = ; 3. Suppose x and y are initialized object variables of the same type (e.g., they are both Color variables). Complete the initialization of boolean variable b so that it indicates whether x and y reference objects with like attributes. boolean b = ; Adding functionality to existing classes 4. Define a void message method absolute() that is to be part of the class Calculator. The method updates the total of its calculator to its absolute value. The following code segment demonstrates its usage. Calculator c = new Calculator(); c.add( -7 ); // running total is now -7 c.absolute(); // running total is now 7 public void absolute() { 5. Define a void message method square() that is to be part of the class Calculator. The method updates the total of its calculator to be the square of its current value. The following code segment demonstrates its usage. Calculator c = new Calculator(); c.add( 7 ); // running total is now 7 c.square(); // running total is now 49 public void square() { Page 2 of 14
3 6. Define a Rational message method invert() that is to be part of the class Rational. The method returns a new Rational that is a flipping of its rational; i.e., its numerator becomes the new Rational s denominator and its denominator becomes the new Rational s numerator. The following code segment demonstrates its usage. Rational a = new Rational( 3, 5 ); // a is 3 / 5 Rational b = a.invert(); // b is 5 / 3 public Rational invert() { 7. Define a void message method reduce() that is to be part of the class Rational. The method takes one int parameter v. If v is a factor of both its numerator and the denominator, then the method divides both of them by v. If instead v is not a common factor, then no changes are made to its numerator and denominator. The following code segment demonstrates its usage. Rational a = new Rational( 6, 9 ); // a is 6 / 9 a.reduce( 7 ); // a is 6 / 9 as 7 is not a common factor a.reduce( 3 ); // a is 2 / 3 as 3 is a common factor public void reduce( int v ) { Page 3 of 14
4 8. Define a void message method swap() that is to be part of the class Rational. The method takes one Rational parameter r. The method swaps the numerator and denominator of its rational with Rational r. The following code segment demonstrates its usage. Rational a = new Rational( 6, 9 ); // a is 6 / 9 Rational b = new Rational( 3, 4 ); // b is 3 / 4 a.swap( b ); // a is 3 / 4 and b is 6 / 9 public void swap( Rational r ) { 9. Define a boolean message method isolderthan() that is to be part of the class Song. The method takes one Song parameter s and returns whether its song has an earlier recording year than Song s. The following code segment demonstrates its usage. Song s1 = new Song( n1, p1, y1 ); Song s2 = new Song( n2, p2, y2 ); boolean b = s1.isolder( s2 ); // is s1 recorded earlier than s2 public boolean isolderthan( Song s ) { Page 4 of 14
5 10. Define a boolean message method atmorethan() that is to be part of the class Movie. The method takes one Movie parameter m and returns whether its movie is playing at more theaters than Movie m. The following code segment demonstrates its usage. Movie m1 = new Movie( "Water for Elephants" ); Movie m2 = new Movie( "Thor" );... boolean b = m1.atmorethan( m2 ); // is m1 at more theaters than m2 public boolean atmorethan( Movie m ) { Library methods 11. Write an int library method factorial() that takes one int parameter n. The loop- based method returns n!; i.e., 1 * 2 * 3 * * n. The following code segment demonstrates its usage. int v = factorial( 5 ); // v is 120; i.e., 1 * 2 * 3 * 4 * 5 public static int factorial( int n ) { Page 5 of 14
6 12. Write an int library method choose() that takes two int parameter n and k. The method returns n! / (k! * (n - k)! ) The following code segment demonstrates its usage. int a = choose( 2, 2 ); // is 1 int b = choose( 3, 2 ); // is 3 int c = choose( 4, 2 ); // is 6 public static int choose( int n, int k ) { 13. Write a recursive int library method gcd() that takes two int parameter x and y and returns their greatest common divisor. If y is zero, the greatest common divisor of x and y equals x. If y is not zero, the greatest common divisor of x and y equals the greatest common divisor of y and r, where r is the remainder of x divided by y. The following code segment demonstrates its usage. int n = gcd( 72, 54 ); // is 18 public static int gcd( int x, int y ) { Page 6 of 14
7 14. Write a recursive int library method choose() that takes two int parameter n and k and returns the number of ways subsets of size k can be made from a set of size n. If k is 0, then the number of ways of making the subsets is 1. Otherwise, if n is 0, then the number of ways of making the subsets is 0; Otherwise, the number of ways of making the subsets is the sum of two quantities: o o The number of ways subsets of size k 1 can be made from a set of size n 1; The number of ways subsets of size k can be made from a set of size n 1. The following code segment demonstrates its usage. int a = choose( 2, 2 ); // is 1 int b = choose( 3, 2 ); // is 3 int c = choose( 4, 2 ); // is 6 public static int choose( int n, int k ) { Library methods for array manipulation 15. Write an int library method product() that takes one int[] parameter x. The method returns the product of the element values. The following code segment demonstrates its usage. int[] a = { 3, 1, 4, 1, 5, 9 }; int p = product( a ); // p is 540; i.e., 3 * 1 * 4 * 1 * 5 * 9 public static int product( int[] x ) { Page 7 of 14
8 16. Write a boolean library method gotit() that takes a single int[] parameter x and one int parameter v. The method returns whether any of the elements in x are equal to v. The following code segment demonstrates its usage. int[] a = { 3, 1, 4, 1, 5, 9 }; boolean b1 = gotit( a, 4 ); // b1 is true, because x has a 4 boolean b2 = gotit( a, 8 ); // b2 is false, because x does not have a 8 public static boolean gotit( int[] x, int v ) { 17. Write a boolean library method isincreasing() that takes a single int[] parameter x. The method returns whether the element values for array x are in strictly increasing order. int[] a = { 3, 1, 4 }; int[] b = { 1, 3, 3, 4 } int[] c = { 1, 3, 4, 5, 9 }; boolean b1 = isincreasing( a ); // is false as 3 >= 1 boolean b2 = isincreasing( b ); // is false as 3 >= 3 boolean b3 = isincreasing( c ); // is true as 1 < 3 < 4 < 5 < 9 public static boolean isincreasing( int[] x ) { Page 8 of 14
9 18. Write a int[] library method glue() that takes a two int[] parameters x and y (the arrays can have different numbers of elements). The method returns a new int[] array whose length is the sum of the lengths of arrays x and y. The initial elements in the new array are to come from x and the remaining elements are to come from y. Suggestion: use two while loops. int[] a = { 3, 1, 4 }; int[] b = { 1, 5, 9, 2 }; int[] c = glue( a, b ); // c is 3, 1, 4, 1, 5, 9, 2 public static int[] glue( int[] x, int[] y ) { 19. Write an int library method count() that takes one int[][] parameter x and one int parameter v. The method returns the number of elements in the two- dimensional array that equal v. The following code segment demonstrates its usage. int[][] a = { { 3, 1, 4, 1 }, { 5, 9, 2, 6 } }; int n1 = count( x, 1 ); // n1 becomes 2 int n2 = count( x, 12 ); // n2 becomes 0 public static int count( int[][] x, int v ) { Page 9 of 14
10 Class Pixel implementation see handout for specification 22. public static boolean legallevel( int n ) { 23. public Pixel() { 24. public Pixel( int r, int g, int b ) { 25. public Pixel( int n ) { Page 10 of 14
11 26. public void setred( int r ) { 27. public void setgreen( int g ) { 28. public void setblue( int b ) { 29. public void setrgb( int r, int g, int b ) { 30. public int getred() { Page 11 of 14
12 31. public int getgreen() { 32. public int getblue() { 33. public Color tocolor() { 34. public int toint() { 35. public boolean samered( Pixel p ) { Page 12 of 14
13 36. public boolean samegreen( Pixel p ) { 37. public boolean sameblue( Pixel p ) { 38. public boolean same( Pixel p ) { 39. public Pixel clone() { Page 13 of 14
14 40. public String tostring() { 20. True or false True False I am part of the class picture. True False Since the last test I have attended every class or had an excused absence. True False I did the Collab survey for this class. True False I did the exit survey for this class. Page 1 / 12 Page 8 / 8 Page 2 / 16 Page 9 / 8 Page 3 / 8 Page 10 / 12 Page 4 / 8 Page 11 / 15 Page 5 / 8 Page 12 / 15 Page 6 / 8 Page 13 / 12 Page 7 / 8 Page 14 / 5 / 143 Page 14 of 14
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 informationElementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
More informationQuick Reference ebook
This file is distributed FREE OF CHARGE by the publisher Quick Reference Handbooks and the author. Quick Reference ebook Click on Contents or Index in the left panel to locate a topic. The math facts listed
More informationCS 103X: Discrete Structures Homework Assignment 3 Solutions
CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering
More informationMath Review. for the Quantitative Reasoning Measure of the GRE revised General Test
Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important
More informationMoving 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 informationParamedic Program Pre-Admission Mathematics Test Study Guide
Paramedic Program Pre-Admission Mathematics Test Study Guide 05/13 1 Table of Contents Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 Page 10 Page 11 Page 12 Page 13 Page 14 Page 15 Page
More informationJava Basics: Data Types, Variables, and Loops
Java Basics: Data Types, Variables, and Loops If debugging is the process of removing software bugs, then programming must be the process of putting them in. - Edsger Dijkstra Plan for the Day Variables
More information12-6 Write a recursive definition of a valid Java identifier (see chapter 2).
CHAPTER 12 Recursion Recursion is a powerful programming technique that is often difficult for students to understand. The challenge is explaining recursion in a way that is already natural to the student.
More informationMIDTERM 1 REVIEW WRITING CODE POSSIBLE SOLUTION
MIDTERM 1 REVIEW WRITING CODE POSSIBLE SOLUTION 1. Write a loop that computes (No need to write a complete program) 100 1 99 2 98 3 97... 4 3 98 2 99 1 100 Note: this is not the only solution; double sum
More informationClasses 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 informationHow do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.
The verbal answers to all of the following questions should be memorized before completion of pre-algebra. Answers that are not memorized will hinder your ability to succeed in algebra 1. Number Basics
More informationCourse Syllabus. MATH 1350-Mathematics for Teachers I. Revision Date: 8/15/2016
Course Syllabus MATH 1350-Mathematics for Teachers I Revision Date: 8/15/2016 Catalog Description: This course is intended to build or reinforce a foundation in fundamental mathematics concepts and skills.
More information3.1. RATIONAL EXPRESSIONS
3.1. RATIONAL EXPRESSIONS RATIONAL NUMBERS In previous courses you have learned how to operate (do addition, subtraction, multiplication, and division) on rational numbers (fractions). Rational numbers
More informationFraction Vocabulary. It is important that vocabulary terms are taught to students.
Rational Numbers Fractions Decimals Percents It is important for students to know how these 3 concepts relate to each other and how they can be interchanged. Fraction Vocabulary It is important that vocabulary
More informationGrade 7/8 Math Circles Fall 2012 Factors and Primes
1 University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Fall 2012 Factors and Primes Factors Definition: A factor of a number is a whole
More informationAP 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 informationSoftware Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.
Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the
More informationNEW MEXICO Grade 6 MATHEMATICS STANDARDS
PROCESS STANDARDS To help New Mexico students achieve the Content Standards enumerated below, teachers are encouraged to base instruction on the following Process Standards: Problem Solving Build new mathematical
More informationExample of a Java program
Example of a Java program class SomeNumbers static int square (int x) return x*x; public static void main (String[] args) int n=20; if (args.length > 0) // change default n = Integer.parseInt(args[0]);
More informationSummit 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 informationTopic 11 Scanner object, conditional execution
Topic 11 Scanner object, conditional execution "There are only two kinds of programming languages: those people always [complain] about and those nobody uses." Bjarne Stroustroup, creator of C++ Copyright
More informationNumerator Denominator
Fractions A fraction is any part of a group, number or whole. Fractions are always written as Numerator Denominator A unitary fraction is one where the numerator is always 1 e.g 1 1 1 1 1...etc... 2 3
More informationSystem.out.println("\nEnter Product Number 1-5 (0 to stop and view summary) :
Benjamin Michael Java Homework 3 10/31/2012 1) Sales.java Code // Sales.java // Program calculates sales, based on an input of product // number and quantity sold import java.util.scanner; public class
More informationMultiplying Binomials and Factoring Trinomials Using Algebra Tiles and Generic Rectangles
Multiplying Binomials Standard: Algebra 10.0 Time: 55 mins. Multiplying Binomials and Factoring Trinomials Using Algebra Tiles and s Materials: Class set of Algebra Tiles or access to a computer for each
More informationPREPARATION FOR MATH TESTING at CityLab Academy
PREPARATION FOR MATH TESTING at CityLab Academy compiled by Gloria Vachino, M.S. Refresh your math skills with a MATH REVIEW and find out if you are ready for the math entrance test by taking a PRE-TEST
More information8 Divisibility and prime numbers
8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express
More informationNumber of Divisors. Terms. Factors, prime factorization, exponents, Materials. Transparencies Activity Sheets Calculators
of Divisors Purpose: Participants will investigate the relationship between the prime-factored form of a number and its total number of factors. Overview: In small groups, participants will generate the
More informationCS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013
Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)
More informationMath 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.
Math 0980 Chapter Objectives Chapter 1: Introduction to Algebra: The Integers. 1. Identify the place value of a digit. 2. Write a number in words or digits. 3. Write positive and negative numbers used
More informationThe 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 informationUsing Algebra Tiles for Adding/Subtracting Integers and to Solve 2-step Equations Grade 7 By Rich Butera
Using Algebra Tiles for Adding/Subtracting Integers and to Solve 2-step Equations Grade 7 By Rich Butera 1 Overall Unit Objective I am currently student teaching Seventh grade at Springville Griffith Middle
More informationContents. 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 informationYOU CAN COUNT ON NUMBER LINES
Key Idea 2 Number and Numeration: Students use number sense and numeration to develop an understanding of multiple uses of numbers in the real world, the use of numbers to communicate mathematically, and
More informationPROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS
PROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS A ver important set of curves which has received considerabl attention in recent ears in connection with the factoring of large numbers
More informationName: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
More informationSample CSE8A midterm Multiple Choice (circle one)
Sample midterm Multiple Choice (circle one) (2 pts) Evaluate the following Boolean expressions and indicate whether short-circuiting happened during evaluation: Assume variables with the following names
More informationCSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015
CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential
More informationChapter 3. Input and output. 3.1 The System class
Chapter 3 Input and output The programs we ve looked at so far just display messages, which doesn t involve a lot of real computation. This chapter will show you how to read input from the keyboard, use
More informationUnit 6. Loop statements
Unit 6 Loop statements Summary Repetition of statements The while statement Input loop Loop schemes The for statement The do statement Nested loops Flow control statements 6.1 Statements in Java Till now
More informationObject-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
More informationGrades 7-8 Mathematics Training Test Answer Key
Grades -8 Mathematics Training Test Answer Key 04 . Factor 6x 9. A (3x 9) B 3(x 3) C 3(3x ) D 6(x 9) Option A is incorrect because the common factor of both terms is not and the expression is not factored
More informationCopy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.
Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}
More informationHandout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
More informationMATH-0910 Review Concepts (Haugen)
Unit 1 Whole Numbers and Fractions MATH-0910 Review Concepts (Haugen) Exam 1 Sections 1.5, 1.6, 1.7, 1.8, 2.1, 2.2, 2.3, 2.4, and 2.5 Dividing Whole Numbers Equivalent ways of expressing division: a b,
More informationFlorida Math for College Readiness
Core Florida Math for College Readiness Florida Math for College Readiness provides a fourth-year math curriculum focused on developing the mastery of skills identified as critical to postsecondary readiness
More informationManagement Information Systems 260 Web Programming Fall 2006 (CRN: 42459)
Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459) Class Time: 6:00 8:05 p.m. (T,Th) Venue: WSL 5 Web Site: www.pbvusd.net/mis260 Instructor Name: Terrell Tucker Office: BDC 127
More informationThe Euclidean Algorithm
The Euclidean Algorithm A METHOD FOR FINDING THE GREATEST COMMON DIVISOR FOR TWO LARGE NUMBERS To be successful using this method you have got to know how to divide. If this is something that you have
More informationJDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4
JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4 NOTE: SUN ONE Studio is almost identical with NetBeans. NetBeans is open source and can be downloaded from www.netbeans.org. I
More informationCommon Core Standards for Fantasy Sports Worksheets. Page 1
Scoring Systems Concept(s) Integers adding and subtracting integers; multiplying integers Fractions adding and subtracting fractions; multiplying fractions with whole numbers Decimals adding and subtracting
More informationof surface, 569-571, 576-577, 578-581 of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433
Absolute Value and arithmetic, 730-733 defined, 730 Acute angle, 477 Acute triangle, 497 Addend, 12 Addition associative property of, (see Commutative Property) carrying in, 11, 92 commutative property
More informationAn Introduction to Number Theory Prime Numbers and Their Applications.
East Tennessee State University Digital Commons @ East Tennessee State University Electronic Theses and Dissertations 8-2006 An Introduction to Number Theory Prime Numbers and Their Applications. Crystal
More informationInteger Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions
Grade 7 Mathematics, Quarter 1, Unit 1.1 Integer Operations Overview Number of Instructional Days: 15 (1 day = 45 minutes) Content to Be Learned Describe situations in which opposites combine to make zero.
More informationAnswer: Quantity A is greater. Quantity A: 0.717 0.717717... Quantity B: 0.71 0.717171...
Test : First QR Section Question 1 Test, First QR Section In a decimal number, a bar over one or more consecutive digits... QA: 0.717 QB: 0.71 Arithmetic: Decimals 1. Consider the two quantities: Answer:
More informationProgramming in Java. 2013 Course Technology, a part of Cengage Learning.
C7934_chapter_java.qxd 12/20/11 12:31 PM Page 1 Programming in Java Online module to accompany Invitation to Computer Science, 6th Edition ISBN-10: 1133190820; ISBN-13: 9781133190820 (Cengage Learning,
More informationSECTION P.5 Factoring Polynomials
BLITMCPB.QXP.0599_48-74 /0/0 0:4 AM Page 48 48 Chapter P Prerequisites: Fundamental Concepts of Algebra Technology Eercises Critical Thinking Eercises 98. The common cold is caused by a rhinovirus. The
More informationPolynomial and Synthetic Division. Long Division of Polynomials. Example 1. 6x 2 7x 2 x 2) 19x 2 16x 4 6x3 12x 2 7x 2 16x 7x 2 14x. 2x 4.
_.qd /7/5 9: AM Page 5 Section.. Polynomial and Synthetic Division 5 Polynomial and Synthetic Division What you should learn Use long division to divide polynomials by other polynomials. Use synthetic
More informationRecursion and Dynamic Programming. Biostatistics 615/815 Lecture 5
Recursion and Dynamic Programming Biostatistics 615/815 Lecture 5 Last Lecture Principles for analysis of algorithms Empirical Analysis Theoretical Analysis Common relationships between inputs and running
More informationCS170 Lab 11 Abstract Data Types & Objects
CS170 Lab 11 Abstract Data Types & Objects Introduction: Abstract Data Type (ADT) An abstract data type is commonly known as a class of objects An abstract data type in a program is used to represent (the
More informations = 1 + 2 +... + 49 + 50 s = 50 + 49 +... + 2 + 1 2s = 51 + 51 +... + 51 + 51 50 51. 2
1. Use Euler s trick to find the sum 1 + 2 + 3 + 4 + + 49 + 50. s = 1 + 2 +... + 49 + 50 s = 50 + 49 +... + 2 + 1 2s = 51 + 51 +... + 51 + 51 Thus, 2s = 50 51. Therefore, s = 50 51. 2 2. Consider the sequence
More informationChapter 1. Computation theory
Chapter 1. Computation theory In this chapter we will describe computation logic for the machines. This topic is a wide interdisciplinary field, so that the students can work in an interdisciplinary context.
More informationMicrosoft 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 informationDecision-making Computer Science Lesson to Prepare for UIL Computer Science Contest
Decision-making Computer Science Lesson to Prepare for UIL Computer Science Contest Lesson Plan Title: Decision-making Goal of Lesson: To provide students an opportunity to learn how to use if statements
More informationMACM 101 Discrete Mathematics I
MACM 101 Discrete Mathematics I Exercises on Combinatorics, Probability, Languages and Integers. Due: Tuesday, November 2th (at the beginning of the class) Reminder: the work you submit must be your own.
More information8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
More informationAcing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents
Table of Contents Introduction to Acing Math page 5 Card Sort (Grades K - 3) page 8 Greater or Less Than (Grades K - 3) page 9 Number Battle (Grades K - 3) page 10 Place Value Number Battle (Grades 1-6)
More informationAnswer Key for California State Standards: Algebra I
Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.
More informationMULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java
More informationDeterminants can be used to solve a linear system of equations using Cramer s Rule.
2.6.2 Cramer s Rule Determinants can be used to solve a linear system of equations using Cramer s Rule. Cramer s Rule for Two Equations in Two Variables Given the system This system has the unique solution
More informationJava 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 informationBuilding Java Programs
Building Java Programs Chapter 3 Lecture 3-3: Interactive Programs w/ Scanner reading: 3.3-3.4 self-check: #16-19 exercises: #11 videos: Ch. 3 #4 Interactive programs We have written programs that print
More informationFree Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third
More informationThe design recipe. Programs as communication. Some goals for software design. Readings: HtDP, sections 1-5
The design recipe Readings: HtDP, sections 1-5 (ordering of topics is different in lectures, different examples will be used) Survival and Style Guides CS 135 Winter 2016 02: The design recipe 1 Programs
More informationGRADE 6 MATH: SHARE MY CANDY
GRADE 6 MATH: SHARE MY CANDY UNIT OVERVIEW The length of this unit is approximately 2-3 weeks. Students will develop an understanding of dividing fractions by fractions by building upon the conceptual
More informationVocabulary Cards and Word Walls Revised: June 29, 2011
Vocabulary Cards and Word Walls Revised: June 29, 2011 Important Notes for Teachers: The vocabulary cards in this file match the Common Core, the math curriculum adopted by the Utah State Board of Education,
More informationJava Program Coding Standards 4002-217-9 Programming for Information Technology
Java Program Coding Standards 4002-217-9 Programming for Information Technology Coding Standards: You are expected to follow the standards listed in this document when producing code for this class. Whether
More informationGrade 5 Mathematics Curriculum Guideline Scott Foresman - Addison Wesley 2008. Chapter 1: Place, Value, Adding, and Subtracting
Grade 5 Math Pacing Guide Page 1 of 9 Grade 5 Mathematics Curriculum Guideline Scott Foresman - Addison Wesley 2008 Test Preparation Timeline Recommendation: September - November Chapters 1-5 December
More informationThe following program is aiming to extract from a simple text file an analysis of the content such as:
Text Analyser Aim The following program is aiming to extract from a simple text file an analysis of the content such as: Number of printable characters Number of white spaces Number of vowels Number of
More informationProgrammierpraktikum
Programmierpraktikum Claudius Gros, SS2012 Institut für theoretische Physik Goethe-University Frankfurt a.m. 1 of 21 10/16/2012 09:29 AM Java - A First Glance 2 of 21 10/16/2012 09:29 AM programming languages
More informationAP 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 informationz 0 and y even had the form
Gaussian Integers The concepts of divisibility, primality and factoring are actually more general than the discussion so far. For the moment, we have been working in the integers, which we denote by Z
More informationGrade 6 Math Circles March 10/11, 2015 Prime Time Solutions
Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Lights, Camera, Primes! Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions Today, we re going
More informationCOSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005. Question Out of Mark A Total 16. B-1 7 B-2 4 B-3 4 B-4 4 B Total 19
Term Test #2 COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005 Family Name: Given Name(s): Student Number: Question Out of Mark A Total 16 B-1 7 B-2 4 B-3 4 B-4 4 B Total 19 C-1 4
More informationThe Tower of Hanoi. Recursion Solution. Recursive Function. Time Complexity. Recursive Thinking. Why Recursion? n! = n* (n-1)!
The Tower of Hanoi Recursion Solution recursion recursion recursion Recursive Thinking: ignore everything but the bottom disk. 1 2 Recursive Function Time Complexity Hanoi (n, src, dest, temp): If (n >
More information3 cups ¾ ½ ¼ 2 cups ¾ ½ ¼. 1 cup ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼. 1 cup. 1 cup ¾ ½ ¼ ¾ ½ ¼
cups cups cup Fractions are a form of division. When I ask what is / I am asking How big will each part be if I break into equal parts? The answer is. This a fraction. A fraction is part of a whole. The
More informationChapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.
Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm. We begin by defining the ring of polynomials with coefficients in a ring R. After some preliminary results, we specialize
More informationSolve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem.
Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem. Solve word problems that call for addition of three whole numbers
More informationMasters 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 informationCS/COE 1501 http://cs.pitt.edu/~bill/1501/
CS/COE 1501 http://cs.pitt.edu/~bill/1501/ Lecture 01 Course Introduction Meta-notes These notes are intended for use by students in CS1501 at the University of Pittsburgh. They are provided free of charge
More informationPostgreSQL Functions By Example
Postgre joe.conway@credativ.com credativ Group January 20, 2012 What are Functions? Introduction Uses Varieties Languages Full fledged SQL objects Many other database objects are implemented with them
More informationGrundlæggende Programmering IT-C, Forår 2001. Written exam in Introductory Programming
Written exam in Introductory Programming IT University of Copenhagen, June 11, 2001 English version All materials are permitted during the exam, except computers. The exam questions must be answered in
More informationPROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
More informationMAT-71506 Program Verication: Exercises
MAT-71506 Program Verication: Exercises Antero Kangas Tampere University of Technology Department of Mathematics September 11, 2014 Accomplishment Exercises are obligatory and probably the grades will
More informationA Short Guide to Significant Figures
A Short Guide to Significant Figures Quick Reference Section Here are the basic rules for significant figures - read the full text of this guide to gain a complete understanding of what these rules really
More informationWe will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
More informationMath: Essentials+ (GN105A) 4 Credit Hours Spring 2015
Math: Essentials+ (GN105A) 4 Credit Hours Spring 2015 Course Description: A college math course geared for the eyes and sensibilities of visual artists. Topics include Non-Euclidean and projective geometry,
More informationCurriculum Map. Discipline: Computer Science Course: C++
Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code
More informationCSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals
CSE 1223: Introduction to Computer Programming in Java Chapter 2 Java Fundamentals 1 Recall From Last Time: Java Program import java.util.scanner; public class EggBasket { public static void main(string[]
More informationMATH 90 CHAPTER 1 Name:.
MATH 90 CHAPTER 1 Name:. 1.1 Introduction to Algebra Need To Know What are Algebraic Expressions? Translating Expressions Equations What is Algebra? They say the only thing that stays the same is change.
More information