Convert each character to its numeric value

Assignment Help Basic Computer Science
Reference no: EM132232272

The output format should look as follows (given Input: IFEBA):

Encoded: 89579953

Decoded: IFEBA

The logic should include the following:

1. Prompt for and read the input string into a variable, input.

2. Use the string method input.charAt(n)to extract the nth character from the string, where n is 0, 1, 2, 3, 4.

3. Convert each character to its numeric value. This can be done by using the formula (valid for 'A'-'I') value = character - 'A' + 1 (note arithmetic can be done on Java Unicode characters)

4. Use the 5 values as "digits" in a base 56 number and calculate the resulting value (the "digit corresponding to c1 being the most significant "digit"). This can be done by alternating multiplication by the base and adding the next digit.

Reference no: EM132232272

Questions Cloud

Illustrate the use case using visio or a similar product : Describe (in a one to two (1-2) page narrative) a use case, complete with typical and alternate courses, that documents the event of a bank customer.
Potential for ethical abuse or conflicts : What are some emerging technologies you believe have the potential for ethical abuse or conflicts that would affect one's quality of life?
Relationships between tables before adding data : Explain why you should build relationships between tables before adding data to your tables
Information systems and information technology : Use real examples to support your arguments and Discuss your examples in terms of Value Chain Analysis.
Convert each character to its numeric value : Convert each character to its numeric value. This can be done by using the formula (valid for 'A'-'I') value = character - 'A' + 1
Start the python interpreter and use it as a calculator : Start the Python interpreter and use it as a calculator. How many seconds are there in 42 minutes 42 seconds?
Prepare inclusive report stating the lessons can companies : Prepare an inclusive report stating the lessons can other companies learn from TOMS Shoes corporate strategies over the years.
Describe the functions of a hub : 1. Describe the functions of a hub, bridge, switch, and router. Discuss the differences between the devices.
What ttl and cmos technologies are : What TTL and CMOS technologies are. What are the differences between them in terms of performance?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd