WGU Scripting and Programming Foundations Exam Practice Test

Page: 1 / 14
Total 138 questions
Question 1

Which phase of a Waterfall approach defines specifics on how to build a program?



Answer : A

Comprehensive and Detailed Explanation From Exact Extract:

The Waterfall methodology is a linear, sequential approach with phases including requirements analysis, design, implementation, testing, and maintenance. According to foundational programming principles (e.g., Certiport Scripting and Programming Foundations Study Guide), the design phase is where the specifics of how to build the program are defined, including system architecture, modules, and technical specifications.

Waterfall Phases Overview:

Analysis: Defines what the program should do (requirements, e.g., user needs or system goals).

Design: Defines how the program will be built (e.g., architecture, data models, function specifications).

Implementation: Writes the code based on the design.

Testing: Verifies the program meets requirements.

Option A: 'Design.' This is correct. The design phase produces detailed plans, such as system architecture, database schemas, and function or object specifications, outlining how the program will be constructed. For example, it might specify a function like calculateScore() or a class like User.

Option B: 'Testing.' This is incorrect. Testing verifies the implemented program, not the planning of how to build it.

Option C: 'Analysis.' This is incorrect. Analysis focuses on gathering requirements (what the program should do), not technical specifics of implementation.

Option D: 'Implementation.' This is incorrect. Implementation involves coding the program based on the design's specifics, not defining them.

Certiport Scripting and Programming Foundations Study Guide (Section on Waterfall Methodology).

Sommerville, I., Software Engineering, 10th Edition (Chapter 2: Waterfall Model).

Pressman, R.S., Software Engineering: A Practitioner's Approach, 8th Edition (Waterfall Design Phase).


Question 2

Which type of language requires variables to be declared ahead of time and prohibits their types from changing while the program runs?



Answer : C

The type of language that requires variables to be declared ahead of time and prohibits their types from changing while the program runs is known as a statically typed language. In statically typed languages, the type of a variable is determined at compile-time and cannot be changed during runtime. This means that the compiler must know the exact data types of all variables used in the program, and these types must remain consistent throughout the execution of the program. Statically typed languages require developers to declare the type of each variable before using it, which can help catch type errors during the compilation process, potentially preventing runtime errors and bugs.


https://www.remotely.works/blog/understanding-the-differences-static-vs-dynamic-typing-in-programming-languages

Question 3

Which three statements describe a characteristic of a programming library?



Answer : A, B, D

A programming library is a collection of pre-written code that developers can use to optimize tasks and improve productivity. Here's why the selected statements are correct:

A: Libraries must be included or imported into your program before you can use the functions or objects they contain.This is because the program needs to know where to find the code it's executing12.

B: A library typically includes multiple functions, objects, or classes that are related to a specific task or area of functionality.This allows developers to reuse code efficiently12.

D: By providing pre-written code, libraries save developers time and effort, which in turn improves their productivity.Instead of writing code from scratch, developers can focus on the unique aspects of their project12.

The other options are incorrect because:

C: While it's true that poorly designed libraries can affect performance, well-designed libraries can actually make programs more efficient by providing optimized code.

E: A single program can include multiple libraries as needed. There's no limit to the number of libraries a program can use.

F: Libraries often contain multiple functions and variables, not just one function.


CareerFoundry's guide on what a programming library is1.

Codingem's complete guide on libraries in programming2.

Question 4

Which characteristic specifically describes an object-oriented language?



Answer : A

Comprehensive and Detailed Explanation From Exact Extract:

Object-oriented languages are defined by their use of objects, which combine data (attributes) and operations (methods) to model real-world entities. According to foundational programming principles, this encapsulation of data and behavior is a hallmark of OOP languages.

Option A: 'Supports creating programs as items that have data plus operations.' This is correct. OOP languages (e.g., C++, Java, Python) organize programs into objects, where each object contains data (fields or attributes) and operations (methods). For example, a Car object might have data like speed and methods like accelerate().

Option B: 'Supports creating programs as a set of functions.' This is incorrect. This describes functional or procedural languages (e.g., C, Haskell), where programs are structured as functions or procedures, not objects.

Option C: 'Requires a compiler to translate to machine code.' This is incorrect. Not all OOP languages require compilation to machine code (e.g., Python is interpreted). Compilation is a characteristic of some languages (e.g., C++, Java), not a defining feature of OOP.

Option D: 'Can be run on any machine that has an interpreter.' This is incorrect. While some OOP languages (e.g., Python) are interpreted, others (e.g., C++) are compiled. Interpretability is not specific to OOP.

Certiport Scripting and Programming Foundations Study Guide (Section on Object-Oriented Programming).

Java Documentation: ''Defining Classes'' (https://docs.oracle.com/javase/tutorial/java/javaOO/).

W3Schools: ''Python Classes and Objects'' (https://www.w3schools.com/python/python_classes.asp).


Question 5

One requirement for the language of a protect is that it is based on a series of method calls.

When type of language is characterized in this way?



Answer : C

A language characterized by a series of method calls is typically referred to as a functional language. In functional programming, computation is treated as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements. In functional languages, functions are first-class citizens, meaning they can be passed as arguments to other functions, returned as values from other functions, and assigned to variables.


Question 6

A programmer is writing a simu-lation for a physical experiment. Which phase of the agile approach is being carried writing new procedural code and eliminating certain function calls?



Answer : C

In the context of the Agile approach, the phase where new procedural code is written and certain function calls are eliminated is known as theImplementationphase. This phase involves the actual coding and development of the software, where programmers write new code and refine existing code to meet the requirements of the project. It is during this phase that the software begins to take shape, and the functionality outlined during the design phase is executed.

The Agile methodology is iterative, and the implementation phase is where each iteration's goal is to produce a working increment of the product. This phase is characterized by frequent testing and revision, as the development is aligned with user feedback and changing requirements.


Question 7

Which action occurs during the design phase of an Agile process?



Answer : A

Comprehensive and Detailed Explanation From Exact Extract:

In Agile, the design phase focuses on creating technical specifications and plans for implementing the software, including identifying functions, classes, or modules. According to foundational programming principles, this phase bridges requirements (from analysis) to coding (in implementation).

Option A: 'Determining the functions that need to be written.' This is correct. During the design phase, the team specifies the functions, methods, or components (e.g., function signatures, class methods) required to meet the requirements. For example, designing a calculateTotal() function for an e-commerce system occurs here.

Option B: 'Determining the goals of the project.' This is incorrect. Project goals are established during the analysis phase, where requirements and user stories are defined.

Option C: 'Writing the required objects.' This is incorrect. Writing code (e.g., implementing classes or objects) occurs during the implementation phase, not design.

Option D: 'Deciding on the name of the program.' This is incorrect. Naming the program is a minor decision, typically made earlier (e.g., during project initiation or analysis), and is not a primary focus of the design phase.

Certiport Scripting and Programming Foundations Study Guide (Section on Agile Design Phase).

Agile Alliance: ''Agile Design'' (https://www.agilealliance.org/glossary/design/).

Fowler, M., Refactoring: Improving the Design of Existing Code (design principles in Agile).


Page:    1 / 14   
Total 138 questions