ShmoopTube
Where Monty Python meets your 10th grade teacher.
Search Thousands of Shmoop Videos
Computer Science Videos 112 videos
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...
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: Classes and Objects Drill 1, Problem 1. Which of the following is a correct {/* Implementation */} for the isInsect method?
AP Computer Science 1.1 Program Development 404 Views
Share It!
Description:
AP Computer Science 1.1 Program Development. The situation in the video is an example of which of the following?
Transcript
- 00:00
Thank you We sneak and here's your smoke too Sure
- 00:05
brought to you by the dreaded trinidadian scorpion nightmare pepper
- 00:09
one drop of its juicy spicy enough to send a
- 00:12
horse on a spirit flat software engineer rights program composed
- 00:16
of many small simple functions and a few functions that
Full Transcript
- 00:20
utilize small functions in order to perform more complex tasks
- 00:24
This is an example of which of the following and
- 00:28
here the potential answers roman numerals Thank you and let's
- 00:33
go all right Greater concept of program development refers not
- 00:38
so much of the actual writing of coat it's more
- 00:40
about designing programs overall structure on a larger scale A
- 00:44
few concepts that can help in planning a large coding
- 00:46
project are polymorphism pop down design and functional decomposition right
- 00:53
The first polymorphism comes from greek many and form core
- 00:58
shape it's the idea that a subclass can override a
- 01:02
method of the same name that it inherited from a
- 01:05
super class right So for example let's say you've got
- 01:09
a class called both well The classic boat comes with
- 01:12
a method called steer load that contains code for steering
- 01:16
any both object but let's say we've also got a
- 01:19
subclass of boat called crew shin will cruise ship also
- 01:23
has its own method called steer boat that overrides the
- 01:26
one inherited from boat and includes along with it a
- 01:28
new method called avoid iceberg one that way when you're
- 01:33
out and about your program and you have any boat
- 01:35
or vote subclass object whether it be a boat or
- 01:38
a cruise ship or raft you can call the steer
- 01:41
boat method and cruise ship objects will get their overriding
- 01:45
version of steer boat that includes avoid iceberg right it's
- 01:48
a useful thing to know when planning a big project
- 01:50
but it doesn't sound quite like the technique our engineers
- 01:53
used in this case All right next up top down
- 01:56
design pop down design is the concept of coming up
- 01:59
with a larger so for the program first by nailing
- 02:02
down the larger functions and then filling in the details
- 02:04
later on We get useful concept but it doesn't sound
- 02:07
too much like what are engineered it in this case
- 02:10
either Then we have functional decomposition The idea here is
- 02:14
to split a complex function into a lot of smaller
- 02:16
functions then stitch them together by calling those functions through
- 02:19
Larger fun well let's think about making chili chili smells
- 02:24
great If you were right now your chili making processes
- 02:27
of function in java well one way to do it
- 02:30
would be to write a single meandering function that handles
- 02:33
every part of the process from chopping vegetables Adding spice
- 02:38
is actually doing the cooking but that's not terribly wise
- 02:41
like what if your out of onions what if you
- 02:43
need to update the recipe the whole thing could break
- 02:46
and it'd be a total mess So if you were
- 02:48
to write a functional decomposition in mind you'd probably have
- 02:51
chopped vegetable is a function that would accept a variety
- 02:54
of variables Add spices would probably get called here and
- 02:57
there at chili's would get called over and over again
- 03:00
And then you get a research sounds an awful lot
- 03:03
like what our engineer did here a number of small
- 03:05
simple functions that get used by other functions to perform
- 03:09
complex tasks That's answer c room you're looking for is 00:03:14.37 --> [endTime] down the hall left three
Related Videos
AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?
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. Which of the following is correct implementation of the Country class?
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. What kind of algorithm is the following?