Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This exercise is the programing exercise 9 from chapter 6 of the book java programming Design and implement a GUI program to convert a positive

This exercise is the programing exercise 9 from chapter 6 of the book java programming

Design and implement a GUI program to convert a positive number given in one base to another base. For this problem, assume that both bases are less than or equal to 10. Consider the sample data:

number=2010, base=3, new base=4

In this case, first convert 2010 in base 3 into his equivalent number in base 10 as follows:

2 * 3^3 + 0 * 3^2 + 1*3+0= 54+0+3+0=57

To convert 57 to base 4, you need to find the remainders obtained by dividing by 4, as shown in the following:

57%4=1 , quotient 14

14%4=2, quotient 3

3%4=3, quotient 0

Therefore, 57 in base 4 is 321.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions