This assignment must be completed by 8:00 AM on Friday, 20 September and uploaded to the Homework 4 moodle page. You should upload only your Home04.java file.
Your program should be implemented in a class named Home04
in edu.unca.cs.csci202
package and have a proper
@author
annotation.
Why?
This assignment uses the Scanner
class.
The task
Write a program that uses the Scanner
class to read
lines from System.in
.
Your program should print that line to
System.out
only under the following condition: the
the line contains two successive tokens, where the
first token is UNCA and the second is a number
between 1969 and 2017.
For example, if the input is the following:
This line does not match This UNCA UNCA 2000 2000 line does match 2000 UNCA is not a match UNCA 1900 is not a match UNCA 02000 looks odd but it matches UNCA - 2000 : no match do not change the spaces in a line UNCA 2010
The output should be:
This UNCA UNCA 2000 2000 line does match UNCA 02000 looks odd but it matches do not change the spaces in a line UNCA 2010