Chris Pollett > Old Classes > PIC20B ( Print View ) Enrollment info Course Info:
|
HW#1 --- last modified January 16 2019 00:35:19..Due date: April 11 ========= Files to be submitted: p20bhw1file1.java ====================== HW1 Purpose: To gain familiarity with the String, StringBuffer, and ============ StringTokenizer classes. Specification: ============== For this assignment you will write a java application. Your file should extend JFrame and look roughly like: Source Text: ___________________ | | | | | | |_________________| Expression: ___________________ |_________________| Matches: ___________________ | | | | | | |_________________| [Reset] [Check] When the Reset button is clicked the two JTextArea's and the middle JTextField are cleared. When Check is clicked each word in the Source textarea is check against the expression in the expression textfield. If it contains the string in the Expression field as a substring then it is printed on its own line in the Matches textarea. (This textarea should not be alterable by the user). By a word I mean a string which does not contain space, tab, or newline. Point Breakdown for HW1 ======================= Code is well documented................1pt Application extends JFrame looks like above......................1pt Reset does what it is supposed to......1pt Matches JTextArea cannot be altered by user..................................1pt Program uses instances of StringBuffer constructively........................1pt Check button causes source expression matching to be done i.e, there is a working ActionListener................1pt StringTokenizer class used to break up Source JTextArea into words...........2pt Only matched words are put into Matches JTextArea.....................2pt Total.................................10pts |