Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. Write a Java program (Ex7.java) to decide if two strings are anagrams or not. (Two strings are anagram if they can be the same

7. Write a Java program (Ex7.java) to decide if two strings are anagrams or not. (Two strings are anagram if they can be the same after change the order of characters)

Example:

Given s = "abcd", t = "dcab", output - they are anagrams.

Given s = "listen", t = "silent", output - they are anagrams.

Given s = "ab", t = "ac", output - they are not anagrams.

8. Write a program (Ex8.java) to play the game of "Guessing Number III". The game has four LEVELS -

LEVEL I - use Random generator to generate a number (0-5), then let the player input a guess. If theplayer's input is correct, move to the next stage.

LEVEL II - use Random generator to generate a number (0-9), then let the player input a guess. If theplayer's input is correct, move to the next stage.

LEVEL III - use Random generator to generate a number (0-15), then let the player input a guess. If theplayer's input is correct, move to the next stage.

LEVEL IV - use Random generator to generate a number (0-19), then let the player input a guess. If theplayer's input is correct, the user wins.

Note that - The user has at most three chances per LEVEL! Print the current level and how many chances left before the player inputs the guess.

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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago