In the first half of 2023, software designers' real questions and answer analysis in the afternoon

Question 1 (15 points)

With the development of scientific planting in the agricultural field, it is necessary to carry out information management of agricultural bases and farming affairs, and provide planting-related services for tenants and farmers. Now we want to develop a farming management service platform. Its main functions are:

(1) Personnel management: platform administrators manage tenants; tenants manage farmers and assign responsible plots to them. Tenants and farmers are distinguished by personnel type.

(2) Base management: The tenant fills in the descriptive information such as base name and region, and draws the plot on the displayed map.

(3) Planting management: tenants set crops and the entire farming process from planting to harvesting, including farming activities and their implementation plans. Farmers carry out farming activities and record them according to the corresponding farming process reminders. The system will remind farmers about farming at the set time, and issue overdue warnings to tenants for overdue activities.

(4) Input management: tenants uniformly maintain input information such as fertilizers and pesticides. Farmers set the actual consumption of inputs in their farming activities.

(5) Information service: Farmers initiate agricultural information requests according to the query conditions, screen, compare, and count agricultural information such as the implementation of agricultural activities on relevant plots (such as comparison with the agricultural process), and display the response information. The system also provides APP interfaces for other third-party software, and provides account numbers, passwords, and query conditions to initiate agricultural information requests through interface access, and returns agricultural information in a specific format. When there are no query conditions, all information under the account will be returned silently. Returns information that satisfies all conditions.

Now use the structural method to analyze and design the agricultural management service platform, and obtain the context data flow diagram shown in the figure and the 0-layer data flow diagram shown in Figure 2

                            

 

Figure 1-1 Context data flow diagram

Question 1 (4 points)

Using the words in the description, give the names of entities E1-E4 in Figure 1-1.

Question 2 (4 points)

Using the words in the description, give the names of the datastores D1-D4 in Figure 1-2.

Question 3 (4 points)

Supplementary data streams and their starting and ending points in Figures 1-2, according to the description and terminology in the figure.

Question 4 (3 points)

According to the description, give the composition of the "agricultural information request" data flow.

Question 2 (15 points)

A new energy vehicle company in order to improve efficiency. Need to develop an auto parts procurement system, please complete the database design of the system

[Concept structure design]

[Description of Requirement]

(1) Record the supplier's information, including the supplier's name, address and a telephone number.

(2) Record the information of the parts, including the code, name and price of the parts.

(3) Record the model information, including the serial number, name and specification of the model.

(4) Record parts procurement information. A certain part of a certain model can be purchased from multiple suppliers, a certain part can also be used by multiple models, and a certain supplier can also supply multiple parts, including the purchase quantity and date of purchase.

[Logical Structure Design]

According to the entity relationship diagram completed in the conceptual structure design stage, the following relationship model (incomplete) is obtained:

 Supplier (name address phone number)

 Parts (code name, price)

 Models (numbers are called specifications)

 Purchasing (model number, supplier name (a), (b), purchase date)

Question 1 (5 points)

According to the description of the entity relationship diagram in Supplementary Figure 2-1 (no new entities added).

Question 2 (3 points)

Supplement the two vacancies (a) and (b) in the logic structure design results, and mark the integrity constraints of primary key and foreign key.

Question 3 (7 points)

The car company now adds the following requirements: record the sales of models in stores across the country, store information includes store numbers, addresses, and phone numbers, sales include sales quantities and sales dates, etc., and make the following modifications to the original design to achieve this requirement.

(1) In Figure 2-1, store information and model sales are reflected, and newly added entities and connections and their important attributes are marked.

(2) Give the newly added relationship schema and mark the integrity constraints of primary key and foreign key.

Question 3 (15 points)

A university library has purchased a number of mirror database (MinorDB) resources of academic resources, and now requires the development of a digital library (Digital library) system to provide users in the school (User) with browsing, retrieval and downloading services of academic resources (Resoure). The main requirements of the system are described as follows:

1. The system stores the basic information of each mirror database, including: database name, access address, database properties, and database profile. After users enter a mirror database, they can browse, retrieve and download academic resources in it.

2. Academic resources include: conference papers (ConferencePaper), journal papers (JournalArticle) and dissertations (Thesis), etc. The system stores information such as the title, author, publication time, source (which mirror database), cited times, and downloaded times of each academic resource.

(1) For conference papers, the name, time and location of the conference should also be recorded; papers from the same conference are included in the Proceedings.

(2) For periodical papers, it is also necessary to record the name of the journal, publication month, issue number and sponsor; papers with the same issue number are included in one journal (Edition).

(3) For dissertations, record the degree category (PhD/Master), graduate school, major and supervisor.

