Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Computer Problem Solving in EGR 1400, Engineering and Computer Science, 2023 — Final exam study guide with complete solutions

Rating
-
Sold
-
Pages
19
Grade
A+
Uploaded on
25-02-2026
Written in
2023/2024

This document contains a full EGR 1400 Final Exam review set with correct answers, covering core Visual C# programming concepts (GUI controls, events, loops, arrays, structs, methods, file I/O, and LINQ/XML). It also includes broader course topics like basic computing terms, statistics for simulations (mean/variance/standard deviation), and applied engineering/math content such as circuit formulas, projectile motion relations, and an extensive MATLAB section (arrays, strings, tables, loops, functions, curve fitting, and interpolation). Answers are provided for each item, making it ideal for fast final-exam revision and checking your understanding across the whole course.

Show more Read less
Institution
Graduation In Computer Science
Course
Graduation in computer science

Content preview

EGR 1400 FINAL EXAM WITH COMPLETE SOLUTIONS

1. Message Box Syntax - CORRECT ANSWER MessageBox.Show("[Message]");

2. ListBox control - CORRECT ANSWER Used to create a ListBox control class
object. Properties include Name, Items, Sorted, SelectedItem, and SelectedIndex.
Methods include Items.Add(), Items.Remove(), and Items.Clear(). Events include
SelectedIndexChanged.

3. for loop - CORRECT ANSWER Loops that have a predetermined beginning,
end, and increment (step interval). In the for (i = 0; i <20; i++) { ... }

4. do-while loop - CORRECT ANSWER do { ... } while (condn) Note: Runs through
statements at least once before it reaches the while condition

5. while loop - CORRECT ANSWER while (condn) { ... } Note: Can run for [0, ∞)
repetitions

6. Nested Loop - CORRECT ANSWER A loop inside the body of another loop.
Your inner loop does a task, which actually is iterative in nature and your outer
loop does that task again and again depending on your condition.

7. File I/O - CORRECT ANSWER stands for file input/file output.

8. StreamReader - CORRECT ANSWER An object used to open a text file and read
streams of text, uses the ReadLine command

9. StreamWriter - CORRECT ANSWER An object used to open a text file and write
to it, uses the WriteLine command, if true(adds new line) if false(overwrites)

10. What happens if I don't close a file after I open it to use StreamWriter? -
CORRECT ANSWER All of the data in the original file will be erased so make
sure you make a copy of the file before using StreamWriter just in case.

11. Methods - CORRECT ANSWER Creating new custom commands to make
programs cleaner/less repetitive

12. Using methods - CORRECT ANSWER To call a method, simply write the
following: [name of object].(method with or without parameters as inputs)

13. In methods, what is the difference between void and returning? - CORRECT
ANSWER The void keyword is used in method signatures to declare a method
that does not return a value. A method declared with the void return type cannot
provide any arguments to any return statements they contain. Methods with

, EGR 1400 FINAL EXAM WITH COMPLETE SOLUTIONS

return statements take in arguments, manipulate them in some way, and return a
manipulated value of some specified type.

14. Public vs Private keywords in methods - CORRECT ANSWER Public methods
are written in one project and are able to be accessed by other projects. Private
methods limit the method's use to only the project containing it.

15. Passing parameters by reference - CORRECT ANSWER The variable will be
passed in updated and passed back out. Before being referenced by a ref method,
variables remain in their initial condition. Once they are passed through the ref
method, the variable remains changed as it was manipulated in the method.

16. Passing parameters by value - CORRECT ANSWER The variable will be passed
in and not updated. Changes are made to 'copies' of the input variables.

17. Return values - CORRECT ANSWER The specified type of values you want a
method to return once it manipulates the initial parameters.

18. Form-level variable - CORRECT ANSWER Variable that can be used by any
method in a form.

19. Method-level Variables - CORRECT ANSWER Variables whose use is limited to
the method in which they are initialized.

20. Arrays - CORRECT ANSWER Variables that can store groups of the same type
of values without having to create multiple individual variables. (Think of it like
filling up a bookshelf where each slot in memory is a shelf. Also, remember that
the index starts at 0 meaning if you create an array like int[5], the index will go
from 0 to 4.)

21. Structs - CORRECT ANSWER Kinda like creating your own objects to perform
whatever functions you define them to.

22. Arrays of structures - CORRECT ANSWER After creating a struct with multiple
parameters as inputs, you can do structName[ ] structArr = new structName[# of
slots] so that the slots in the array can store multiple values from the parameters
passed into the struct.

23. Passing arrays as parameters into methods - CORRECT ANSWER Arrays are a
reference type in C#. This means that each time an array is passed as an
argument to any function, the reference (or pointer) to the argument is passed to

, EGR 1400 FINAL EXAM WITH COMPLETE SOLUTIONS

the function. Thus any modifications you make to the array in the function are
made in the actual argument also.

24. Reading from files with StreamReader - CORRECT ANSWER When you create
the instance of the StreamReader class, you provide the relative or absolute path
to the file.
Initialized by System.IO.StreamReader readerName;
readerName = System.Io.File.OpenText("Input.txt");

25. Writing to files with StreamWriter - CORRECT ANSWER StreamWriter writes
new data into a file by replacing its original contents with the changed version.
Initialized by System.IO.StreamWriter writerName;
writerName = System.IO.File.CreateText("Input.txt");

26. LINQ - CORRECT ANSWER Stands for Language Integrated Query.
Super useful for populating fields as the form loads (so it doesn't need to be
triggered by an event to appear).
You can populate a string using a text file a lot easier than StreamReader/Writer
by doing:
string[ ] strArr = File.ReadAllLines("Input.txt");
*This works as long as the input file is in the same folder as the project*
You can also populate a numeric array and listbox using a text file by doing:
int [ ] nums = new int[100];
string[ ] strArr = File.ReadAllLines("Numbers.txt");
foreach (string s in strArr)
{
listbox1.Items.Add(s);
}
for (int i = 0; i < 100; i++)
{
nums[i] = int.TryParse(strArr[i]);
}

27. Lab 5 - CORRECT ANSWER Checkboxes: Allows a user to select multiple
options, whereas Radio Buttons allow only one.
Pictures: PicBoxes to put pictures on your form; you can change the Visible
property to decide which image is shown depending on user input.
Slider: Trackbars are used to allow the user to increment values by a set amount
and the limits the number of increments to an inclusively bounded set.
(See Lab 5: Circuit Analyzer example)

Written for

Institution
Graduation in computer science
Course
Graduation in computer science

Document information

Uploaded on
February 25, 2026
Number of pages
19
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$12.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
STUVIAVERIFIEDEXAMS

Also available in package deal

Thumbnail
Package deal
EGR 1400 COMPLETE EXAM PACKAGE
-
3 2026
$ 19.38 More info

Get to know the seller

Seller avatar
STUVIAVERIFIEDEXAMS Oakland University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 months
Number of followers
0
Documents
40
Last sold
2 months ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions