Buster's Posts
Nairaland Forum › Buster's Profile › Buster's Posts
My email address is abbeybidmus@yahoo.com thanks so much I would be expecting it |
Good evening This is an assignment to a program am running in school. Despite all way of trying to get a code for it am still stuck and i have a deadline soon. Please kindly help out. The assignment is below For the unit 2 assignment, you will develop a program that will simulate the rolling of a pair of dice. Your program must simulate rolling two dice and keep track of how many rolls are required before snake eyes are rolled (Note: “Snake Eyes” means that both dice show a value of 1). You will need to use a loop structure to repeatedly ‘roll the dice’. You will also need to make use of the if statement to determine if both die show a 1. You can use the example of an if statement below in your program and you can also read ahead to next weeks lesson for more information on the if statement. To roll the dice, you can use the following Java statement which generates a random number between 1 and 6 (to represent the six sides of the dice). die1 = (int)(Math.random()*6)+1 This statement has some interesting characteristics that need to be explained. The first thing we notice is that we are assigning something to a variable with the name die1. You will need to execute this statement twice, once for a variable die1 and the second time to assign to variable die2 to represent the roll of two dice. The second thing we notice about this is this weird (int) placed in front of the parentheses that contain a subroutine call and a math expression (Math.random()*6). What the (int) in this case is doing is called a cast. The cast is a way to force java to convert data from one data type to another. The subroutine (actually this is calling the class Math and the method random) Math.random() will return a number that is between 0 and 1. This number is a floating point number. By multiplying it by the number 6 we will get a random number between 0 and 5. This number will be a floating point number and is likely to be a fraction meaning that it will have digits to the right of the decimal point. What the cast or (int) in this case does is convert this number into an integer. As you recall from earlier discussions, this will truncate all of the digits to the right of the decimal point. For example assume that that the Math.random() subroutine returns the value of .523432. This value is then multiplied by 6 resulting in 3.14059 to this we add 1 resulting in 4.14059. The reason that we are adding a 1 is because we want a number between 1 and 6 starting at 1. By adding a 1 we know that the starting number will always be 1 or greater. What the (int) will do is to truncate everything to the right of the decimal point and then assign it to the variable die1. The resulting value in die1, in this case, would be 4. An if statement that will test for ‘snake eyes’ would be as follows. if (die1 == 1 && die2 == 1) { // do something } You must complete your program, test, debug, and execute it. You must submit your java code file. Post the output of your program by specifying the number of rolls of the dice before you got snake eyes. Run the program at least five times and report your results. Challenge: See if you can modify your program using a for loop to simulate running your program 1000 times and calculate the average number of rolls required to get snake eyes … what is the average number of rolls? |
thanks so much for d reply. It really helped. Just wanna ask wats d waiting time if a us citizen files for son above 21yrs or is it d same duration wit lpr |
good evening vo. My mum is a green card holder but not yet a us citizen. Does she have to become a us citizen before she file for me.and also wats d waiting time for a mother who files for her son who is above 21 years. And i also want to ask if Hiv testing is compulsory during the medical exams. Thanks |
Good day VO. I am new to this thread and I need advise. I intend travelling to the USA for a medical conference in Georgia. A well known multi national hospital in India is willing to cover all expenses including flight ticket, hotel and all other expenses. I have a letter from the hospital stating they would cover the expense. But am a little bit worried because they didn't give me their statement of account. Is the statement of account needed at the embassy or would the embassy confirm themselves. And also do I need to present my own statement of account even if am not the one paying for the trip |
Good day everyone. I am new to this thread and I need advise. I intend travelling to the USA for a medical conference in Georgia. A well known multi national hospital in India is willing to cover all expenses including flight ticket, hotel and all other expenses. I have a letter from the hospital stating they would cover the expense. But am a little bit worried because they didn't give me their statement of account. Is the statement of account needed at the embassy or would the embassy confirm themselves. And also do I need to present my own statement of account even if am not the one paying for the trip |
Good day everyone. I am new to this thread and I need advise. I intend travelling to the USA for a medical conference in Georgia. A well known multi national hospital in India is willing to cover all expenses including flight ticket, hotel and all other expenses. I have a letter from the hospital stating they would cover the expense. But am a little bit worried because they didn't give me their statement of account. Is the statement of account needed at the embassy or would the embassy confirm themselves. And also do I need to present my own statement of account even if am not the one paying for the trip |
Good day everyone. I am new to this thread and I need advise. I intend travelling to the USA for a medical conference in Georgia. A well known multi national hospital in India is willing to cover all expenses including flight ticket, hotel and all other expenses. I have a letter from the hospital stating they would cover the expense. But am a little bit worried because they didn't give me their statement of account. Is the statement of account needed at the embassy or would the embassy confirm themselves. And also do I need to present my own statement of account even if am not the one paying for the trip |
Good day everyone. I am new to this thread and I need advise. I intend travelling to the USA for a medical conference in Georgia. A well known multi national hospital in India is willing to cover all expenses including flight ticket, hotel and all other expenses. I have a letter from the hospital stating they would cover the expense. But am a little bit worried because they didn't give me their statement of account. Is the statement of account needed at the embassy or would the embassy confirm themselves. And also do I need to present my own statement of account even if am not the one paying for the trip |
. |
Someone just informed me dat d change of course form is out. I don't know hw true |
omidan21: Pls can a commercial student register for this human kinetics and health education course.if no pls what other options does a commercial student haveThe entry requirement is credit in math, english, biology and any other 2 subject |
alashor :The form wld be out by ending of this month |
I just heard dat d supplementary list wld be out anytime from now. Let's keep our fingers crossed. Expect d best |
For those that didn't make d cutoff, expecting d supplementary list or trying nxt year wouldn't be a bad idea. But av got some few options -Get the Diploma Form, it cost 20k for d form and school fees is around 360k, u get admitted into 200 level after a year -Get d diploma form in Human KInetics and Health Educations. THe forms costs 5k and school fees is arnd 70k per session for 2 years, and then u get admitted to 200 level of human kinetics -VIsit www.uopeople.org, its an online tuition free university that offers DIploma and Bsc in Computer Science and Business Administration - Enroll for an IT certification course in either NIIT,APTECH or NEW HORIZON - Get the National Open University of Nigeria form to run a course of ur choice. That's a piece of advice I cn offer. Cheers. Reply for more info of d above named programs |
tdade: i hope you are wrong.A lecturer who happens to be an school mate to ma mum told me. |
Akosbaba: this is very possible,mr bidmus(dean,faculty of education) addressed this last year during the faculty orientationWhat a coincidence, my Surname is Bidmus. lol |
Just want to tell u all d bitter truth. I just confirmed there wouldn't be change of form this year. The supplementary list wld be released nxt week but it wld contain list of those dat are abt 3 - 5 marks to d cutoff mark. Its all because the faculty of education refused to be a dumping site for those dat do not make their faculty's cutoff point. Instead they would take any candidate that choosed education as their 1st choice so for d person score above an aggregate of 40 |
what course can i change too. My initial course was human kinetics and i had an aggregate of 49.38 and cutoff for human kinetics is 53 and my utme combinations are MATHS,ENGLISH,BIOLOGY and CHEMISTRY. and my O level combinations are MATH, ENGLISH, BIOLOGY, AGRIC AND ECONOMICS. Which course can i change too. Or better still is there a chance that i wld still be selected for human kinetics? |
Am so sad right now. I am just gonna stick to my Human kinetics diploma form till its out. What a nyt for me |
mjeasy: [/color][color=#006600]This girl is for real, she told me my jamb score and even my aggregate. Too bad I was not taken |
mjeasy: Guyz,there is a girl on fb who claims to be at d senate house at present,she has been helping peepz to check their names,i dont reli blv her but d convincing part is that she could tell their jamb nd putme scores without been told.all she needs is ur full name nd department..however,i avnt asked her to check mine....I think its real, once u tell her ur name, she wld tell u ur jamb score and If u ve been taken |
alashor :There would be an entrance examination before u get selected, but there are strong chances that u wld be selected because a lot of people do not enroll for d program. Classes wld possibly start by november and I guess d entrance exam wld be by september cos I was told d form wld only sell for just a week before its closed. |
I confirmed from about 3 people and they said they heard d cutoff wld be changed. Let's all hope for d best |
alashor :Sure its in unilag under d faculty of education. |
Sad new but true. I visited a professor who happens to be my Mum's school mate. I decide to meetb him to weigh my options since I didn't make d cutoff for human kinetics which is 53. He confessed to me that d change of course option is 20percent effective and nt reliable so he advised I get d foundation program form. The fees is expensive so he advised I wait till d diploma form for human kinetics. The diploma is a 2yr course which after u cross to 200 level in human kinetics. The form would be available in the 2nd-3rd week of august and it cost just 5k and school fees 78k per session. Its a good bargain for me since have done a health program before. If u are intrested pls visit the human resource board and development for more information. |
Dgunnerz: What did he say again?the cut off is out. check unilag site |
Stesibelle17: I heard it is out also. Av bn tryin 2 check unilag site,bt its nt coming up. Am jux xo anxiousits true, i tried it again, the site is down. I guess they must be uploading. You know what, lets just forget about this forum for today and check unilag site first thing tomorrow morning. |
ogagusps3: Unilag site is down... They must be uploading...The site is not down, its open right here i my front. Its being open on my system since d release of d post utme results |
i just hope d cut off is released today. Am damn so anxious |
hello room. I had an aggregate of 49.38 for human kinetics and am from Lagos state. What are my chances of gaining admission this year |
i was just told that it was pasted @ unilag mosque and cut off marks start from 45 |