Download presentation

Presentation is loading. Please wait.

Published byJeffrey Allen Modified over 2 years ago

1
Review Game 1

2
Teams: A Scott, Michael O, Myles, Ryan Haris, William, Matt C, Jack Jessica, Patrick, Lexa, Kyle Josh, Nico, Betsey, Brian Tanner, Evan, Sean, Dan Alexandra, Genesis, Michael S Taylor, Matt B, Jen, Ripton

3
Teams: C Gabe, Finn, Nathan, Rachel Thomas, Darby, Sabrina, Greg Stephanie, Dustin, Sammi, Eric Philip, Will, Nicole, Killian Avery, Matt, Michael M, Rhett Skyler, Zack, Tim, Soula Brandon, Michael B, Meggie

4
Teams: D McKay, Tyler L, Ryan, Nevin Connor, Mike, Muriel, Ian Carly, Ty, Millie, Sebastian Nick, Andrew, Mack, Ben Chris, Nathan, Shaye, Parker John, Erin, Conor, Alec Zack, Ellie, Brady, Tyler A

5
1. Describe what gets drawn: fill(0,255,0); stroke(255,0,0); ellipseMode(CORNER); ellipse(0,0,100,100);

6
2. What is printed? char a = ‘b’; char b = ‘a’; System.out.print(a);

7
3. What is the value of number? double number = (1/3)*3;

8
4. What is the value of number? int number = 3+2/5;

9
5. What is the value of number? int number = (int) 5.7;

10
6. What word denotes the answer to a method?

11
7. What line of Java declares and creates an object in the Student class with your name?

12
8. Suppose I want to write a method to tell whether or not a number is positive. What would the input and output types be?

13
9. Suppose I want to write a method that takes a letter and whether or not it should be upper case and computes the new letter. What should the input and output types be?

14
10. What is special about a variable declared with the word “final”?

15
11. What does this line of code do? Tiger tony;

16
12. What math allows us to tell the last digit of an integer?

17
13. What is the difference between the setup() and the draw() methods?

18
14. What is the value of b? int x = 2; int y = 4; boolean b = (x<3) && (y<3);

19
15. What is the value of b? int x = 2; int y = 4; boolean b = (x<3) || (y<3);

20
16. What is the value of b? int x = 2; int y = 4; boolean b = !(y<3);

21
17. Which Java keyword means that a method has no output?

22
18. What is the value of x? int x = 17 % 6;

23
19. What is the value of x? int x = 6 % 17;

24
20. What is the value of x at the end of the code? int x = 3; int y = 5; x = y; y = y+1;

25
21. Suppose the Tiger class has this behavior: public int countTeeth() What line of code calls the countTeeth behavior on the Tiger tony?

26
22. Suppose the Tiger class has this behavior: public void grabMice(int mice) What line calls the grabMice behavior on the Tiger tony for 3 mice?

27
23. What is the error? public int mystery(double a, double b){ if (a**
{
"@context": "http://schema.org",
"@type": "ImageObject",
"contentUrl": "http://images.slideplayer.com/14/4367944/slides/slide_27.jpg",
"name": "23. What is the error public int mystery(double a, double b){ if (a
**

28
24. What does this method do? public int mystery(int a){ int answer = a%100; return answer; }

29
25. What is the error? public int mystery(int a, int b){ if(a**=b){ return b; }
**

30
26. What is x? int a = 3; int b = 5; int x; if (a**
{
"@context": "http://schema.org",
"@type": "ImageObject",
"contentUrl": "http://images.slideplayer.com/14/4367944/slides/slide_30.jpg",
"name": "26. What is x.",
"description": "int a = 3; int b = 5; int x; if (a
**

31
27. What is x? int a = 3; int b = 5; int x; if (a**
{
"@context": "http://schema.org",
"@type": "ImageObject",
"contentUrl": "http://images.slideplayer.com/14/4367944/slides/slide_31.jpg",
"name": "27. What is x int a = 3; int b = 5; int x; if (a
**

32
28. Find and fix the error: arc(100,100,100,100, PI, 0);

33
Write a method The above formula calculates a person’s BMI given their height in centimeters and weight in kilograms. Write a method to calculate a person’s BMI given their height and weight, but the weight is given in grams. (1 kilogram = 1000 grams). public double bmi(double wt, double ht){

34
Write a method You need to write a program to help out your weekend business doing lawn care. You really need to buy $15 bags of grass seed, but if any money is left over, you also need some $2 bags of mulch. Write a method that takes as input how much money you have and prints how many bags of grass seed and mulch I can buy. For example, if I have 52 dollars, I can buy 3 bags of seed (that’s $45) and 3 bags of mulch ($6 more). public void purchaseOrder(int dollars) The line System.out.println(x) prints the value of the variable x.

Similar presentations

Presentation is loading. Please wait....

OK

CSI 3125, Preliminaries, page 1 Data Type, Variables.

CSI 3125, Preliminaries, page 1 Data Type, Variables.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on brand marketing definition Ppt on business cycle theories Slides for ppt on love Ppt on statistics and probability pdf Ppt on business etiquettes of japan Ppt on causes of second world war Maths ppt on statistics for class 9 Electronic paper display ppt on ipad Ppt on java virtual machine Liquid crystal on silicon display ppt online