Lab report on individual homework

Source: Internet
Author: User

A Topic Introduction

Design a calendar Notepad for the GUI interface. The system combines the calendar and Notepad functions to make it easy for users to record content on any date or view a date.

1. The left side of the system interface is the calendar. The calendar can be flipped by year, and the current calendar year is reduced by one when the mouse clicks the previous year button, and when the left mouse button is clicked, the current calendar years plus one.

2. The calendar can also be flipped in a year or so, and when the mouse clicks the "Last month" button, the month of the current calendar is reduced by one, and the current calendar month is added one when the left mouse button is clicked.

3. Using the left mouse button to click on the selected date, such as the existing record content, the system will pop up a dialog box to indicate that the day has recorded content, and ask the user whether to display the content in Notepad.

4. Users can conveniently record content or view a date on any date.

Page the year by pressing the button "year Last" and "next year". Page through the month by pressing the button "last month" and "next month". Users can view their logs by entering the year.

Two Source of GitHub Links

https://github.com/lxl12138/Test/blob/master/Calendar Notepad. md

Three The design of the module test cases, test results

There are 4 Java source files in this calendar of notebooks.

Calendarpad.java

The class generated by the Java file is responsible for creating the main window of this calendar Notepad program. The class contains the main method from which the program begins execution.

Year.java

This file is responsible for creating an object that manages the year.

Month.java

This file is responsible for creating the class object that manages the month.

Notepad.java

The file is responsible for creating Notepad.

4 Detailed system Design

Main class Canlendarpad

1. member variables

member Variable Description Variable Type name

Year, month, day int year,month,day

To save a hash list of logs hanshtable hanshtable

File that holds the hash list

Showing date jtextfile[] Showday

Calendar Objects Calendar Calendars

Notepad Object NotePad NotePad

Month months are responsible for changing the month

Year is responsible for changing the year

2. Methods

name                          features                    remarks  

Calendarpad Creating a Window Main program construction method

Set the Calendar card set Hitachi's year, month

Arranging numbers in a month

mousepressed handling MouseEvent Event interface methods

Main program starts running

Notepad note

1 , member variables

Description Variable type name

Text input Area JTextArea text

Save, delete log buttons button to save the log, delete the log

To save a hash of the Log Hashtable table

File to save hash list

Record the year, month, and day of the journal Int Year,month,day

2 , Methods

Name Feature Notes

NOtapad Creating a Notepad object construction method

Setyear Set Year

GetYear Get Year

Setmonth Setting the Month

GetMonth Get Month

Setday Set Date

GetDay Get Date

Get log content get log content

Save Log Save Log

Delete log Delete log

actionperformed Handling ActionEvent Event interface methods

Year

1. member variables

Description Variable type name

Integer int year representing years

Displays the year's text bar jtextfiled showyear

button to increase or decrease the year Jbutton next year

2. Methods

name                                 Functions                            remarks

Year creates an object construction method

Setyear Set Year

GetYear Get Year

actionperformed handling ActionEvent Event interface methods

Month

1. member variables

Description Variable type name

Integer int month that represents the months

Displays the month's text bar jtextfiled Showmonth

The button that is responsible for adding and subtracting the month Jbutton next month, last month

2. Methods

name                                    functions                         remarks

Month creates a method for constructing a "moon" object

Setmonth Setting the Month

GetMonth Get Month

Actionperformed Processing ActionEvent interface method

5 Test 5.1 test Scenario

1. Open the main interface, click the left mouse button to view the Calendar interface.

2. Select a date to write the log.

3. Add to the calendar, delete the log.

4. Change the year to see some logs.

5.2 Test Results

1. Open the main interface, click the left mouse button to view the Calendar interface.

2. For the selected logs written on January 1, 2011:

3. Add the Delete log,

Add log:

To delete a log:

4. Change the year to view the log:

Four Problems and solutions, experience

After a few days of effort, basically completed my Java curriculum design, but also basically achieved my needs in the analysis of the expected function. Through this course design, I learned from the textbook of the theoretical knowledge to practice, so as to further consolidate and enrich the knowledge I have learned, but also let me a deeper understanding of Java and its powerful features. At the same time to do this course design has further strengthened my ability to do. In order to complete this course design, did more preparation, internet access to a lot of relevant information, but also read a lot of related books. In these processes also intangible exercise My thinking analysis, encounter problems and find ways to solve problems through a variety of my ability.

From theory to practice, in the whole days of the day, can be said to be more bitter than sweet, but can learn a lot of things, at the same time can not only consolidate the knowledge learned in the past, but also learned a lot of books have not learned knowledge. Through this course design so that I understand the combination of theory and practice is very important, only the theoretical knowledge is far from enough, only the theoretical knowledge and practice of combining, from the theory to draw conclusions, can really serve the community, thereby improving their practical ability and independent thinking ability. In the process of design encountered problems, can be said to be difficult, after all, this is the first time, will inevitably encounter a variety of problems, at the same time in the process of the design found their shortcomings, the knowledge of the previous learning is not deep enough to understand, the mastery is not strong enough, so we must study theoretical knowledge, For the future practice to lay a good foundation.

Through this course design, I gain not only the practical application of the knowledge in the textbook, but also the basic habit of programming and development system is the process that should be paid attention to.

Lab report on individual homework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.