Shijiazhuang XX University 2017 Years Java Foundation Machine examination

Source: Internet
Author: User
Tags naming convention throw exception

Shijiazhuang XX University 2017 fall 2016 class of the final examination paper (A) Course Name: JAVA language programming Instructor: XXX exam time: 150 minutes Study No.: Name: Class: Examination Nature (Student fill in): Normal test () slow test () retake ( ) Pre-reading () title 1234567 out of 10 40 50 score Quiz Paper Description: I. This paper is a 2016-level JAVA language Programming test paper; Ii. Note programming Specifications: (4 points) (1) through Eclipse The method of adding class is established, (2) The first part of the program is annotated class, author, school number, date, (3) Note the necessary spaces and indents in the program code, (4) Notice the naming principle of classes, variables, methods, and (5) The core code to add comment statements. Three. After the exam is completed, the program source code (. java files) and database files (. txt) are placed in folders, named after the "class number name", compressed and submitted to class 2016 "JAVA language Program Design" on the "Computer Test" directory. 2nd Page Total 8 pages Statistical survey system of high-tech industry in Hebei Province I. Demand overview in order to make full use of Beijing-Tianjin Science and technology resources, to solve the major technical problems faced by the industrial transformation and upgrading of Hebei province, to understand the development of high-tech industries in Hebei province, and to design and develop high-tech industry statistics survey system in Hebei province Two. system function framework figure three. Data structure requirements: (10 points) 1, the design of the applicant information interface Applicantinterface, including the applicant name Applicantname, Applicantsex (gender), Applicanttitle (title), Applicantwork (undertaking work), company (applicant's unit). The Define Showapplicant () method displays basic information about the applicant. (1 points) Hebei Province high-tech industry statistical Survey System input Information Delete Information Audit Information Display information Query Information Statistics 3rd page Total 8 page 2, define high-tech class highinfomation, and implement the applicant information interface APPL Icantinterface. (1 points) high-tech class highinfomation consists of seven private member variables (highnumber, highname,highcontent,highsum,highstate,highyear,highuser). (1) The meanings of the members are as follows:(4 points) The ① variable highnumber is a string that represents a high-tech information number (consisting of eight digits) and remains unique. The ② variable highname is a string of type strings, used to store high-tech information names. The ③ variable, highcontent, is a string that is used to store a high-tech information brief, no more than 20 characters. The ④ variable highsum is a double type for storing high-tech investment amounts. ⑤ variable highstate is an integer type, used for high-tech information status, 0 is not audited, 1 indicates that the demand has passed the audit, 2 means that the audit was not approved, the initial entry of high-tech information status of 0. The ⑥ variable highyear is an integral type for storing high-tech submission year information for four digits (for example: 2017 for 2017. The ⑦ variable highuser is a string type that is used to store high-tech reporting information. (2) Specific function requirements: (4 points) ① each variable defines the method of Get () (read variable information) and set () (Set variable information). ② requires defining a constructor method to assign an initial value to a variable. 4th page Total 8 page four. function requirement: 1, need to indicate class, school number, name in the note that the program starts. (1 points) 2, the program starts to run display welcome Interface (1 points) *************************************************************** Welcome to use Hebei High-tech industry information Survey System ******** School of Information Science and technology, Shijiazhuang Railway University, software engineering Department software elite Group production version: V1.0 team member: The instructor: Wang Wang; examinee class , school number, name **************************************************************** 3, press any key to jump to the login interface (5 points) prompts the user to enter the user name and password in the following format: Please enter the user name: Please enter the user password: the user name and password are all correct, enter the system main interface; NOTE: All exception information is required to be implemented programmatically with custom exceptions, otherwise no score is scored. If the user name is wrong: The custom throws the exception prompt "User directory entry error"; Password error, custom throw exception Prompt "Password entry error", if password entry three times error, throw exception prompt "The user three times input error, has been locked by the system." 5th page Total 8 page 4, after the successful login, enter the system main interface. (3 min) define an input interface (1 points) as shown, select the corresponding number to perform the corresponding function (2 points). Hebei Province High-tech industry Information Statistic Survey System ********************************* 1, input high-tech information, 2, delete high-tech information, 3, review high-tech information 4, display high-tech information 5, query high-tech information 6, query high-tech investment 7, statistics high-tech information; 8, High-Tech annual Statistics **************************************************************** 5, define the Addhighinfomation () method to enter a high-tech information. (8 points) (1) The input format is as follows: (5 points) Hi-tech Number: (20170001 (automatically plus 1 according to the maximum number in the data file, if the information file is empty, the number is 20170001, and the first four bits are the current year, if the naming convention is not met.) Throws the exception hint "high-tech Number format error")) Hi-tech name: high-tech content: (if the input character exceeds 20, then throws the exception prompts the user "input content exceeds the maximum character limit", does not allow the next entry entry) high-tech investment amount: (Allow users to enter floating point) High-tech year: (need to determine the high-tech year is less than or equal to the current year 2017, or flip the 6th page altogether 8 page out of the exception prompt "high-tech declaration year not") high-tech status does not require input, the direct default is 0 is not audited status. Fill in: (2) high-tech information entry success, the system should pop up the message "Please enter the applicant information", continue to enter the applicant information. (2 points) applicant's name: Applicant's Gender: ("male" or "female", input other data system should prompt abnormal error) applicant's job Title: Applicant's work: (3) A piece of information after the end should be prompted "the information is saved successfully, whether to enter new information?" "Y" When you jump to (1) Enter new information, select "N" to jump to the main system interface, (1 points) (need to enter at least more than five high-tech information) to the high-tech information stored in the data file TechHighrmation.txt (3 points). (6) Define DeleteHighinfomation (Highnumber) method to delete a high-tech information, delete the user should be prompted "Whether you delete this message", select "Y" is deleted, select other keys are not deleted; (2 points) (7) Define Examhighinfomation ( Highnumber) method Audit high-tech information; (3 points) if the number information status is 1, the user is prompted "This information has been approved", prompting the user to enter a new number, the user enters the number 000, the main interface is returned, if the number information status is 2, the user is prompted "This information has been returned", Prompts the user to enter the new number, the user enters the number is 000, then returns the main interface, if the number information status is 0, then displays the following Operation interface: 7th page Total 8 page ***************************************************** Review high-tech information **************************************************************** 1, return to the main interface, 2, pass the audit, 3, return the audit; Hi-Tech No.: Hi-tech name: High-Tech introduction: high-tech investment amount; year: Applicant's name: Applicant's Gender: Applicant's title: Applicant's job: Applicant's Unit: *********************************** Select 1: Return to the System main interface, select 2: Modify the number of high-tech state, the state from 0 to 1, the rest unchanged; Select 3: Modify the high-tech status of this number, change the status from 0 to 2, and the rest unchanged; (8) Define Showhighinfomation () method print display all high-tech information, including applicant information, not called showapplicant () display applicant Information deduction 1 points; (2 points) (9) Definition Selecthighramtion () Query the detailed content of the high-tech information of this article. Corresponding to the main interface 5, query high-tech information function key. (2 points) 8th page Total 8 page prompts the user to enter the high-tech information number: According to the input number, displays this technical information detailed content including the applicant information. (The information status is 0 o'clock "not approved", 1 o'clock displays "pass audit", 2 o'clock displays "failed audits") (10) defines selecthighramtion (double investment) query investment amount is greater than or equal to investment all high-tech information. (2 points) corresponding to the main interface 6, query high-tech investment function keys. Prompt user for investment amount: Displays all information including applicant information for all investment amounts greater than or equal to that amount, based on the amount of input. (The information status is 0 o'clock "not audited", 1 o'clock displays "pass audit", 2 o'clock displays "failed audits") (11) Defines the high-tech information reported by the Counthighinfomation () method. (2 points) corresponding to the main interface 7, statistical high-tech information function keys. The number of technical information for each of the three states is shown in the following format. Unaudited Technical Information: Technical information through auditing: technical information that has not been audited: (12) define the counthighinfomation (int year) method to count the number of high-tech filings and the total amount of investment that is required for the years. (2 points) corresponding to the main interface 8, high-tech annual statistical function keys. Prompt user to enter query year: The following format displays statistical results: XXXX year high-tech field to apply for XXXX high-tech achievements, the total amount of investment in XXXX

I write in the test source code for your reference, no other purpose is to benefit later learning younger sister, 2017 exam content and 2016 exam content very much like, I think he this person is difficult to change, after all, a ppt for 5-6 years,---- The test questions and I wrote the source code (after the examination of the sources have not changed, but the function has been implemented, the code is not good, you can refer to the line):

Link: https://pan.baidu.com/s/1cpX41g Password: 1f28 Copy the connection, I do not insert the connection ....

Shijiazhuang XX University 2017 Years Java Foundation Machine examination

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.