ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos


Computer Science Videos 112 videos

Computer Science: Setting Up Your Environment
19 Views

Just as you move your furniture into a new house before spending the night, you’ve got to spend a little time setting up your environment when yo...

Computer Science: Doubles and Ints
17 Views

Doubles and ints. At first glance, it may look like this video will be about baseball and football statistics. But they're actually computer scienc...

AP Computer Science 1.1 Classes and Objects
468 Views

AP Computer Science: Classes and Objects Drill 1, Problem 1. Which of the following is a correct {/* Implementation */} for the isInsect method?

See All

AP Computer Science 2.5 Classes and Objects 178 Views


Share It!


Description:

AP Computer Science 2.5 Classes and Objects. Which of the following is not a legal method of call?

Language:
English Language

Transcript

00:00

Thank you And here's your shmoop du jour brought to

00:05

you by crackpot marketing schemes Whether you need a comically

00:09

huge pencil emblazoned with your logo or branded toilet seat

00:12

covers let a crackpot marketing scheme change the way you

00:15

do business I don't know I consider the following declaration

00:20

Find a people's find o b equals folksy Which of

00:25

the following is not a legal method of cough One

00:29

eight hundred No Okay here we go And here the

00:31

potential answers and roman new rose grows older Walked into

00:36

a bar in order to five years Okay here we

00:39

go All right Sounds like we're being asked which of

00:42

the given method calls are invalid But what on earth

00:46

are method calls And when will you ever use them

00:48

Are typically a large job project will be split into

00:51

separate classes To make code more manageable you might have

00:55

one class handling the saving and loading of files Another

00:58

class handling networking a class handling graphics and someone that

01:03

way When there's a bug in a certain function or

01:05

the code needs to be modified All the relevant codes

01:08

in one place makes sense right Well the main class

01:11

Will then call various methods from other classes as needed

01:16

Okay so small programming project may not need so many

01:19

separate classes but if things get more complicated well it

01:22

helps agree field i think about how a small company

01:25

might be just one or two people handling everything in

01:27

a garage Well that's perfectly manageable because it's a relatively

01:30

small operation with a little work to do but a

01:33

large company of dozens or hundreds of people would have

01:36

to be split into departments each with different test And

01:39

when it's time to do something with same marketing well

01:41

you'd have to give him a call Yes hello marketing

01:44

department We need to get our name out there and

01:47

i'm thinking pigeon sweaters Ooh well well put thousands of

01:51

tiny sweaters on pigeons all over the city with a

01:53

branding calling elsewhere to make a request is the same

01:57

thing we're doing with method calls just with fewer pigeons

02:00

Sweater anyhow let's look at our options and figure out

02:03

which your invalid option one tries to call of meth

02:05

that would object c but see is just a noel

02:09

object and hasn't been specified as a new anything option

02:12

One won't work at all Option two tries to call

02:15

the shed leaves method with object b which looks like

02:18

it's gonna work Object b is in book object and

02:21

the shed leaves method resides within the low class looking

02:24

good options Option three tries to call the shed leaves

02:27

method Thanks but object is a pine object with behind

02:31

Class doesn't contain a shed leaves method It's only got

02:34

shed needles Option three is not going to cut it

02:37

That makes our answer D because i'm on one and 00:02:39.42 --> [endTime] three are talent and so are pigeons

Related Videos

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism
204 Views

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...

AP Computer Science 4.2 Standard Algorithms
191 Views

AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?