Ib Computer Science Questions
<div class="IPBDescription">need abit of theory help</div> I have my IB computer science exam tomorrow and tuesday(kind of like AP for those that dont know IB). Anyway when I was studying I put together a list of stuff I didnt know. The list is below if you know the answer to one of them a quick post with the answer would be cool, thanks alot <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->
questions:
• Circle queue vs. linear queue
• What is/how do you wrap a stack
• Can you delete items at the bottomof a stack or in the middle of a stack?
• Describe Direct memory access system with reference to buffer?
Thanks alot to anyone that replies <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
Edit - I figured out some so I edited them out
questions:
• Circle queue vs. linear queue
• What is/how do you wrap a stack
• Can you delete items at the bottomof a stack or in the middle of a stack?
• Describe Direct memory access system with reference to buffer?
Thanks alot to anyone that replies <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
Edit - I figured out some so I edited them out
Comments
Linear queue can either be a FIFO(First In First Out) or LILO(Last In Last Out, not to be confused with the totally awsome linux loader), think a line of people and a stack of dishes. A very logical way to do a queue, nice and simple.
Wrapping a stack sounds like something you would do with a circle queue, just point the last at the first (could be the first of another stack too if you like)
Deleting from a stack: this gets complicated, and generally depends on how you designed the queue class, or if your just using an array. If your doing a linear queue you are only SUPPOSED to remove the first/last depending on which style you are using. If you remove an element from the queue you generally need to reindex it so there are no empty spots. If your using points in a queue class this just involves repointing over the empty spot (queue.index-1=queue.index+1 more or less) and if your using an array you usuually have to move it all to a tmp and then back. A good for loop is all you need there.
Direct memory acces, what fun. Not quite shure what your trying to ask here. If you want to access the memory address of a variable you usually do this with (int x=0; int *xptr=&x;) That will make xptr exactly the same as x because thier memory address is the same, so any change to x changes xpr.
syntax
The rules governing the structure of a language statement. It specifies how words and symbols are put together to form a phrase.
The langue translator (compiler if you like) determines the syntax rules.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Describe how a stack can be used during the execution of a program
that contains procedures(the including of describing with procedures
confused me, I know how a stack works but with 'procedures'?)<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
I suggest doing your own homework on this one as this came right off a review and isnt really pertinant to anyone else.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Describe how the transaction files are used to update the central database<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
This all depends on what you want to do. If i were doing this, I would have the central DB read over the transactions and update the DB accordingly to what I have in the transaction files. You might want to ask your teacher the correct answer for this, or what they want, because there is an infinate number of ways to do this.,
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Polling versus interrupts between server and cash desks<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
IF your writing softwat to interact from a cash desk and a server I would do "polling" i guess. The vocabulary your using is very subjective, so its hard for me to give you a definate definition. But I would have the client (cash desk) update the server at the proper times, and if there is a wait, you just put the client in line. Just be careful not to lock up the computer doing this, youd probably want to give it a timestamp and a waittime or something so your not asking ther server every .001ms if it has an opening yet.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->WAN- distributed processing versus central processing<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
WAN (in this case, a VERY wide area, like new york and SanFran kinda wide)
+spread out so if one node location dies the others are safe
-spread out so its slower
Central (were talking all withint 100 feet)
+centralized for speed
-All the data in one place is a bit of a liability
Those are the only big pros and cons I can think of right now. Your teacher however probably has a mroe specific answer.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Describe the advantages of the group writing their programs in modules(what are modules)<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
This is the foundation of Object Oriented Programming (OOP). Modules is a term to descripe code that fits together in parts. Usually when you get into a group you develop some standards so that everyone develops thier own parts, which can all be completly differnet. The standards come in when you need to talk between the different parts. Think of a car, you have an engine module and a gear shifter module. They were developed by different people but interact through a series of standard interconnections rules they work together. THis is kinda the same basic idea.
Now, just so you know the validity of my answers. I am a comp scie major at UofH and have been programming alot. From your question I take it you use windows at school and at home and program with Visual studio at school, and possible at home (pirated for the win!) I imagine your also a first year student, mostly because of your questions, but also that your posting in an NS forum, and not a c++ forum, but what can you do.
These are more or less the right answers, however I dont suggest putting them on the test because your teacher is probably a windows slave and will only accept answers thier way. Get the "right" answers from a classmate/book/teacher.
Good luck with your tests though.
Best of luck with your exams. I know how hard they can be, doing a car course at college myself.
The circle queue actually refers to the way memory is queued for execuation. As all information traverses the circle queue and is referenced by the head in the forward direction, assigning each element in turn to node value int he memory. A linear queue allows for the elements to be regarded individually. Since this forms an immutable collection, you cannot insert an element into it or remove an element from it
Wrapping the stack actually refers to allocating memory locations surrounding the blocks of queue memory. These references to adjacent memory locations can sometimes lead to over head or memory leaks.
Deleting from the stack in most instances depends on how the stack is arranged. The queue does not matter as much as the adjacent memory locations as your change the bit for the EOF. In this regard it arrays become an essential part of deleting form stacks as it allows for the structured arrangement of dats (queue.index-1=queue.index+1).
Direct Memory access is just a stupid question.
Syntax is the defined states within the study of signs as the first of its three subfields, syntax, the study of the interrelation of the signs regarding location tables as they are used for semantic structure.
These graders are just gonna go through the thousands of tests and simply comare it with an answer key and give it no extra thought. If its not in the format they expect it, your probably not going to get credit. I'll conceded that infinate is a bit of an exaggeration, but what can you do.
*edit* and wikipedia
Each question is worth x points.
There is a list of items, each one worth a set number of points.
As you touch on the items you gain their points (up to the max).
And yes, this is EXACTLY how AP tests are scored (and they are done in school also, though never does a teacher get his/her classes exams)