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
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

ISTM 250 EXAM 3 QUESTIONS WITH VERIFIED SOLUTIONS LATEST UPDATE 2026

Document preview thumbnail
Preview 2 out of 11 pages

ISTM 250 EXAM 3 QUESTIONS WITH VERIFIED SOLUTIONS LATEST UPDATE 2026 Methods in Queue() - Answers .____ Enqueue (element) - Specified object to end of queue (puts in back of line) (LIKE ADD IN LISTS) Dequeue () - First object @ front removed from Queue (LIKE REMOVE IN LISTS) Clear() - All items removed from queue Peek() - Retrieves next item in queue, doesn't delete it (looks, good for loops) Arrays & Collections: - Answers Objects that act as "containers:" have to be same value types ARRAY (.NET Class): Group of related variables (can be retrieved) COLLECTIONS: (Classes in the .NET framework), variable in size (unlike arrays), feature of C# Arrays - Answers Class of HOMOGENEOUS DATATYPES (can also work w/ strings) Shortcut from creating separate variables for every user-input. Use elements to combine them into an array. Exist in ALL programming languages! Arrays in excel - Answers Highlight range of cells (indexes) Indexes - Answers Order array elements starting from 0. Array Format (single statement): - Answers type [#] arrayName array = new type [arrayLength]; type = datatype of array "arrayLength" is how many elements you want to add # = elements, each with its own space/size/amount (values in bytes pulled aside and reserved) Instantiating new array - Answers (one line) = new type[length from 0]; Number in length assigns x locations in memory to hold values. Starting Address is the beginning point Default values for array elements - Answers BEFORE ADDING/ASSIGNING VALUES: Numeric = 0 Char = '0' (null character) Boolean = false Date Time = 01/01/0001 00:00:00 Reference = null Length of Array: - Answers SIZE: Amount of elements in the array (starting from 0) Assign array elements their value: - Answers Assignment Statement: Ascending Order: arrayName [index] = value; Trying to assign more elements than the declared array holds. - Answers Index Out of Range Exception Declaring and assigning arrays/collections in one statement: - Answers INITIALIZER: type[] arrayName = {w, x, y, z}; (size infered) Commas help understand amount of elements in array! Array Length Property - Answers arrayName.Length - how many elements in array Length can be used in average equations (array sum of values / array length) Foreach Loop - Answers ACCESS ARRAYS AND COLLECTIONS foreach (type elementName in arrayName) { code; } (best if all elements, only certain use for) Element name random, not established before Array Shapes: - Answers One-dimensional (linear) Rectangular/2D [row, column] Properties of Arrays: - Answers Name.Length (number of elements in all dimensions) Static Method of Arrays: - Answers Methods of Array Class (Array.___) Copy (array, array, length) BinarySearch(array, value) Sort(array) Sort - Answers Sorts 1D array elements in ascending/alphabetic order. (DON'T HAVE TO INSTANTUATE) Array.Sort(NAME); Binary Search - Answers Arrays & Lists (Collections) Searches 1D array that's ALREADY SORTED ASCENDING (applies to both) for an element, returns index. ValueName = Array.BinarySearch(Name, Value); " " = " "[ValueName]; (Negative number if index not found) Copy - Answers CAN'T SET TWO ARRAYS @ EQUAL, will just create new name for memory space. OVERLOADED METHOD: More than one implementation. Beg: Array.Copy(from, to, length/element amount to copy); Can be array.Length to copy all elements to the other Not Beg/Certain Spot: (from, from index, to, to index, length) Methods that accept arrays as arguments to change their elements: - Answers PASSED AS REF BY DEFAULT! private VOID Name(type[] Name) { for(int i = 0; i ArrayName.Length; i++) { ArrayName[i] + code; } ARRAY ARGUMENTS = CHANGING ELEMENTS, NOT RETURNING NEW VALUE Called w/ no "=" sign Types of Collection Classes: - Answers ArrayList - Index to store/access each element (best sequentially, worse at putting elements into middle of list). Queue & Stack - Methods to add/remove elements (MORE limited) Lists above are ONLY c# centric Collection code for list: - Answers List type Name = new Listtype(); List Add Method - Answers Adds values/items to list automatically (has to compile w/ list type) Accessing list elements w/ for loop: - Answers for (int i = 0; i List.Count; i++) { type number = List[i]; } Properties of list: - Answers Capacity - (like length of arrays) Number of elements list can hold, WON'T SET VALUE Count - Elements in list (null values by default, won't count those!) Indexer for lists: - Answers Gets or sets element at the index (starts @ 0). List Methods: - Answers .____ Add(object) - Adds element to the end of the list, returns index Clear() - Removes all elements, count property is 0. Contains(object) - Boolean, if object is present Insert(index, object) - rest of list shifted one place right Remove(object) - FIRST OCCURENCE only, shifts list left RemoveAt(index) BinarySearch(object) - searches list, returns index Sort() - ascending Add elements to list past capacity: - Answers Capacity doubles every time the limit is reached NO capacity set = 4 capacity set by default. Remove ALL of an element in a list - Answers while (List.Contains(element)) - List.Remove(element); Properties of Queue() - Answers Count - number of items in queue Queue - Answers Implements first in, first out method (FIFO) Queuetype nameQueue = new Queuetype(); Stack - Answers Implements last in, first out (LIFO) Stacktype nameStack = new Stacktype(); Properties of Stack() - Answers Count Methods of Stack() - Answers .____ Push (object) - adds onto top of stack Pop() - Top object removed Clear() Peek() DateTime - Answers Datatype, stored as numbers DateTime dtVariableName = new DateTime(4-digit-year, month, day[, hour-sec[, milisecond]]); Can parse/try parse to take string elements and put it into a date time: DateTime dtVariableName = DateTime.Parse ("01/30/2023", etc.) - converts to time

Content preview

ISTM 250 EXAM 3 QUESTIONS WITH VERIFIED SOLUTIONS LATEST
UPDATE 2026


Methods in Queue() - Answers .____

Enqueue (element) - Specified object to end of queue (puts in back of line) (LIKE
ADD IN LISTS)
Dequeue () - First object @ front removed from Queue (LIKE REMOVE IN LISTS)
Clear() - All items removed from queue
Peek() - Retrieves next item in queue, doesn't delete it (looks, good for loops)
Arrays & Collections: - Answers Objects that act as "containers:" have to be same
value types

ARRAY (.NET Class): Group of related variables (can be retrieved)
COLLECTIONS: (Classes in the .NET framework), variable in size (unlike arrays),
feature of C#
Arrays - Answers Class of HOMOGENEOUS DATATYPES (can also work w/
strings)

Shortcut from creating separate variables for every user-input. Use elements to
combine them into an array.

Exist in ALL programming languages!
Arrays in excel - Answers Highlight range of cells (indexes)
Indexes - Answers Order array elements starting from 0.
Array Format (single statement): - Answers type [#] arrayName array = new type
[arrayLength];


type = datatype of array
"arrayLength" is how many elements you want to add

# = elements, each with its own space/size/amount (values in bytes pulled aside and
reserved)
Instantiating new array - Answers (one line) = new type[length from 0];

Number in length assigns x locations in memory to hold values.

Starting Address is the beginning point
Default values for array elements - Answers BEFORE ADDING/ASSIGNING
VALUES:

Numeric = 0
Char = '\0' (null character)
Boolean = false
Date Time = 01/01/0001 00:00:00
Reference = null
Length of Array: - Answers SIZE:

, Amount of elements in the array (starting from 0)
Assign array elements their value: - Answers Assignment Statement:

Ascending Order: arrayName [index] = value;
Trying to assign more elements than the declared array holds. - Answers Index Out of
Range Exception
Declaring and assigning arrays/collections in one statement: - Answers
INITIALIZER:
type[] arrayName = {w, x, y, z}; (size infered)

Commas help understand amount of elements in array!
Array Length Property - Answers arrayName.Length - how many elements in array

Length can be used in average equations
(array sum of values / array length)
Foreach Loop - Answers ACCESS ARRAYS AND COLLECTIONS

foreach (type elementName in arrayName)
{
code;
}
(best if all elements, only certain use for)

Element name random, not established before
Array Shapes: - Answers One-dimensional (linear)
Rectangular/2D [row, column]
Properties of Arrays: - Answers Name.Length (number of elements in all
dimensions)
Static Method of Arrays: - Answers Methods of Array Class (Array.___)

Copy (array, array, length)
BinarySearch(array, value)
Sort(array)
Sort - Answers Sorts 1D array elements in ascending/alphabetic order. (DON'T
HAVE TO INSTANTUATE)

Array.Sort(NAME);
Binary Search - Answers Arrays & Lists (Collections)

Searches 1D array that's ALREADY SORTED ASCENDING (applies to both) for an
element, returns index.

ValueName = Array.BinarySearch(Name, Value);
" " = " "[ValueName];

(Negative number if index not found)
Copy - Answers CAN'T SET TWO ARRAYS @ EQUAL, will just create new name
for memory space.

OVERLOADED METHOD: More than one implementation.

Document information

Uploaded on
September 7, 2026
Number of pages
11
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

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

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.
joshuawesonga22
3.5
(14)
Sold
121
Followers
2
Items
15186
Last sold
3 days ago




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