Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can someone please help me? I need these exact words ro match the sample output. I also need and h. file and a for loop.

can someone please help me? I need these exact words ro match the sample output. I also need and h. file and a for loop. if anyone know how to solve please help me thank you!!
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
NumbersToWords.docx Instructions In elementary school, you learned how to express a number in an English word format. For example: the number 1 is spelled as "one", 2 is "two", 3 is "three", and so on. In this program, we are going to create a new class called "WordedNumber" which has the capability to produce a string with the English word of the number it is storing. To make this simple, we will only support the numbers from 999 to 999 . If a number is negative, then the number should have "negative" as a prefix. Example: "negative one," "negative two hundred twenty three," etc. Below is a chart of the words to use: Description of Methods - constructor - either accepts an initial number or defaults to zero. Additionally, rejects any number outside the supported range as described in the instructions. - getNumber - returns the numerical version of the number the object is storing. - setNumber - sets a new number to be stored. Additionally, rejects any number outside the supported range as described in the instructions. - toWord-generates the English word of the number being stored and returns it as a string. Testing To test your program, create a WordedNumber object in main. Write a for loop that does the following: Loop from i=0 to 999 : Set the WordedNumber object's value to i Output i+": " + conversion to English Word + "In" NumbersToWords.docx Sample Outputs F: Microsoft Vicual Studio D e: zero 1: one 2: two 3: three 4: four 5: five 6: six 7: seven 8: eight 9: nine 18: ten 11: eleven 12: twelve 13: thirteen 14: fourteen 15: fifteen 16: sixteen 17: seventeen

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

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

American business is more individual oriented.

Answered: 1 week ago

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago