WGU C173 Scripting and Programming – Foundations| Questions with Complete Solutions
100% Solved| Grade A+
What are circular definitions? A definition that constantly calls itself. Because it lacks a base
case it has no way to stop. It is stuck in a loop with a reference pointing to another reference
that never resolves. These types of definitions are largely helpful in mathematical application.
What is a recursive definition? When a function calls itself, it is recursion. If a function is
calling itself, it would be stuck in a loop forever unless we have a condition that would allow the
recursion to stop. A recursive definition needs to have two parts: the recursive case and the
base case. The base case must be something that you already know the answer for and not
need to do anything to work it out. This is what allows us to eventually stop running the
definition. The recursive case is when the function is calling itself to run again. The recursive
case is defined in terms of itself, but in terms of a smaller version of itself, as progress must be
made towards the base case.
When would you use recursion? To allow us to define infinitely many things using a few
simple rules. A simple definition can be used to expand on something much more complex. This
involves breaking a problem down into smaller and smaller subproblems until you get to a small
enough problem that it can be solved trivially. For example, you could define ancestory =
person 1 + ancestors. If you are person 1, your ancestors would be your parents, but they are
not your only ancestors. Your parents have parents, but those are still your ancestors. Your
grandparents had parents, and so on. A very simple definition can execute with multiple layers
and a much more complex value.
What type of definition is this code an example of?
Answer: This is a circular definition
What type of definition is this code an example of?
Answer: This is a recursive definition
Which aspect of a programming language would not likely affect the execution time (speed) of
a program? The compiler
,What is a programming language library? A set of related modules, possibly precompiled
Which programming language is best used for developing web apps? Python
What does a use case diagram do? Provides an overview of several use cases
Which two statements about object-oriented design (OOD) are true? OOD emphasizes
defining objects and their relationships to fulfill the requirements identified during the analysis
phase.
A class diagram is an OOD deliverable that describes the static structure of a system by showing
the system's classes, their attributes, and the relationships between the classes.
How does a hash-based index increase lookup speed? By mapping a given keyword to its
index
What is a user-defined prototype for an object? Class
What is the correct rule regarding the number of elements a Python list may contain? It
must be a sequence of zero or more elements.
Is assembly language high level or low level language? Low Level (C is an assembly language)
Are object oriented languages high level or low level languages? High level
What are three components of a class? Name(type), attribute(properties),
behavior)operations
, What is the Superclass? What is the subclass? Parent, child
What is the acronym that describes object-orientation? APIE - Abstraction, Polymorphism,
Inheritance, Encapsulation
What are the questions you ask when going over: Gather Requirements Who will use this
application?
What is the end goal of this application? Who does it help?
Where would the user access this application?
When would the user access this application?
How would the student use this application?
What are the questions you ask when going over: Describe the App What will it do?
What will it not do?
What systems will it need to interact with?
What security concerns are there?
What does it look like?
What are the questions you ask when going over: Identify the main objects What are the
main objects?
Are there any secondary objects?
What objects should we not include?
What are the questions you ask when going over: Describe the interactions What are the
behaviors of the objects identified in the previous step?
What are the responsibilities of the objects identified in the previous step?
How will objects interact with each other?
How will this look in the sequence diagram?
100% Solved| Grade A+
What are circular definitions? A definition that constantly calls itself. Because it lacks a base
case it has no way to stop. It is stuck in a loop with a reference pointing to another reference
that never resolves. These types of definitions are largely helpful in mathematical application.
What is a recursive definition? When a function calls itself, it is recursion. If a function is
calling itself, it would be stuck in a loop forever unless we have a condition that would allow the
recursion to stop. A recursive definition needs to have two parts: the recursive case and the
base case. The base case must be something that you already know the answer for and not
need to do anything to work it out. This is what allows us to eventually stop running the
definition. The recursive case is when the function is calling itself to run again. The recursive
case is defined in terms of itself, but in terms of a smaller version of itself, as progress must be
made towards the base case.
When would you use recursion? To allow us to define infinitely many things using a few
simple rules. A simple definition can be used to expand on something much more complex. This
involves breaking a problem down into smaller and smaller subproblems until you get to a small
enough problem that it can be solved trivially. For example, you could define ancestory =
person 1 + ancestors. If you are person 1, your ancestors would be your parents, but they are
not your only ancestors. Your parents have parents, but those are still your ancestors. Your
grandparents had parents, and so on. A very simple definition can execute with multiple layers
and a much more complex value.
What type of definition is this code an example of?
Answer: This is a circular definition
What type of definition is this code an example of?
Answer: This is a recursive definition
Which aspect of a programming language would not likely affect the execution time (speed) of
a program? The compiler
,What is a programming language library? A set of related modules, possibly precompiled
Which programming language is best used for developing web apps? Python
What does a use case diagram do? Provides an overview of several use cases
Which two statements about object-oriented design (OOD) are true? OOD emphasizes
defining objects and their relationships to fulfill the requirements identified during the analysis
phase.
A class diagram is an OOD deliverable that describes the static structure of a system by showing
the system's classes, their attributes, and the relationships between the classes.
How does a hash-based index increase lookup speed? By mapping a given keyword to its
index
What is a user-defined prototype for an object? Class
What is the correct rule regarding the number of elements a Python list may contain? It
must be a sequence of zero or more elements.
Is assembly language high level or low level language? Low Level (C is an assembly language)
Are object oriented languages high level or low level languages? High level
What are three components of a class? Name(type), attribute(properties),
behavior)operations
, What is the Superclass? What is the subclass? Parent, child
What is the acronym that describes object-orientation? APIE - Abstraction, Polymorphism,
Inheritance, Encapsulation
What are the questions you ask when going over: Gather Requirements Who will use this
application?
What is the end goal of this application? Who does it help?
Where would the user access this application?
When would the user access this application?
How would the student use this application?
What are the questions you ask when going over: Describe the App What will it do?
What will it not do?
What systems will it need to interact with?
What security concerns are there?
What does it look like?
What are the questions you ask when going over: Identify the main objects What are the
main objects?
Are there any secondary objects?
What objects should we not include?
What are the questions you ask when going over: Describe the interactions What are the
behaviors of the objects identified in the previous step?
What are the responsibilities of the objects identified in the previous step?
How will objects interact with each other?
How will this look in the sequence diagram?