School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,443 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,523 people online right now. Registration is fast and FREE... Join Now!




Intro-Logic Class

 

Intro-Logic Class, 3 questions me and a friend argued over...what do you think?

jpconleyiv

3 May, 2009 - 09:48 AM
Post #1

D.I.C Head
Group Icon

Joined: 9 Mar, 2009
Posts: 88



Thanked: 4 times
My Contributions
Hey everyone!! Below I am posting 3 questions that I and another classmate have been arguing over. They are nothing difficult just textbook questions. I told my friend I would post these with two options to the answer to see what people respond with. So just from reading them and NO LOOKING UP THE ANSWER!!! OFF THE TOP OF YOUR HEAD!!!!

Question #1
When creating a decision table, you must determine how many possible Boolean value combinations exist for the conditions. If there are two conditions, ______ combinations will exist.
A.2
B.4

Question # 2
When merging two files, the condition that terminates the main loop for the program is_______
A. when the first file reaches eof
B. when both files reach eof

Question # 3
The main purpose of UML diagram is_____
A.To facilitate clear communication
B.To provide a blueprint for the system
My answers to the Question would be:
B
B
B

My friends answers are:
B
A
A
What are your answers? Have fun!! Also thinking of maybe posting 3 questions once a week just for fun.Please post a Comment on where I should do that, in Comp-Science forum, or Student Lounge, Etc.. Thanks everyone!!!

User is offlineProfile CardPM
+Quote Post


KYA

RE: Intro-Logic Class

3 May, 2009 - 03:19 PM
Post #2

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 11,192



Thanked: 489 times
Dream Kudos: 2825
Expert In: C, C++, Java

My Contributions
1.)
If by condition you mean

1 2

then the answer is B 4

0 0
0 1
1 0
1 1

Truth tables


2.)

I'm thinking B, but I'd need more info.

3.)

Could be either. UML is supposed to give the reader the "idea" of the system which entails clear communication. However, with the info given I say B.


BBB

User is offlineProfile CardPM
+Quote Post

AdaHacker

RE: Intro-Logic Class

4 May, 2009 - 05:12 AM
Post #3

D.I.C Regular
***

Joined: 17 Jun, 2008
Posts: 378



Thanked: 83 times
My Contributions
1) Ditto what KYA said.

2) How are you supposed to merge 2 files if you don't read all the way through both of them? That's the only way to do it in the general case. The only way A could be correct is if you make a number of assumptions about exactly how the merge is going to be done.

3) All of the above. Or none of the above, depending on how you look at it. In UML Distilled, Martin Fowler writes that there are 3 ways to use UML: sketch, blueprint, and programming language. He considers the use a sketch, i.e. a communication tool, to be by far the most common, but the other 2 are perfectly valid as well. So really, there is no objective answer to this question. The purpose of a UML diagram depends on why you drew it in the first place.
User is offlineProfile CardPM
+Quote Post

welfinator

RE: Intro-Logic Class

6 May, 2009 - 07:02 PM
Post #4

New D.I.C Head
*

Joined: 8 Mar, 2009
Posts: 5

for 2) i would say B if the files were in sorted order
User is offlineProfile CardPM
+Quote Post

BlakeJustBlake

RE: Intro-Logic Class

7 May, 2009 - 06:26 PM
Post #5

D.I.C Regular
Group Icon

Joined: 15 Feb, 2009
Posts: 441



Thanked: 23 times
Dream Kudos: 75
My Contributions
In regards to number 2, it really depends on how you're merging them.
User is offlineProfile CardPM
+Quote Post

Steve_Schlotterer

RE: Intro-Logic Class

20 May, 2009 - 11:42 PM
Post #6

New D.I.C Head
*

Joined: 18 May, 2009
Posts: 12


My Contributions
Answer for Question #1 = B

Answer for Question #2 = B

Answer for Question #3 = both A and B.

QUOTE(jpconleyiv @ 3 May, 2009 - 09:48 AM) *

Hey everyone!! Below I am posting 3 questions that I and another classmate have been arguing over. They are nothing difficult just textbook questions. I told my friend I would post these with two options to the answer to see what people respond with. So just from reading them and NO LOOKING UP THE ANSWER!!! OFF THE TOP OF YOUR HEAD!!!!

Question #1
When creating a decision table, you must determine how many possible Boolean value combinations exist for the conditions. If there are two conditions, ______ combinations will exist.
A.2
B.4

Question # 2
When merging two files, the condition that terminates the main loop for the program is_______
A. when the first file reaches eof
B. when both files reach eof

Question # 3
The main purpose of UML diagram is_____
A.To facilitate clear communication
B.To provide a blueprint for the system
My answers to the Question would be:
B
B
B

My friends answers are:
B
A
A
What are your answers? Have fun!! Also thinking of maybe posting 3 questions once a week just for fun.Please post a Comment on where I should do that, in Comp-Science forum, or Student Lounge, Etc.. Thanks everyone!!!


User is offlineProfile CardPM
+Quote Post

Dantheman

RE: Intro-Logic Class

28 May, 2009 - 03:33 PM
Post #7

D.I.C Regular
***

Joined: 27 May, 2009
Posts: 445



Thanked: 25 times
My Contributions
1. B

2. Depends on how you're merging the files. If you're merging them into the 3rd file, then the answer is B. If you're simply inserting the 1st file at the end of the 2nd file then the answer is A.

3. Both answers are good.
User is offlineProfile CardPM
+Quote Post

mattman059

RE: Intro-Logic Class

17 Jun, 2009 - 06:20 PM
Post #8

D.I.C Addict
Group Icon

Joined: 23 Oct, 2006
Posts: 537



Thanked: 8 times
Dream Kudos: 225
My Contributions
B
B
B

smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:28AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month