ap computer science

Ace your homework & exams now with Quizwiz!

Procedural Abstraction

Extracting shared features to generalize functionality

The following would be an example of what type of variable?

Global Variable

A computer science student completes a program and asks a classmate for feedback. The classmate suggests rewriting some of the code to include more procedural abstraction. Which of the following is NOT a benefit of procedural abstraction?

making the code run faster

Which call of the function correctly follows the instructions laid out in the API

moveElement("button1", "down", 25);

What is printed to the console?

3

Library

A collection of functions that can be used in many different programs.

A library should have all of the following documentation EXCEPT

A complete list of the arguments

What does API stand for

Application programming interface

What is the term for a variable with local scope is one that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables

Local Variable

This function checks is a character is a vowel. If it is, it returns true. Otherwise, it returns false. Where should return false; be written in the code

Option c

Which of the following is Not true about procedural abstraction

Procedural abstraction improves the speed at which a program executes

What will be printed to the console after this program runs

[0,3,6,-1,9]

Which function calls would provide the most helpful test of this function? Remember: What is the goal of running tests with Library functions?

findMin(-1,1) findMin(1,-1) findMin(1,1)

Which of the following are benefits of procedural abstraction? Select two answers. I. Procedural abstraction eliminates the need for programmers to document their code. II. Procedural abstraction prevents programmers from accidentally using the intellectual property of other programmers.

iii, iv

This function finds the minimum number in a list. What should <MISSING CODE SEGMENT> be replaced within order for this function to operate as expected

min = numList[i];

Dividing a program into separate subprograms is known as

modularity

Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT

removes procedural abstraction

Algorithms can be created in all the following ways except

removing sequencing, selection, and iteration from an algorthirm

Which is one of the benefits of using a library in a program

simplifies creating a complex program

API

specifications for how the functions in a library behave and can be used

Modularity

the subdivision of a computer program into separate subprograms.


Related study sets

Passpoint PrepU - Practice NCLEX #2

View Set

Chapter 1 - intro to insurance practice test, Chapter 2 practice exam - Insurance Contracts, Chapter 3, 5, 6, 8,9,12,13,15, Property Certification exam, Illinois Property & Casualty Insurance Day 2 - Commercial Lines, Casualty Certification Exam, Ill...

View Set

Chapter 49: Assessment and Management of Patients With Hepatic Disorders

View Set

Pediatrics_Infectious and Communicable Diseases_final

View Set

Medical Terminology Male Reproductive System

View Set

Intro to Planetary Astronomy Quest #4

View Set

IB Geography Unit 2 Global Climate Change

View Set

Chapter 33: all Disorders of Renal Function no explanation

View Set