Jump to content

Flamix

Members
  • Posts

    10
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About Flamix

Profile Information

  • Current Mood
    Speachless
  • Gender
    Not Telling
  • Country
    Canada

Flamix's Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. lol sorry a little mistake I mean for the 20 :P
  2. oups I wont own you, I'll owe you lol* I'm not that bad >.< :P
  3. Hello guys, as requested I uploaded my homework as soon as possible. I revised the work I had to do and OMG. this is insane. They want me to give it back on november 3th ! I got 1 week to make that things so if someone of you can help me, I'll be more then glad :) I'll own you so if you need something I'll be there :) Here is the work. "I" must be able to make a game called: Go, a chinese chess game. If you guys know how to make a Tic Tac Toe game, you will be able to make this program in a couple of minutes. Its is a homework for 1st grade college in programation, so you dont need to worry. If you are pro at programing, then my homework is a piece of shit (Really easy) The programme should take 20 to 30 minutes maximum for normal programmer (apparently ^^) Remember that you must make the program in 1 single java file so not in Eclipse program. Someone helped me before and gave me a professional program and my teacher kind a "kill me" lol. Everything must be in 1 file called: Go.java So there must have no Import command or stuff like that only basic java command. Thanks a lot for your help and remember I must give it back before the 3rd of November :s English Version: http://aezir.com/download/GOeng.txt French Version: http://aezir.com/download/GOfr.txt Send it back to: Flamix@aezir.com
  4. Thanks sorry for the bad link so someone can help me with that program? :s
  5. Communication with the aliens Objectives The objectives of this work: - Handling (declaration, initialization and conversion) of variables - Understanding of digital and Boolean expressions - Use select statements (if / else) - Using loops Presentation of the problem You are hired by NASA that has just come into contact with extraterrestrials. The aliens are trying to communicate with us by sending us numerical values, and we reply. We are familiar with the base 10, which is part of our daily lives. For IT Off-pair that you are, the base 2 has no secrets for you. Similarly for 8 and hexadecimal bases, 16. But what happens if we express numbers in base 23, 34? NASA asks you to make a program that allows the conversion of number in base 10 numbers to other bases whatsoever. Your program will be called Alien.java Basic knowledge on converting numbers What is a digital database? Each number is written are expressed in a precise numerical basis, normally base 10. If we express the number 14, expressed exactly does one? Exponent of 10: 1 0 Number: 1 4 Thus, the number 14 comes from: 14 = 1_101 4_100 If we take another example, the number 1237, that number is expressed by the table follows: Superscript 10: 3 2 1 0 Quantity: 1 2 3 7 Thus, the number 1237 comes from: 1237 1_103 2_102 3_101 7_100 = Thus, each number represents a form a multiplication factor of a outlining its basic digital. What happens if we want to express the number 17 (base 10) in the following basis: - Base-2: 17 = (10001) 2 = 1_24 0_23 0_22 0_21 1_20 - Base 8 17 = (00 021) 8 = 0_84 0_83 0_82 2_81 1_80 - 16 base 17 = (00011) 0_164 0_163 0_162 16 = 1_161 1_160 Thus, the numbers change completely how to write, depending on the basis digital is used. The number of bits The number of bits determines the number of digits will build the number you want to write. For example, if you write 10-bit number 147, would give the results following: - In base 10: 0000 0147 - Base 2: 147 = (10010011) 2 - Base 8: 147 = (00000223) 8 - In base 16: 147 = (00000093) 16 What if the number to enter in a bit over 9? You're already familiar with the base 16, hexadecimal. The value for each positions in the base hexadecimal numbers can be between 0 and 15. Unfortunately you can not write a single position values 10,11,12,13,14 and 15 (since they are composed of two numbers). In the case of the base 16, it uses numbers and letters following, to express the values: Values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Corresponding character: 0 1 2 3 4 5 6 7 8 9 ABCDEF So if you want to write the number 250 in base 16 with 3 bits, obtains the following number: (250) 10 = (0FA) 16 162 15 = 0 _ _ _ 161 10 160 F = 0 _ 162 _ 160 _ 161 A So, in your program, you must express the values above 10 with letters, not figures. 4 Operation of your program You should write a program that performs the following steps 1. Ask the user an nb, POSITIVE and base 10, it wishes to convert 2. Prompts the user base into which convert the numbers nb 3. Prompts the user with how many bits it wants to write the number 4. Print the number converted in its new base, with the desired number of bits Your program will convert the numbers selected by the user until the latter between a negative number. In this case, you record a message telling the user communication with the aliens ended ... :) You do not have to convert negative numbers. Example execution Here is an example of running your program: Enter the number to be converted 147 Enter the base conversion (between 2 and 41) 16 Enter the number of bits encoding 8 The number converted: 00000093 Enter the number to be converted 18 Enter the base conversion (between 2 and 41) 14 3 Enter the number of bits encoding 4 The number converted: 0014 Enter the number to be converted 48 Enter the base conversion (between 2 and 41) 2 Enter the number of bits encoding 10 The number converted: 0000110000 Enter the number to be converted -1 Communication ended 5 Restriction to User Checks should be made to verify that the user input are valid: The bases selected by the user should be between 2 and 35, in order to express numbers with numbers from 0-9 and from A to Z. The number to be translated should be expressed in the number of bits requested by the user. If one of above conditions is not met, your program must indicate to the user via an error message that the entry is invalid. Here's an example: Enter the number to be converted 100 Enter the base conversion (between 2 and 41) 2 Enter the number of bits encoding 3 Unable to express the number 100 in 3 digit Enter the number to be converted 100 Enter the base conversion (between 2 and 41) 59 The base is invalid 4 You can assume that the user will always enter the whole ... Criteria for termination of your program (stops when a negative number is entered) Here's what you must submit: - Your pseudo-code (Required) - Your code, which will be in the file: Alien.java Put the answer on the forum (The pseudo-code and code Java) Pour la version francaise, veuiller downloader le document si dessous: http://aezir.com/download/Alien.doc
×
×
  • Create New...