FON is on a distinguished road

FON FON is offline

Senior Member

Visitor Messages

Showing Visitor Messages 1 to 2 of 2
  1. ruchira_sandanayaka
    Yesterday 06:23 AM - permalink
    ruchira_sandanayaka
    Assume that the base of the number system is always 10 or less. That is, all the digits of the number
    system are a subset of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Examples of such number systems are
    those with base 2 (binary), base 8 (octal), base 4, base 5 etc.
    Your submission should include two documents.
    (i) The design of the program in Pseudocode.
    (ii) Implementation of the solution in Java
    This will consist of a single file that contains a single class called
    ITE1101Ass1Mar10XXXXXXXXX and the program should be saved in a file called
    ITE1101Ass1Mar10XXXXXXXXX.java
    where XXXXXXXXX is your index no
    for e.g. the class of the answer submitted by the student with registration number e08420064 would be
    ITE1101Ass1Mar10e08420064 and this would be saved in a file called
    ITE1101Ass1Mar10e08420064.java
    Bonus points: You may earn bonus marks if your program is able to
    handle the Hexadecimal number system (base 16) as well.
  2. ruchira_sandanayaka
    Yesterday 06:22 AM - permalink
    ruchira_sandanayaka
    In Mathematics, different number systems are in use. The most commonly used number system is the
    decimal number system, which has a base of 10. Other number systems in use are the binary number
    system (base 2), octal number system (base 8) and the hexadecimal number system (base 16). They are
    all positional number systems, where the decimal value of the number can be obtained by summing the
    multiplication of each digit by its corresponding place value. For example, in binary system the
    decimal equivalent of the number 1010 can be obtained by the sum: 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 =
    1 x 8 + 0 x 4 + 1 x 2 + 0 x 1 = 12
    Your task:
    Design a program that would read a number and the base of the number system and print the equivalent
    decimal value.

About Me

  • About FON
    Location
    Belgrade, Serbia
    Occupation
    senior java developer

Statistics

Total Posts
Visitor Messages
General Information
  • Last Activity: Today 01:19 AM
  • Join Date: 12-08-2009
  • Referrals: 0

Friends

Showing Friends 1 to 1 of 1

All times are GMT +2. The time now is 06:38 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org