100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

WGU D278 Final Exam Prep Scripting and Programming - Foundations || Questions and Correct Detailed Answers ||100% Guaranteed Pass!! <Latest Version>

Rating
-
Sold
-
Pages
56
Grade
A+
Uploaded on
25-01-2025
Written in
2024/2025

WGU D278 Final Exam Prep Scripting and Programming - Foundations || Questions and Correct Detailed Answers ||100% Guaranteed Pass!! &lt;Latest Version&gt; 1.Algorithm- ANSWER Algorithm step-by-step procedure for solving a problem, generating correct output for any valid input values. Has an input, a question to answer, and desired output. Reduces the number of steps. Ensures proper ordering to improve accuracy. Computers need all steps stated clearly, making a pb&j. Don't skip steps, don't assume it knows missing steps. 2.Flowchart- ANSWER A Flowchart depicts a program graphically, using a node for each statement. 3.Statement- ANSWER A Statement action in a program that the interpreter carries out. It gets a value from input into a variable, assign a variable with a value, or puts a value to the output. Example: In the picture, each shape is a statement. 4.Universal Modeling Language (UML) (2) - ANSWER Universal Modeling Language (UML) modeling language for software design that uses different types of diagrams to visualize the structure and behavior of programs. Used in the planning process prior to when code is written. Structural Diagram visualizes static elements of software, such as the types of variables and functions used in the program (objects). The components of the program. Behavioral Diagram visualizes dynamic behavior of software, such as the flow of an algorithm (what's happening). How things work, how the objects fit together. 5.UML Diagrams (4 - Not Their Definitions) - ANSWER UML VISUAL Diagrams: Use Case Diagram Class Diagram Activity Diagram Sequence Diagram 6.Use Case Diagram- ANSWER Use Case Diagram (behavioral) used to model how a user interacts with a program. Actions from users and the accompanying actions in software, as well as connections between different components of the software. 7.Class Diagram & Class- ANSWER Class Diagram (structural) models the classes, or objects, of a program, including class' name, data members and functions. Class a code blueprint for creating an object that is composed of data members and functions that operate on those data members. Data Members various data types, such as integers, floating-point numbers, strings, booleans, or user-defined types. Pictured The "Car" class consists of two string member variables "make" and "model". Member variable names are followed by a colon and then the member variable type. The CarForSale class has a float member variable salePrice and an integer daysOnLot. A car for sale is still a car, so the CarForSale class can inherit the make and model members from the Car class, using inheritance. An arrow indicates that a class inherits the data member and functions of another class. The UsedCarLot class has a cars member that store a list of Cars and a sellCar member function to sell a car on the lot. The unfilled diamond indicates the UsedCarLot class "has" CarForSale items, which are elements of the class' cars list. A diamond connecting two classes indicates one class has data members of another class type. 8.Activity Diagram- ANSWER Activity Diagram (behavioral) flowchart of an activity (loop, function, etc.) within the program. 9.Sequence Diagram- ANSWER Sequence Diagram (behavioral) interaction between software components and the order of events. Pictured A sequence diagram can be used to illustrate the sequence of events for a web search. Horizontal arrows are used to indicate communication between the computer and the web server. Vertical dashed lines represent the lifelines of the computer and server. Horizontal dashed lines represent responses from the server. Time passes from top to bottom in the diagram, allowing the ordering of events to be determined. 10.Software Requirements Specification (SRS) - ANSWER The analysis phase of each approach commonly produces a Software Requirements Specification (SRS), a document describing all requirements for the software product. An SRS commonly has UML diagrams for several of the software product's use cases. 11.Type Conversion & Implicit Conversion- ANSWER A Type conversion conversion of one data type to another, such as an integer to a float. Implicit Conversion conversions between integer and float types automatically performed by Coral. If either operand is a float, the other is automatically converted to float. integer-to-float conversion is straightforward: 25 becomes 25.0. float-to-integer conversion just drops the fraction: 4.9 becomes 4. 3.0 / 2 = 1.5 2 is first converted to 2.0, then 3.0 / 2.0 yields 1.5. (numItems + 10) / 2 = 7 (numItems = 5) 5 + 10 is 15. 15 / 2 yields 7 (remainder of 1 is ignored). (numItems + 10) / 2.0 = 7.5 (numItems = 5) 5 + 10 is 15. That integer is converted to float 15.0. Then 15.0 / 2.0 yields 7.5. 12.Type Cast- ANSWER A Type Cast converts a value of one type to another type, integer to floating-point. A programmer can type cast an integer to float by multiplying the integer by the float literal 1.0. Example: If myIntVar is 7, then myIntVar * 1.0 converts integer 7 to float 7.0. In the picture, the program casts the numerator to float so floating-point division is performed. 13.Modulo Operator- ANSWER A Modulo Operator (%) evaluates to the remainder of the division of two integer operands. Examples 9 % 5 = 4. Reason: 5 goes into 9 one time and 5 - 9 = 4. 70 % 7 is 0. Reason: 70 / 7 is 10 with remainder 0. 1 % 2 is 1. Reason: 2 goes into 1 zero times and 2 - 1 = 0 10 % 4.0 is not valid. "Remainder" only makes sense for integer operands because 4.0 does not go into 10 at all. 100 % (1 / 2) = Error. Reason: 1 / 2 is 0. 100 % 0 is undefined (as 100 / 0 is undefined) and causes the program to terminate. 14.Boolean- ANSWER A Boolean quantity that has only two possible values, true or false. 15.Constant- ANSWER A Constant named value item that holds a value that cannot change. Good practice is to name constants using upper case letters with words separated by underscores, to make constants clearly visible, PRICE_DISCOUNT. Pi is a mathematical constant. 16.Program (3) - ANSWER A Program statements executing one at a time. Input: Program gets data, from file(s), keyboard, touchscreen, network. Process: Program performs computations on that data, adding two values like x + y. Output: Program puts that data somewhere, file, screen, network. Computational Thinking Computational Thinking creating a sequence of instructions to solve a problem. 17.Variables- ANSWER A Variables name with a value that can be changed, x, y, z, numPeople. 18.Code: Variables and Assignments- ANSWER A Code: Variables and Assignments uses code to describe a flowchart's variables and statements. 1) Declare each variable's type and name, one variable declaration per line. 2) List each program statement in order, one statement per line. 19.Function Equations (4) - ANSWER A SquareRoot() AbsoluteValue() = |y| = AbsoluteValue(y) RaiseToPower() = x^3 = RaiseToPower(x, 3) SeedRandomNumbers() -elseif Branches- ANSWER A if-elseif Branches have cascaded decisions along the false branches. Only one true branch can execute. If-elseif branches are commonly used to detect ranges, with the lower end of the range implicit.

