Java Course Experiment topic (design of major technology demand collection system in Hebei province)

Source: Internet
Author: User
Tags throw exception

In order to make full use of Beijing-Tianjin Science and technology resources, to solve the Hebei Province industrial transformation and upgrading, green

The major technical problems facing the rise of color, are now facing key industries, key areas, key

Enterprises (units) collect key technical problems in industry or field, construct major technology in Hebei province

Requirements database.

3, data structure requirements: (ten points)

Defines the Infomati on class, which includes six private variables (Infonumber,infoname,

Infocontent,infosum,infostate,infoyear).

(1) The meanings of each member are as follows: (5 points)

The ① variable infonumber is a string that represents the technical requirement information number (with

Three-digit number), remain unique.

The ② variable, InfoName, is a string that is used to store technical requirements information names.

The ③ variable, infocontent, is a string that is used to store information about technical requirements,

No more than 20 characters.

The ④ variable infosum is a double type that is used to store the technology demand investment amount.

⑤ variable infostate is an integer type, used for technical requirement information status, 0 for non-audited,

1 indicates that the requirement has passed the audit, 2 indicates the failure to pass the audit, the initial entry of the technical requirements information status of

0.

⑥ variable infoyear is integer for storing technical requirements submit year information for four digits

(for example: 2016 means 2016.) )

(2) Specific function requirements: (5 points)

① each variable defines get () (read variable information) and S ET () (Set Variable information)

Method.

② requires defining a constructor method to assign an initial value to a variable.

4. Function Requirements:

(1) You need to specify the class, school number, and name in the comments that start the program. (1 points)

(2) program starts to run display login interface (5 points)

Prompts the user to enter the user name and password in the following format:

Use Rname:

Pas Sword:

User name and password are all correct, enter the system main interface, if the user name error: Throw exception to mention

"User directory entry error"; Password error, throw exception prompt "Password entry error", if password

Input three times error, throw exception prompt "The user three times input error, has been locked by the system."

The correct user name and password are saved in the user User.txt file (2 points) beforehand.

(3) After successful login, enter the system main interface. (5 points)

Define an input interface as shown, select the appropriate number to perform the corresponding function

***************************************************************

The system of major technology demand collection in Hebei province

****************************************************************

1, input technical requirements information;

2, delete technical requirements information;

3, audit Technical requirements Information

4. Display Technical requirement information

5, query Technical requirements Information

6, statistical technology needs information;

****************************************************************

(4) Definition


Addinformation (Infonumber, InfoName, Infocontent,

Infosum,infostate,infoyear) method to enter a technical requirement information. (5 points)

The input format is as follows:

The current technical requirements Information number is: 001 (automatically add 1 according to the maximum number in the data file,

If the information file is empty, it is numbered 001)

Technical requirement Name:

Technical Requirements Content: (if the input character more than 20, then throw an exception prompt user "input

Maximum character limit ", does not allow the next entry to be displayed)

Technology Demand Investment Amount: (Allow users to enter floating point)

Year of technical requirements: (need to determine the technical requirement year is greater than or equal to the current year 2016, otherwise thrown

"Technical requirement year is incorrect")

Technical requirement status does not need to be entered, the direct default is 0 that is not audited status.

The data file is stored in the TECHINFORMATION.TX T data file (3 points).

The content stored in the file is shown in the following table:

(5) Definition

(2 points)


Deleteinformation (Infonumber) method to delete a technical requirement letter

(6) Define Examinfomation (Infonumber) method to audit technical requirements information; (5 points)

If the number information status is 1, the user is prompted "This information has been approved," prompting

Enter the new number, the user input number is 000, then return to the main interface;

If the number information status is 2, the user is prompted to "this information has been returned", prompting the user to lose

Enter the new number, the user input number is 000, then return to the main interface;

If the number information status is 0, the following interface is displayed:

***************************************************************

Review Technical Requirements Information

****************************************************************

1, return to the main interface;

2, through the audit;

3, return the audit;

Technical Requirement Number:

Technical requirement Name:

Technical Requirements Content:

The amount of investment in technology demand;

Year of technical requirement:

****************************************************************

Option 1: Return to the system main interface;

Option 2: Modify the requirement status of the number, change the status from 0 to 1, and the rest unchanged;

Option 3: Modify the requirement status of the number, change the status from 0 to 2, and the rest unchanged;.

(7) Define Showinforamtion () method to print display all technical requirements information; (3

Score of

(8) define selectinforamtion () to inquire the details of the technical requirement information. (2

Score of

Prompt user to enter technical requirement information number:

Displays the details of the technical information for this article, based on the input number. (demand status is 0 o'clock

Show "Not Approved", 1 o'clock "pass audit", 2 o'clock "failed audit" is displayed

(9) Define Countinformation () method statistic demand information collection. (3 points)

The number of requirement information for three states is shown in the following format.

Non-audited requirements information:

Required information through audits:

Non-approved requirements information:

Java Course Experiment topic (design of major technology demand collection system in Hebei province)

Related Article

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.