Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needed in beginners JAVA programming with explanation on what you do. Within the 1900 folder on your desktop, create a new folder named Lab6HWLastnameFirstname (4

Needed in beginners JAVA programming with explanation on what you do. image text in transcribed
image text in transcribed
Within the 1900 folder on your desktop, create a new folder named Lab6HWLastnameFirstname (4 pts) Problem 1 An ordinal number can be thought of as the "adjective forin" of a nunber. Examples of ordinal numbers are 1st, 78th, and 782nd. In Euglish. au ordinal uunber can usually be produced by addiug "th" to the end of the number, but there are exceptions for numbers ending in 1 (1st. 101st). 2 (2nd, 892nd). or 3 (3rd, 4573rd). Therc's also an exception to that exception for munbers that eund iu 11. 12. or 13 these just use the standard tlh (111th. 8013th). (Isu't uatural lauguage wonderful??) Within your Lab6HW folder, crcatc a new class named OrdinalNumbers.java. Within that class. write a method named toordinal that takes one int paraueter and returns the ordiual versiou of that parameter as a string. If the parameter is negative, toordinal should return the string "invalid". toOrdinal should work correctly for any non-ncgative int value. Here are some example arguments for the toordinal method and their expected return values. Note that the double quotos in the return valucs simply indicate that these are strings thenselves should not be included as characters within the strings. the double quotcs Argument Rcturn Valuc 76 invalid" "Oth" "612th" "9922nd" 612 9922 2147483643 "2147483643rd

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

Describe a persuasive message.

Answered: 1 week ago

Question

Identify and use the five steps for conducting research.

Answered: 1 week ago

Question

List the goals of a persuasive message.

Answered: 1 week ago