Show more Read less
Institution
WGU D278 Scripting And Programming
Course
WGU D278 Scripting and Programming











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D278 Scripting and Programming
Course
WGU D278 Scripting and Programming

Document information

Uploaded on
January 25, 2025
Number of pages
56
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

WGU D278 Final Exam Prep 2025-2026
Scripting and Programming -
Foundations || Questions and Correct
Detailed Answers ||100% Guaranteed
Pass!!
<Latest Version>

1.Algorithm- ANSWER ✔
Algorithm step-by-step procedure for solving a problem, generating correct output
for any valid input values. Has an input, a question to answer, and desired output.
Reduces the number of steps. Ensures proper ordering to improve accuracy.
Computers need all steps stated clearly, making a pb&j. Don't skip steps, don't
assume it knows missing steps.

2.Flowchart- ANSWER ✔ A
Flowchart depicts a program graphically, using a node for each statement.




3.Statement- ANSWER ✔ A
Statement action in a program that the interpreter carries out.
It gets a value from input into a variable, assign a variable with a value, or puts a
value to the output.
Example: In the picture, each shape is a statement.

,4.Universal Modeling Language (UML) (2) - ANSWER ✔
Universal Modeling Language (UML) modeling language for software design that
uses different types of diagrams to visualize the structure and behavior of
programs. Used in the planning process prior to when code is written.
Structural Diagram visualizes static elements of software, such as the types of
variables and functions used in the program (objects). The components of the
program.
Behavioral Diagram visualizes dynamic behavior of software, such as the flow of
an algorithm (what's happening). How things work, how the objects fit together.

5.UML Diagrams (4 - Not Their Definitions) - ANSWER ✔
UML VISUAL Diagrams:
Use Case Diagram
Class Diagram
Activity Diagram
Sequence Diagram




6.Use Case Diagram- ANSWER ✔
Use Case Diagram (behavioral) used to model how a user interacts with a
program.
Actions from users and the accompanying actions in software, as well as
connections between different components of the software.




7.Class Diagram & Class- ANSWER ✔
Class Diagram (structural) models the classes, or objects, of a program, including
class' name, data members and functions.
Class a code blueprint for creating an object that is composed of data members
and functions that operate on those data members.
Data Members various data types, such as integers, floating-point numbers,
strings, booleans, or user-defined types.

,Pictured
The "Car" class consists of two string member variables "make" and
"model". Member variable names are followed by a colon and then the
member variable type.
The CarForSale class has a float member variable salePrice and an integer
daysOnLot.
A car for sale is still a car, so the CarForSale class can inherit the make and model
members from the Car class, using inheritance. An arrow indicates that a
class inherits the data member and functions of another class.
The UsedCarLot class has a cars member that store a list of Cars and a sellCar
member function to sell a car on the lot.
The unfilled diamond indicates the UsedCarLot class "has" CarForSale items,
which are elements of the class' cars list. A diamond connecting
two classes indicates one class has data members of another class type.




8.Activity Diagram- ANSWER ✔
Activity Diagram (behavioral) flowchart of an activity (loop, function, etc.) within
the program.




9.Sequence Diagram- ANSWER ✔
Sequence Diagram (behavioral) interaction between software components and
the order of events.
Pictured
A sequence diagram can be used to illustrate the sequence of events for a web
search.
Horizontal arrows are used to indicate communication between the computer and
the web server.
Vertical dashed lines represent the lifelines of the computer and server.
Horizontal dashed lines represent responses from the server.

, Time passes from top to bottom in the diagram, allowing the ordering of events to
be determined.




10.Software Requirements Specification (SRS) - ANSWER ✔
The analysis phase of each approach commonly produces a Software
Requirements Specification (SRS), a document describing all requirements for the
software product. An SRS commonly has UML diagrams for several of the
software product's use cases.




11.Type Conversion & Implicit Conversion- ANSWER ✔ A
Type conversion conversion of one data type to another, such as an integer to a
float.
Implicit Conversion conversions between integer and float types automatically
performed by Coral. If either operand is a float, the other is automatically
converted to float.
integer-to-float conversion is straightforward: 25 becomes 25.0.
float-to-integer conversion just drops the fraction: 4.9 becomes 4.
3. = 1.5
2 is first converted to 2.0, then 3..0 yields 1.5.
(numItems + 10) / 2 = 7 (numItems = 5)
5 + 10 is 15. yields 7 (remainder of 1 is ignored).
(numItems + 10) / 2.0 = 7.5 (numItems = 5)
5 + 10 is 15. That integer is converted to float 15.0. Then 15..0 yields 7.5.




12.Type Cast- ANSWER ✔ A

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfBenjamin Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
469
Member since
1 year
Number of followers
14
Documents
3238
Last sold
9 hours ago
EXCELLENT ACHIEVERS LIBRARY

As a professional tutor, I provide exceptional assistance with homework, quizzes, and exams across various subjects, including Psychology, Nursing, Biological Sciences, Business, Engineering, Human Resource Management, and Mathematics. I am dedicated to offering high-quality support and ensuring that all work meets scholarly standards. To enhance the effectiveness of our services, I work with a team of experienced tutors to create comprehensive and effective revision materials. Together, we are committed to helping students achieve excellent grades through our collaborative efforts and expertise.

Read more Read less
3.8

91 reviews

5
41
4
13
3
25
2
5
1
7

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions