ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos


Program Development Videos 20 videos

AP Computer Science 1.2 Program Development
293 Views

AP Computer Science 1.2 Program Development. Which of the following is correct?

AP Computer Science 3.3 Program Development
201 Views

AP Computer Science 3.3 Program Development. Given the following programs, which would suitably contain the class pogoStickToy?

AP Computer Science 1.1 Program Development
404 Views

AP Computer Science 1.1 Program Development. The situation in the video is an example of which of the following?

See All

AP Computer Science 4.3 Program Development 201 Views


Share It!


Description:

AP Computer Science 4.3 Program Development. Which of the following methods would be part of an effective implementation?

Language:
English Language

Transcript

00:00

Thank you We sneak Then here's your shmoop du jour

00:06

brought to you by diabolical older siblings who abuse their

00:10

power Yeah all right Consider the following code which generates

00:15

ten random test scores between zero and a hundred then

00:18

finds and prince thie average score The program is to

00:22

be rewritten with procedural abstraction Which of the following methods

00:28

would be part of an effective implement patient I hear

00:32

it's code public static Get some all right in here

00:37

Your potential answers Ambrose wait I recall that procedural abstraction

00:45

is the process of breaking down a program into smaller

00:49

building blocks that can be implemented A separate methods for

00:53

these three options are smaller pieces of the main program

00:57

So none are totally incorrect It's like being assigned a

01:00

big chore by your parents but not wanting to do

01:02

the work You assigned smaller past your little siblings It's

01:05

jordan Then we've all been there All right if we

01:07

look at the original program closer there are three processes

01:11

generating the scores summing the scores and printing the average

01:16

Well Ideally we should split these three tasks into separate

01:19

methods and then call them from the main function Well

01:23

option one fulfills the first process of generating scores It's

01:26

a correctly implemented piece of the program Option two fulfills

01:29

the process of summing the scores So it's also a

01:32

correct implementation However option three is not an ideal implementation

01:38

of procedural extraction Notice that it uses a four loop

01:41

to get the sum of the scores Also noticed that

01:44

this is the same exact code is an option to

01:46

the method could have made a call to get some

01:49

method saving lines of code And following the guide of

01:52

procedural in traction for this league's asked choice dsr answer

01:56

And next time we'll look into the uprising of the 00:01:59.804 --> [endTime] ship

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?