3. The conference collection includes all articles published in the conference (held in a specific time period and at a specific location). Each issue of a journal is issued at a specific time and contains several articles.

4. System users (User) include: students (Student), teachers (Teacher) and other in-service personnel (Staff). After users use the school's unified identity authentication to log in to the system, they can use various services provided by the system.

5. The system provides a variety of resource search methods, mainly including: search by title of resource (SearchbyTitle), check by author name (SearchByAuthor), search by source (SearchBySource), etc.

6. Users can download resources, and the system records the number of times each resource is downloaded.

Now the system is developed by using the object-oriented analysis and design method, and the use case diagram shown in Figure 3-1 and the initial class diagram shown in Figure 3-2 are obtained.

                               Figure 3-1 Use case diagram

                               Figure 3-2 Class diagram

Question 1 (6 points)

According to the description in the description, give the class names corresponding to C1~C8 in Figure 3-2.

Question 2 (5 points)

According to the description in the description, give the key attributes of classes C1~C4 in Figure 3-2.

Question 3 (4 points)

During the development of the system, a new requirement is encountered: users can register the digital resources they care about in the system for other citation notifications, and if the number of other citations of the resources changes, the system can notify the user in time. In order to realize this new requirement, which design pattern can be added to the class diagram in Figure 3-2? Explain the reason for choosing this pattern within 150 words.

Question 5 (15 points)

Read the following instructions and C++ code, and write the words and sentences that should be filled in (n) in the corresponding column

In a system, class interval represents an interval defined by a lower bound and an upper bound. Requires a different format to display interval ranges. Such as [lower bound, upper bound]; [lower bound...upper bound]; [lower bound-upper bound], etc.

Now adopt the strategy mode to realize this requirement, and get the class diagram shown in Figure 5-1.

                           Figure 5-1 Class Diagram

   

 

 

Question 6 (15 points)

Read the following instructions and Java code, and write the word that should be filled in (n) in the corresponding column of the answer sheet

In a system, class interval represents an interval defined by a lower bound and an upper bound. Requires a different format to display interval ranges. For example, [lower bound.upper bound]:[lower bound...upper bound];[lower bound-upper bound], etc. are now using the strategy mode to achieve this requirement, and the class diagram shown in Figure 6-1 is obtained.

 

 

 

In the first half of 2023, software designers' real questions and answer analysis in the afternoon

Question 1 (15 points)

Question 1 (4 points) Click this link to view the real test analysis video

E1: Platform administrator E2: Farmer E3: Tenant E4: Third-party software

Question 2 (4 points)

D1: User information form D2: Base and plot information form D3: Farming process information form D4: Farming activity record form

Question 3 (4 points)

  

 

Question 4 (3 points)

Lot information, farming process information, farming activity records.

Question 2 (15 points)

Question 1 (5 points)

 

Question 2 (3 points)

(a) Code of part (b) Purchase quantity

The primary key is a combined primary key (model number, supplier name, part code, purchase date);

Foreign keys: model number, supplier name, part number.

Question 3 (7 points)

(1)

(2)

Store (store number, address, phone) primary key: store number

Sales (store number, model number, sales quantity, sales date) combined primary key: (store number, model number, sales date), foreign key: store number, model number

Question 3 (15 points)

Question 1 (6 points)

C1: Resource or academic resources C2: Conference Paper or conference papers

C3: Journal Article or term paper C4: Thesis or dissertation

C5: User or system user C6: Student or current student C7: Teacher or teacher

C8: staff or other in-service personnel (C6-C8 are interchangeable)

Question 2 (5 points)

C1: title, author, publication time, source, number of citations, number of downloads

C2: Meeting name, time and place

C3: Journal name, publication month, issue number, sponsor

C4: Degree Category, Graduation School, Major, Supervisor

(C1 defines public properties for the parent class, subclasses only need to define unique properties, and public properties are inherited from the parent class)

Question 3 (4 points)

Observer pattern. Observer mode defines a one-to-many relationship between objects. When the object state of an object changes, all objects that depend on it are notified and automatically updated. Meet system requirements.

Question 5 (15 points)

(1) virtual void doPrint(lnterval *val) = 0

(2) prt->doPrint(this);

(3) st = new PrintlntervalsComma()

 (4) st = new PrintlntervalsDots()

(5) st = new PrintlntervalsLine()

Question 6 (15 points)

(1) void doPrint (interval val)

(2) pr.doPrint(this)

(3) st= new PrintIntervalsComma()

(4) st= new PrintIntervalsDots()

(5) st = new PrintIntervalsLine()

Guess you like

Origin blog.csdn.net/xiaornshuo/article/details/132361352