Please help me for my exam question!

1)Discuss briefly what is meant by the termoperator precedence.Explain how precednce is used to evaluate the expression 3 + 4 * 5. Re-write the expression using parenthses to indicate explicitly the order of evaluation of operators.

2)Explain what is meant by the scope of an identifier in JAVA.

3)Discuss the idea of encapsulation in object design,explaining why it is important. Also explain how access control in JAVA supports encapsulation.

Please help me about the above questions.

Actually, I can find something in The Big Java book. But I am not sure how to answer appropriately and I can get mark.

Thanks.

[658 byte] By [PancakeBeethovena] at [2007-11-27 5:32:05]
# 1
What good will it do if somebody does your work for you?
jverda at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 2
Face it pancake, you're Java knowledge is cr阷e.
Hippolytea at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 3

> 1)Discuss briefly what is meant by the term

> operator precedence.Explain how precednce is

> used to evaluate the expression 3 + 4 * 5. Re-write

> the expression using parenthses to indicate

> explicitly the order of evaluation of operators.

That doesnt even have anything to do with Java, Programming

or Computer Science, bobo, lol. :)

You should have learned that in like 3rd or 4th grade math class.

I have 6 words for you: please excuse my dear aunt sally

TuringPesta at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 4
> Please help me about the above questions.> Actually, I can find something in The Big Java book.> But I am not sure how to answer appropriately and I> can get mark.> Thanks.Post you answers and then then ask for feedback. Don't be so
_helloWorld_a at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 5
> Post you answers and then then ask for feedback.> Don't be so lazy._helloWorld_ (<-- is actually the other guy in your class with the laptop open right now ;-)
kevjavaa at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 6
OK...I know all your opinions...I seems that I should work hard on my English first.Thanks you guys all the same...
PancakeBeethovena at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 7
> OK...> I know all your opinions...> I seems that I should work hard on my English first.> Thanks you guys all the same...This has nothing to do with your English, unless you simply can't understand what these people are saying.
kevjavaa at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 8

> OK...

> I know all your opinions...

> I seems that I should work hard on my English first.

> Thanks you guys all the same...

You give answers people will discuss them you just write down question people will call you lazy. So either give some answers/reasons or people won't help you.

Aknibbsa at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 9
hahah...Actully, I don't know what is operator precedence and encapsulation.After looking them up in a dictionary, I just know the basic meaning of the words, it doesn't help in doing JAVA questions.That's all right.After all, thanks for your replying.
PancakeBeethovena at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 10

> hahah...

> Actully, I don't know what is operator precedence and

> encapsulation.

> After looking them up in a dictionary, I just know

> the basic meaning of the words, it doesn't help in

> doing JAVA questions.

> That's all right.

> After all, thanks for your replying.

That's a start - explain what you think operator precedence is (it is likely the same for java but I want to see what you think it is before confirming that ).

Aknibbsa at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 11
> Actully, I don't know what is operator precedence http://en.wikipedia.org/wiki/PEMDASYOU UKers SAY BODMAS? WEEEEEEEEEIRD.It only goes to support my theory, people from the uk are CUH-RAY-ZEE. : )And dont even get me started on Canadians and BEDMAS...
TuringPesta at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 12
OK.What I know is that Theoperator precedence is discribing the order to execute something.Such as you are doing maths...You do the multiplication and division before subtraction and addition.Do you think it is a proper answer to the question?
PancakeBeethovena at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 13

> > Actully, I don't know what is operator precedence

>

> http://en.wikipedia.org/wiki/PEMDAS

> YOU UKers SAY BODMAS? WEEEEEEEEEIRD.

> It only goes to support my theory, people from the uk

> are CUH-RAY-ZEE. : )

>

> And dont even get me started on Canadians and

> BEDMAS...

You write like that and you are calling Canadians wierd ? (Thankfully being called wierd by a wierd guy has little to no impact on my views) ;-P

Aknibbsa at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 14

> You write like that and you are calling Canadians

> wierd ? (Thankfully being called wierd by a wierd

> guy has little to no impact on my views) ;-P

Ive had just quite enough of you Aknibbs.

I hope youre ready for an all out flame war of attrition. : )

You are a [insert escalation word here]!

TuringPesta at 2007-7-12 14:57:53 > top of Java-index,Java Essentials,New To Java...
# 15

> OK.

> What I know is that

> Theoperator precedence is discribing the order to

> execute something.

> Such as you are doing maths...You do the

> multiplication and division before subtraction and

> addition.

> Do you think it is a proper answer to the question?

That is exactly what the question is asking for. Order of operations. Parentheses, exponents, multiplication, division, addition, subtraction.

Djaunla at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 16
This may be of some help for precedence. http://www.uni-bonn.de/~manfear/javaoperators.php
_helloWorld_a at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 17

> > You write like that and you are calling Canadians

> > wierd ? (Thankfully being called wierd by a wierd

> > guy has little to no impact on my views) ;-P

>

> Ive had just quite enough of you Aknibbs.

> I hope youre ready for an all out flame war of

> attrition. : )

Up here in Canada we include things like apostrophe. Are the optional where you are from ?

;-P

>

> You are a [insert escalation word here]!

Stairs or elevator - both are used for excalation :-)

