NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Java Help

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
sarahmadison19



Joined: 17 Aug 2012
Posts: 1
Location: NA

PostPosted: Fri Aug 17, 2012 4:03 am    Post subject: Java Help Reply with quote

Hi Can someone please tell me how to do the code for this question? Please see the question from this link or see the attached
http://imageshack.us/photo/my-images/255/capture111u.png/

Thanks a lot



Capture111.PNG
 Description:
This is the question I need to code for
 Filesize:  177.62 KB
 Viewed:  2879 Time(s)

Capture111.PNG


Back to top
areeda



Joined: 28 Aug 2008
Posts: 469
Location: Los Angeles

PostPosted: Sun Aug 19, 2012 9:59 pm    Post subject: Reply with quote

Sarah,
This is not a very good place to ask for help with your homework. In fact most programming forum frown upon working on problems assigned to students because the students don't learn anything from code someone gives them.

A better place to ask beginning java question is http://www.javaranch.com/ but even there you'll have to ask your own questions not give them a homework problem.

With that said, let me guess where the problem lies.

If you want to simulate a random process read up the Java Random class (http://docs.oracle.com/javase/6/docs/api/java/util/Random.html)

If you want a random process that has a probability of 0.1 get a random float (see above) in the range 0-1 and test if it's less than or equal to 0.1 or greater than or equal 0.9.

Joe
Hope I responded before the assignment was due.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo