Hello I need help with my Java code I'm not sure what it is I'm doing wrong.

Hello I need help with my Java code I’m not sure what it is I’m doing wrong. Any input would be appreciated I’m

sure I’m missing something small. Please let me know what you think.  ATTACHMENT PREVIEW Download attachmentCOMP 274Week 6 iLab assignmentBy: Michael LackeyDate: 12/ 4 / 16The Calendar ProgramThe purpose of this lab is to give you a chance to use some of the data stream tools we have beendiscussing in a simple applica±on. The assignment is to write a calendar applica±on which allows theuser to select a date, and either retrieve a previously stored calendar entry, or save a calendar entry.Your program should present a GUI interface which allows the user to specify the month, day, and yearof the calendar entry. The GUI should also have a text area for displaying and edi±ng a par±cular entry. Itwill also need two bu²ons, one for saving an entry, and the other for retrieving an entry.Required program elements:1Your user interface must allow the user to enter the month, day, and year. You can do this usingtext Felds for input, or you can use ComboBoxes if you feel adventurous.2The only GUI components which create events that your program needs to handle are the saveand retrieve bu²ons.3Don’t go overboard making your GUI beau±ful! We are just looking for basic func±onality here!4You must have aseparate classwhich manages the calendar data. You will have a minimum ofthree classes in your applica±on, a user interface class, the calendar manager class, and acalendar test class. The user interface class creates an instance of the calendar manager in itsconstructor and stores it in a member variable.5The calendar manager must provide methods which support saving a speciFc calendar entry andretrieving a speciFc calendar entry. The interfaces must be deFned toonly pass a single day’scalendar entryacross the interface.6The calendar manager must store calendar data into Fles according to month+year. That is, thecalendar entries for December 2011 must all be stored in the same Fle.7The calendar manager must use ObjectInput/OutputStreams to read/write data from/to Fles.The calendar manager will use an array to store String objects. The posi±on of a String in thisarray corresponds to the calendar entry for a speciFc day.8The save method of the calendar manager will need to determine if a Fle exists for therequested month and year. If so, the object from that Fle must be read into the calendarmanager. Otherwise, the calendar manager must create an empty String array. The new entry

Background image of page 1

View the Answermust be saved to the appropriate day’s locaTon in the array. ±he modifed array must be savedto the appropriate fle.9±he retrieve method oF the calendar manager will need to determine iF a fle exists For therequested month and year. IF not, return an error string indicaTng that there is no such entry. IFthe fle exists, read the String array From the fle and locate the requested day’s entry. IF thisentry is null, return an error string indicaTng that there is no such entry, otherwise return theentry.Take screen shots of the output of your program. Paste the screen shots and your source code for yourprograms into a Word document. Submit your Word document.Outputs:Source Code:import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.*;public class userInterface extends JFrame implements ActionListener{private static final longserialVersionUID= 1L;public CalendarManager calendar;public JTextField Month, day, year;public JScrollPane Content;public JTextArea text;public JButton get, save;public JLabel m, d, y;public userInterface(){super(“Calendar manager”);setLayout(new FlowLayout());m = new JLabel(“MONTH”);d = new JLabel(“DAY”);y = new JLabel(“YEAR”);Month = new JTextField(12);day = new JTextField(12);

Background image of page 2


Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now