Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements 1 Structure: Your application must consist of the following TWO Java classes: a. b. C. d. e. An AgeClientFL client class (created from your

image text in transcribed
image text in transcribed
image text in transcribed
Requirements 1 Structure: Your application must consist of the following TWO Java classes: a. b. C. d. e. An AgeClientFL client class (created from your program template). A UtilsFL utilities class (created by modifying the provided starter code). You will need to use the CS12Date class. You will need to use the provided UtilsTestiRL class test code to check your program. See the Structure section which follows for the expected code structure. 2) Utility class: Your utilities class needs the following modifications: Modify only the indicated "TODO" code. All other methods must be left unchanged. All methods in this class will be called statically from the client, using the class name: UtilsFL.method() See the Design section which follows for the expected method interfaces. a. b. c. d. In the readint() method: i. Add a 2nd boolean input "mode flag" to the method interface This allows switching between input data modes:Scanner or GUI ii. Add an if-else, with an appropriate logical condition If the mode flag is false, use the existing input prompt and Scanner read If the mode flag is true, add the equivalent JOptionPane input code. iii. iv. Use the existing input prompt String for both input mode prompts. Return one common int value to the calling client. Do NOT print anything from this method! e. n the 2-input getAge() method: i. Create an algorithm which correctly calculates the age for a given input birthdate, "as of" any given reference date. Both inputs are CS12Date objects. Assume that in general, the reference date is NOT the current date! ii. iii. Return the calculated age value to the client, without printing it. ONLY IF the input birthdate is AFTER the reference date in time: . set the calculated age -1 * print an error message to the command line from this method (only for this one special case!) the error message must include both the (future) birthdate AND the reference date . iv. No error checking on the dates is needed. For now, you can safely assume that any CS12Date inputs have been correctly created upstream by the client. See the Age Algorithm notes which follow, for some ideas how to implement the needed age logic. V

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_2

Step: 3

blur-text-image_3

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions