Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve soon using simple basic java without using arrays Thank you.......... use java language II. Arabic to Ancient Mayan Number System The ancient Maya

image text in transcribed

image text in transcribed

Please solve soon using simple basic java without using arrays Thank you..........

use java language

II. Arabic to Ancient Mayan Number System The ancient Maya civilization used a vigesimal (base 20) positional numeral system. The system is made up of three symbols: bars to represent 5, dots to represent 1 and shells to represent zero. The chart below shows an example image for each of these symbols. For the application that you are going to write, you'll use standard keyboard characters for each of these symbols. Specifically, you'll use the characters that are listed in the third column of this chart: Symbol Description Bar Sample Image Keyboard Character Value 5 Dot 1 (underscore) O (capital O) U (capital U) Turtle shell (belly side up) On 0 Source for images: https://www.historymuseum.ca/cmc/exhibitions/civil/maya/mmc05eng.html The Myan numerals are drawn starting with the largest place value, and each smaller place value written below. So, the bottom row represents 200, the next row up is 201, the next row up is 202 and so on (the highest power is in the topmost row). For example 36 would be written: = 1 x 20 O = 16 x 200 Write a program that prompts the user for an arabic number and then prints out the equivalent number in Mayan numerals. NOTE: To make the output easier to read, print a space between the characters in each row. Your program must use loops and/or conditional statements to determine what characters to print. Do not hard-code the patterns. You may place all of your code in the main method of a single class. Question Il is continued on next page... Sample Output #1 (user input is shown in bold and italics): Enter an Arabic number: 729 The Maya number for 729 is: 0 Sample Output #2 (user input is shown in bold and italics): Enter an Arabic number: 490 The Maya number for 400 is: 0 U U Sample Output #3 (user input is in and italics): Enter an Arabic number: 416 The Maya number for 416 is: 0 U 0 The Myan numerals are drawn starting with the largest place value, and each smaller place value written below. So, the bottom row represents 200, the next row up is 201, the next row up is 202 and so on (the highest power is in the topmost row). For example 36 would be written: O = 1 x 201 = 16 x 200 Write a program that prompts the user for an arabic number and then prints out the equivalent number in Mayan numerals. NOTE: To make the output easier to read, print a space between the characters in each row. Your program must use loops and/or conditional statements to determine what characters to print. Do not hard-code the patterns. You may place all of your code in the main method of a single class. . Question II is continued on next page... Sample Output #1 (user input is shown in bold and italics): Enter an Arabic number: 729 The Maya number for 729 is: 0 0 Sample Output #2 (user input is shown in bold and italics): Enter an Arabic number: 400 The Maya number for 400 is: 0 U U Sample Output #3 (user input is shown in bold and italics): Enter an Arabic number: 416 The Maya number for 416 is: 0 U 0 NOTE: You may assume that the user will enter a whole number (integer value); you don't need to check for input that is the wrong type. However, if the user enters a negative integer value, your program should not try to convert it to Mayan numerals (since negative values didn't exist in the Mayan system). Instead, it should print out a message and prompt the user for a new input value. For example: Invalid input. You must enter a non-negative number. Please enter another Arabic number now: Do this repeatedly until a valid (non-negative) input value is provided

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

benefits of ensemble model

Answered: 1 week ago