Section 1

Preview this deck

which method is overloaded: void shape() void shape2(int a, int b) int random(float a) int random()

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (41)

Section 1

(41 cards)

which method is overloaded: void shape() void shape2(int a, int b) int random(float a) int random()

Front

random

Back

hexadecimal system

Front

1-9 then A:10 B:11 C:12 D:13 E:14 F:15

Back

2 parts of a variable

Front

data type and name

Back

how to round

Front

add .5 then do int caste

Back

how to convert base 10 to 2

Front

base 10 - standard base 2- binary 128, 64, 32, 16 8, 4, 2, 1 place 0s and 1s to add up to number

Back

if the equation contains all whole numbers

Front

integer math, thus the result after every equation is a whole number

Back

square root method

Front

sqrt()

Back

a

Front

97

Back

color values

Front

(r, g, b)

Back

%

Front

mod (gets the remainder)

Back

assigning rules

Front

1. larger can not go into smaller 2. decimal cannot go into whole 3. character can be assigned to wholes and decimals

Back

Front

Back

string needs

Front

double quotes " "

Back

how to overload a method

Front

give same method name and return type, change number of parameters

Back

steps to solve: 13/7*7

Front

divide 13/7 = 1.8... remove decimal so just 1 then 1*7 = 7

Back

how to convert base 2 to base 16

Front

take every 4 digits of binary and convert to hexadecimal 0000 0000 - every 4

Back

green()

Front

extracts the value of the green color

Back

how to call a method ex) int girl( int a, float b, char c)

Front

do method(); girl(8, 8.0, 'H');

Back

==

Front

equality operator (is left equal to right; answer is TRUE or FALSE)

Back

Front

Back

blue()

Front

extracts the value of a blue color

Back

if the equation contains atleast 1 decimal number

Front

then the result is a decimal number

Back

method overloading

Front

When two methods have the same method name, but different parameters.

Back

parameters

Front

the parts in the parentheses, if none, no parameters then

Back

what numbers does a caste affect

Front

the numbers right near it or in parentheses (double)(a+b)

Back

if small number % big number

Front

remainder is just the small number since it can not be divided by big number

Back

info methods

Front

anything with an data return type ex) int, float char, boolean calculations, outputs values

Back

Power Method

Front

pow(a, b) (a^b)

Back

anytime a double (decimal) is used in an equation

Front

the result is a double (does not change the value of the int affected) but in the equation itself, if int are with ints, do int math unless ints are affected by decimals

Back

red()

Front

extracts the value of the red color

Back

Fill and Hop are examples of method overloading

Front

TRUE bc Fill can has 1,3, and 4 parameters and Hop has 0 or 1 parameter.

Back

is a method overloaded if it has same method name but different return types?

Front

No, cause error

Back

A

Front

65

Back

if something is assigned to a variable, it continues to have that assignment

Front

the whole code

Back

how to tell return type of method

Front

if assigned to another method, its supposedly the same return type as that if displaying something, it's a void I if the name specifies the return type like realAvg

Back

char needs

Front

single quotes ' '

Back

which methods have "return" in them

Front

all info methods

Back

0

Front

48

Back

when counting parameters

Front

make sure the parameters are in parentheses of methods, not any random parentheses

Back

PEMDAS

Front

Parentheses, Exponents, Multiplication, Division, Addition, Subtraction

Back

action methods

Front

any method with void as return type displays images

Back