Question: Java Using String processing, conditionals, and loops. (15 points) Modify the readMonth FromUser(int) method to determine if the month is valid for the current year.

(15 points) Modify the readMonth FromUser(int) method to determine if the month is valid for the current year. Pass the year entered by the user to the readMonth FromUser(int) method as a parameter. If the year is the current year: Include an additional criteria for whether the month is valid. The month is only valid if it is the current month or later. If the month is the current month, print a warning message to the user ("Warning: your card expires this month!"). To determine the current year and month, use the java.time.LocalDate class. We have not covered this that is what makes it extra credit! :) The Oracle tutorial on the LocalDate e class is a great resource and you can google other help as well. Notes We have not yet covered arrays and you do not need to use arrays for this project. . Do not use arrays in the program. You will lose some points if you use arrays. . You should use String processing, conditionals, and loops. Your program does not have to account for the user entering non-numeric input or empty input. o It's okay if your program crashes or behaves unexpectedly in these cases- we'll eventually learn how to handle this! I've provided some helper methods that you can use to convert between chars, Strings, and ints. We haven't yet covered this (we will in Module 4!), so for now you can just these methods. Don't worry if they don't quite make sense yet. If you need other conversions that are not provided, post to the discussion board! To read numeric integer values from the user, I recommend using the following code. int user Number Integer.parseInt(scan.nextLine()); o If you use the scan.nextInt() method instead, that you might need to add an extra scan.nextLine() in between the reading of integer input and character input. I do not recommend this. (We'll learn more about this in Module 4!) sta is that It par tre thor ortar At the www /Gettir sava THIS Neredetta LIRE Colt Care + LEGE RII Route > 1 in your free pe Lot re Syetano la ricer Checking 20 wilaya PATE than 200 then the til 1 To from the pers Berita Foto Mementer Moth Chaoth LE Will IPL the button to w 131 + 1 Tot ce te the to Boy. atgrietariadit card Pirine VELLACILLO wolen valo - teles - Fiche Boc codice Length TIT which Cherry Bell with. Andy was to cart Wag to show 3 walice yutunutter charter Credit Career cettarit 2 Bracking philie waters for m2 . por - 104-11 This He then the two digite 1 LARI
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
