Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

FinalExam Review Fall2005: What’s the Diff?

Questions? Comments? Answers?
(Back to Final Exam Review Fall2005)


(a) Discrete Event Simulations Continuous Simulations
Discrete Event Simulations is concerned with events that happen in steps when you are not concerned with every variable in the world. Continuous Simulations try to capture every moment and every variable that could affect the outcome. Everything can be modeled with a continuous simulation, however i t may be beneficial sometimes CPU-wise to use Discrete Event simulations.

(b) Stacks Queues
Stacks are last in first out, queues are first in first out. Abstract data type.

(c) Trees Lists
Trees maintain a hierarchy while lists are a straight line.

(d) BorderLayout FlowLayout
Borderlayout forces buttons to the borders of a window, Flow is in a straight line

(e) REMOVEDked List Array
Dynamic but slow, Static but fast

Kyle DuPont

(A)Discrete Event Simulations VS. Continuous Simulations:
Both are representations of a system of objects whether in real time or not. They differ in that Continuous Simulations show each moment and Discrete Event Simulations can jump to specific events.

(B)Stacks VS. Queues:
Both hold elements that can only be accessed at one end. Queues are "first in first out" where the first element in is the first to exit, and Stacks are reversed. The first element in is actually the last to leave.

(C)Trees VS. List:
Both hold elements and are used to represent structure and behavior. Trees show hierarchy of elements and linked lists show ordering (linearity).

(D)BorderLayout VS. FlowLayout:
Both arrange the components in a container and sets their size as well. FlowLayout does it left to right with no extra space, and BorderLayout arranges north, south, east, and west with the center receiving the most space.

(E)REMOVEDked List VS. Array:
They both store data, but a linked list is very easy to insert and delete into, and an array is easy to get to a specific element faster.
Removed at TB request




Tannis is closer. For (D), talk about resizing, too. Kyle, why do you think REMOVEDked Lists's are slow? For insertions, they're not. Mark Guzdial

yeah i see what you're saying
Kyle DuPont

a. Simulations are representations of the world (models) that are executed (made to behave like things in the world). Continuous simulations represent every moment of the simulated world, whereas discrete event simulations only represent some moments of time - the ones where something important happens and thus they are powerful for describing situations such as supermarkets and factory floors.

b. Abstract data types have the methods and behaviors defined apart from any implementation of a data structure, thus a description of a stack and a queue without implementation is an ADT. A queue is a first in first out list, thus items are added to the tail and removed from the head. A stack is a last in first out list, thus items are added to and removed from the top.

c. Trees and lists are both types of data structres or representations of information with respect to the conncections between elements. A list is traversed linearly meaning in order from first to last, while a tree can be traversed in several different ways (leading to different renderings/results).

d. Layout managers, such as Border and Flow, determine the rendering of the interface component tree via different traversals. Flow Layouts are arranged from left to right with no extra spaces and thus when they are resized, the elements "flow" to fit into the space. Border Layouts are organized into a north, south, east, west, and center and as they are resized, the center item mantains the most space.

e. Arrays and linked lists are two types of data structures. An array is easy to find items in because they are in a fixed position, but it is difficult to insert because it is a fixed size. A linked list on the other hand is easy to insert because each element knows its location and its next, so to insert you just have to change the next. Student161



Link to this Page