Aknibbsa at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 18
>> Up here in Canada we include things like apostrophe. Are the optional where you are from ?Were too damned busy on the east coast to worry about apostrophes, lol!(Everyone on the east coast has resolved to fill in their apostrophes when they retire)
TuringPesta at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 19
> Up here in Canada we include things like apostrophe.> Are the optional where you are from ?> > ;-P Big talk from someone who can't spell weird.;-)
hunter9000a at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 20

> >> Up here in Canada we include things like

> apostrophe. Are the optional where you are from ?

>

> Were too damned busy on the east coast to worry about

> apostrophes, lol!

> (Everyone on the east coast has resolved to fill in

> their apostrophes when they retire)

Haven't you heard it's far easier to do a job right the first time then to go back and correct it ?

;-P

Aknibbsa at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 21

> > Up here in Canada we include things like

> apostrophe.

> > Are the optional where you are from ?

> >

> > ;-P

>

> Big talk from someone who can't spell weird.

>;-)

I see irony is lost on you - and I had such high hopes. ;-P

Aknibbsa at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 22
> I see irony is lost on you - and I had such high> hopes. ;-PI call a truce. Weve suffered too many casualties on both sides, lol.What the hell am i going to do on my 3 day weekend?
TuringPesta at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 23
> What the hell am i going to do on my 3 day weekend?Sure, rub it in that Canadians have already had their Victoria Day long weekend...
Hippolytea at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 24
> Sure, rub it in that Canadians have already had their> Victoria Day long weekend...Victoria Day? How... "dainty".
TuringPesta at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 25
> > What the hell am i going to do on my 3 day> weekend?> > Sure, rub it in that Canadians have already had their> Victoria Day long weekend...Haha! Suck it Canucks!
hunter9000a at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 26
> > Sure, rub it in that Canadians have already had> their> > Victoria Day long weekend...> > Victoria Day? How... "dainty".We are, uh, not amused.
Hippolytea at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 27
> Haha! Suck it Canucks!They've probably made up for it several times over with all the 37.5-hour work-weeks, though.kev (<-- As the work week goes into the 45th and final hour).
kevjavaa at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 28

> Sure, rub it in that Canadians have already had their Victoria Day long weekend...

Since they hate those English, it's called "National Patriots Day" (Journe nationale des Patriotes) in Quebec.

Most people call it the May 2-4 weekend (a case of beer also being called a "2-4").

It's the weekend many people open up their summer cabins/cottages and,

well, drink a 2-4!

Hippolytea at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 29

> > I see irony is lost on you - and I had such high

> > hopes. ;-P

>

> I call a truce. Weve suffered too many casualties on

> both sides, lol.

>

> What the hell am i going to do on my 3 day weekend?

Fill in all those missing apostrophes ? ;-P

Aknibbsa at 2007-7-21 21:30:57 > top of Java-index,Java Essentials,New To Java...
# 30
> > What the hell am i going to do on my 3 day> weekend?> > Fill in all those missing apostrophes ? ;-PWell played, my friend. Well played. : )
TuringPesta at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 31

>> Most people call it the May 2-4 weekend (a case of beer also being

>> called a "2-4"). It's the weekend many people open up their summer

>> cabins/cottages and, well, drink a 2-4!

You dont even know... im sitting in the most obnoxiously hot

office ever, with dust caking everything and the sun blaring through

the windows... so reading your post felt like someone poured cold

water over my head, lol.

I NEED A VACATION!

TuringPesta at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 32

> >> Most people call it the May 2-4 weekend (a case of

> beer also being

> >> called a "2-4"). It's the weekend many people open

> up their summer

> >> cabins/cottages and, well, drink a 2-4!

>

> You dont even know... im sitting in the most

> obnoxiously hot

> office ever, with dust caking everything and the sun

> blaring through

> the windows... so reading your post felt like someone

> poured cold

> water over my head, lol.

>

> I NEED A VACATION!

WHAT ?

You can't even find things to occupy yourself for 3 days and you think you need a vacation ?

LOL.

Aknibbsa at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 33
> > Fill in all those missing apostrophes ? ;-P> > Well played, my friend. Well played. : )Indeed... looks like he brought his "Eh..." game.
kevjavaa at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 34
Nice, It seems that my thread is a chatting board. : )Could you guys tell me what is encapsulation?Thanks.
PancakeBeethovena at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 35
> WHAT ?> You can't even find things to occupy yourself for 3> days and you think you need a vacation ?> LOL.Unless I hit rock bottom and spend a day drinking beer in my tub I dont see how 3 bored days at home = a vacation, lol.
TuringPesta at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 36

> Nice,

> It seems that my thread is a chatting board. : )

> Could you guys tell me what is encapsulation?

> Thanks.

Read as much from google as reading in our thread and then you would likely understand encapsulation. Have you tried to look up anything on encapsulation ? If not why should we then ? If you have looked something up what doesn't make sense ?

Aknibbsa at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...
# 37

I'm going to give you a big up, Crpes. Rather than asking

people to spoon feed you, why not look things up on Wikipedia?

They even have a search box. If you enter encapsulation,

it takes you to a disambiguation page:

http://en.wikipedia.org/wiki/Encapsulation

And the first choices are for Computer Science.

Hippolytea at 2007-7-21 21:31:02 > top of Java-index,Java Essentials,New To Java...