Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Distributed Systems) I need help with a short Basics of Networking and Internet Addressing practice question please! Can use Java or C/C++. Unicode Japanese has

(Distributed Systems) I need help with a short Basics of Networking and Internet Addressing practice question please! Can use Java or C/C++.

Unicode

Japanese has two alphabets (well, technically they are syllabaries, but whatever): Hiragana and Katakana. Write a program that converts between the two.

  • If the user enters a Hiragana character, it prints out the corresponding Katakana character.
  • If the user enters a Katakana character, it prints out the corresponding Hiragana character.
  • If the user enters neither a Hiragana nor Katakana character, it prints out an error message.

Hiragana goes from U+3040 to U+309F Katakana goes from U+30A0 to U+30FF For testing purposes, the first Hiragana char is (U+3042) and the last Hiragana char is (U+3093). For testing purpose, the first Katakana char is (U+30A2) and the last Katakana char is (U+30F3). Obviously, the difference between them is 0x60.

Sample output:

$ ./japaneseSyllabaries  Please enter a Hiragana char, a Katakana char, or a blank line to quit: j j is neither Hiragana nor Katakana. Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Hiragana char  has Katakana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Katakana char  has Hiragana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Hiragana char  has Katakana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Katakana char  has Hiragana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Hiragana char  has Katakana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit:  Katakana char  has Hiragana equivalent . Please enter a Hiragana char, a Katakana char, or a blank line to quit: 

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

More Books

Students also viewed these Databases questions

Question

Question What integration level should an employer choose?

Answered: 1 week ago