3 length + 23 size = 2

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "3 length + 23 size = 2"

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)

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 information

Now that we have a handle on the integers, we will turn our attention to other types of numbers.

Now that we have a handle on the integers, we will turn our attention to other types of numbers. 1.2 Rational Numbers Now that we have a handle on the integers, we will turn our attention to other types of numbers. We start with the following definitions. Definition: Rational Number- any number that

More information

Elementary 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. 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 information

Quick Reference ebook

Quick 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 information

Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed.

Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. New Topic Repetition and Loops Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. These constructs are the 1. while loop and

More information

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

More information

Math 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 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 information

COUNTING LOOPS AND ACCUMULATORS

COUNTING LOOPS AND ACCUMULATORS COUNTING LOOPS AND ACCUMULATORS Two very important looping idioms are counting loops and accumulators. A counting loop uses a variable, called the loop control variable, to keep count of how many cycles

More information

Paramedic Program Pre-Admission Mathematics Test Study Guide

Paramedic 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 information

Introduction to Fractions

Introduction to Fractions Introduction to Fractions Fractions represent parts of a whole. The top part of a fraction is called the numerator, while the bottom part of a fraction is called the denominator. The denominator states

More information

MLR Institute of Technology

MLR Institute of Technology MLR Institute of Technology DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING Computer Programming Lab List of Experiments S.No. Program Category List of Programs 1 Operators a) Write a C program

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 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 information

Chapter 20 Recursion. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Chapter 20 Recursion. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. Chapter 20 Recursion 1 Motivations Suppose you want to find all the files under a directory that contains a particular word. How do you solve this problem? There are several ways to solve this problem.

More information

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E.

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E. SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK Subject: Computer Programming and Utilization (2110003) [F.Y.B.E.: ALL BRANCHES] Unit 1

More information

Java Basics: Data Types, Variables, and Loops

Java 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 information

MIDTERM 1 REVIEW WRITING CODE POSSIBLE SOLUTION

MIDTERM 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 information

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

How 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 information

3.1. RATIONAL EXPRESSIONS

3.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 information

Number of Divisors. Terms. Factors, prime factorization, exponents, Materials. Transparencies Activity Sheets Calculators

Number 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 information

PREPARATION FOR MATH TESTING at CityLab Academy

PREPARATION 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 information

Fraction Vocabulary. It is important that vocabulary terms are taught to students.

Fraction 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 information

Course 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 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 information

Moving from CS 61A Scheme to CS 61B Java

Moving 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 information

NOTES: Justify your answers to all of the counting problems (give explanation or show work).

NOTES: Justify your answers to all of the counting problems (give explanation or show work). Name: Solutions Student Number: CISC 203 Discrete Mathematics for Computing Science Test 3, Fall 2010 Professor Mary McCollam This test is 50 minutes long and there are 40 marks. Please write in pen and

More information

12-6 Write a recursive definition of a valid Java identifier (see chapter 2).

12-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 information

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

Classes 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 information

Building number sense and place value and money understanding

Building number sense and place value and money understanding Unit: 1 Place Value, Money, and Sense s to be mastered in this unit: 3.N.1 Skip count by 25 s, 50 s, 100 s to 1,000 3.N.2 Read and write whole numbers to 1,000 place 3.N.3 Compare and order numbers to

More information

Summit 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 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 information

Using 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 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 information

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

CS 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 information

YOU CAN COUNT ON NUMBER LINES

YOU 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 information

Grade 7/8 Math Circles Fall 2012 Factors and Primes

Grade 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 information

Numerator Denominator

Numerator 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 information

100 Math Facts 6 th Grade

100 Math Facts 6 th Grade 100 Math Facts 6 th Grade Name 1. SUM: What is the answer to an addition problem called? (N. 2.1) 2. DIFFERENCE: What is the answer to a subtraction problem called? (N. 2.1) 3. PRODUCT: What is the answer

More information

Sample CSE8A midterm Multiple Choice (circle one)

Sample 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 information

Fundamentals of Programming. Laboratory 5 Methods. General-purpose and user - defined methods

Fundamentals of Programming. Laboratory 5 Methods. General-purpose and user - defined methods Fundamentals of Programming Laboratory 5 Methods. General-purpose and user - defined methods What is a method? Block of code that receives its own identifier - i.e. can be executed using its name Different

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: 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 information

AP Computer Science Java Subset

AP 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 information

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

More information

a) Three faces? b) Two faces? c) One face? d) No faces? What if it s a 15x15x15 cube? How do you know, without counting?

a) Three faces? b) Two faces? c) One face? d) No faces? What if it s a 15x15x15 cube? How do you know, without counting? Painted Cube (Task) Imagine a large 3x3x3 cube made out of unit cubes. The large cube falls into a bucket of paint, so that the faces of the large cube are painted blue. Now suppose you broke the cube

More information

Example of a Java program

Example 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 information

Software 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. 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 information

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

NEW 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 information

Vocabulary Cards and Word Walls Revised: June 29, 2011

Vocabulary 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 information

8 Divisibility and prime numbers

8 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 information

Topic 11 Scanner object, conditional execution

Topic 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 information

KENDRIYA VIDYALAYA TIRUMALAGIRI HOLIDAY HOMEWORK CLASS XII COMPUTER SCIENCE (083) C++ Practice Problems

KENDRIYA VIDYALAYA TIRUMALAGIRI HOLIDAY HOMEWORK CLASS XII COMPUTER SCIENCE (083) C++ Practice Problems (i).there are 39 problems. KENDRIYA VIDYALAYA TIRUMALAGIRI HOLIDAY HOMEWORK CLASS XII COMPUTER SCIENCE (083) C++ Practice Problems 1. What is the exact output of the program below? Indicate a blank space

More information

System.out.println("\nEnter Product Number 1-5 (0 to stop and view summary) :

System.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 information

Mathematics of Cryptography Part I

Mathematics of Cryptography Part I CHAPTER 2 Mathematics of Cryptography Part I (Solution to Odd-Numbered Problems) Review Questions 1. The set of integers is Z. It contains all integral numbers from negative infinity to positive infinity.

More information

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Math 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 information

Answer: Quantity A is greater. Quantity A: 0.717 0.717717... Quantity B: 0.71 0.717171...

Answer: 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 information

Unit 6. Loop statements

Unit 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 information

Mathematics Vocabulary List For Pre-Algebra

Mathematics Vocabulary List For Pre-Algebra Mathematics Vocabulary List For Pre-Algebra 1. Absolute Value - the distance from a number to zero on a number line. It is always positive. l-6 l = 6 l -25 l = 25 l 6 l = 6 l 25 l = 25 2. Associative Property

More information

First Grade CCSS Math Vocabulary Word List *Terms with an asterisk are meant for teacher knowledge only students do not need to learn them.

First Grade CCSS Math Vocabulary Word List *Terms with an asterisk are meant for teacher knowledge only students do not need to learn them. First Grade CCSS Math Vocabulary Word List *Terms with an asterisk are meant for teacher knowledge only students do not need to learn them. Add To combine; put together two or more quantities. Addend Any

More information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

More information

An Introduction to Number Theory Prime Numbers and Their Applications.

An 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 information

Multiplying Binomials and Factoring Trinomials Using Algebra Tiles and Generic Rectangles

Multiplying 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 information

JDK 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 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 information

of surface, 569-571, 576-577, 578-581 of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433

of 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 information

The C Programming Language course syllabus associate level

The 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 information

Montessori Mathematics Curriculum

Montessori Mathematics Curriculum 1 Montessori Mathematics Curriculum Presentations on Preparation for Math One-to-One Correspondence Books Counting Songs 3 Little Speckled Frogs Sorting/Classification Sequence/Patterns Do As I Do Sequence/Seriation

More information

Vocabulary Cards and Word Walls Revised: June 29, 2011

Vocabulary 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 information

Associative Property The property that states that the way addends are grouped or factors are grouped does not change the sum or the product.

Associative Property The property that states that the way addends are grouped or factors are grouped does not change the sum or the product. addend A number that is added to another in an addition problem. 2 + 3 = 5 The addends are 2 and 3. area The number of square units needed to cover a surface. area = 9 square units array An arrangement

More information

Number Systems I. CIS008-2 Logic and Foundations of Mathematics. David Goodwin. 11:00, Tuesday 18 th October

Number Systems I. CIS008-2 Logic and Foundations of Mathematics. David Goodwin. 11:00, Tuesday 18 th October Number Systems I CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 11:00, Tuesday 18 th October 2011 Outline 1 Number systems Numbers Natural numbers Integers Rational

More information

Contents. 9-1 Copyright (c) 1999-2004 N. Afshartous

Contents. 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 information

Microsoft Access 3: Understanding and Creating Queries

Microsoft 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 information

Grades 7-8 Mathematics Training Test Answer Key

Grades 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 information

Integers and division

Integers and division CS 441 Discrete Mathematics for CS Lecture 12 Integers and division Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Symmetric matrix Definition: A square matrix A is called symmetric if A = A T.

More information

Programming in Java. 2013 Course Technology, a part of Cengage Learning.

Programming 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 information

Determinants can be used to solve a linear system of equations using Cramer s Rule.

Determinants 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 information

Java How to Program, 9/e

Java How to Program, 9/e Java How to Program, 9/e Education, Inc. All Rights Reserved. 1 Any computing problem can be solved by executing a series of actions in a specific order. An algorithm is a procedure for solving a problem

More information

Vocabulary Cards and Word Walls Revised: June 29, 2011

Vocabulary 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 information

The following program is aiming to extract from a simple text file an analysis of the content such as:

The 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 information

Answer Key for California State Standards: Algebra I

Answer 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 information

Building Java Programs

Building 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 information

Vocabulary Cards and Word Walls Revised: June 2, 2011

Vocabulary Cards and Word Walls Revised: June 2, 2011 Vocabulary Cards and Word Walls Revised: June 2, 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 information

MATH-0910 Review Concepts (Haugen)

MATH-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 information

TI-83 Plus Graphing Calculator Keystroke Guide

TI-83 Plus Graphing Calculator Keystroke Guide TI-83 Plus Graphing Calculator Keystroke Guide In your textbook you will notice that on some pages a key-shaped icon appears next to a brief description of a feature on your graphing calculator. In this

More information

PROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS

PROPERTIES 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 information

CSE373: 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 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 information

Math Curriculum. Alignment to Virginia Department of Education Mathematic Standards of Learning (SOL)

Math Curriculum. Alignment to Virginia Department of Education Mathematic Standards of Learning (SOL) SOL LEARNING Math Curriculum Alignment to Virginia Department of Education Mathematic Standards of Learning (SOL) SOL STANDARDS To provide students with the foundation for deep, fundamental mathematical

More information

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents

Acing 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 information

Object-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 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 information

Java Program Coding Standards 4002-217-9 Programming for Information Technology

Java 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 information

AP Computer Science Java Mr. Clausen Program 9A, 9B

AP 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 information

The Euclidean Algorithm

The 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 information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE 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 information

A Short Guide to Significant Figures

A 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 information

Information Science 1

Information Science 1 Topics covered Information Science 1 Terms and concepts from Week 05 The software development process Program'Development /Algorithms'and'Problem'Solving/'' ' software software life cycle life-cycle models

More information

Solve 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 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 information

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Copy 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 information

Common Core Standards for Fantasy Sports Worksheets. Page 1

Common 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 information

Fractions and Decimals

Fractions and Decimals Fractions and Decimals Objectives To provide experience with renaming fractions as decimals and decimals as fractions; and to develop an understanding of the relationship between fractions and division.

More information

Whole Numbers. hundred ten one

Whole Numbers. hundred ten one Whole Numbers WHOLE NUMBERS: WRITING, ROUNDING The digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The natural numbers (counting numbers) are 1, 2, 3, 4, 5, and so on. The whole numbers are 0, 1, 2, 3, 4,

More information

Concepts of Elementary Mathematics Enduring Understandings & Essential Questions

Concepts of Elementary Mathematics Enduring Understandings & Essential Questions Concepts of Elementary Mathematics & First through Fourth Grade Content Areas: Numbers and Operations Algebra Geometry Measurement Data Analysis and Probability Above all, students should feel enchanted

More information

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Handout 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 information

Progressing toward the standard

Progressing toward the standard Report Card Language: add, subtract, multiply, and/or divide to solve multi-step word problems. CCSS: 4.OA.3 Solve multistep work problems posed with whole numbers and having whole-number answers using

More information

parent ROADMAP MATHEMATICS SUPPORTING YOUR CHILD IN GRADE FIVE

parent ROADMAP MATHEMATICS SUPPORTING YOUR CHILD IN GRADE FIVE TM parent ROADMAP MATHEMATICS SUPPORTING YOUR CHILD IN GRADE FIVE 5 America s schools are working to provide higher quality instruction than ever before. The way we taught students in the past simply does

More information

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions

Integer 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 information