Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the demand in UML vending machine system

2025-04-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

How to carry on the demand analysis in the UML vending machine system, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Introduce the design and implementation of UML vending machine system, mainly including system functional requirements and control requirements. I believe you have a certain understanding of the design and implementation of UML vending machine system through the study of this section.

Design and implementation of UML vending machine system

Requirements: according to the functional requirements of the vending machine, design and implement a vending machine software system, complete the demand analysis, software person vending system. When selling, the customer puts the coin into the slot of the machine. The machine is set up in one corner, five corners and basic documents such as design and software testing.

UML vending machine system functional requirements:

The vending machine system is a slot for three coins without one yuan. After the customer confirms the purchase, the vending machine can add up according to the face value of the coins.

The vending machine is equipped with a cargo distributor. Each cargo distributor contains zero or more goods of the same price. The customer chooses the goods by choosing the goods distributor. If there are goods in the goods distributor and the currency value paid by the customer is not less than the price of the goods, the goods will be distributed to the goods delivery hole to the customer and the appropriate change will be returned to the refund hole. If the distributor is empty, coins equal to the monetary value paid by the customer will be added to the refund hole. If the customer pays less than the price of the goods in the selected distributor, the machine will wait for the customer to put in more money. If the customer decides not to buy the selected goods, withdraw the coin from the refund hole.

UML vending machine system control requirements:

According to the flow of the automatic control system of the vending machine, we can know that the main systems of the vending machine include: coin counting system, comparison system, selection system, beverage supply system, coin refund system and alarm system.

1. Coin counting system:

When there is a quota to buy a drink, the invested coin passes through the sensor, which remembers the number of coins and is transmitted to the detection system (that is, the electronic balance) and the coin counting system. Only when the weight measured by the electronic balance is less than the error value, the counting system is allowed to stack coins, and the superimposed coin data is stored in the data register D2. If it is not correct, it is considered to be counterfeit. Fixed coin, established system, waiting for new customers.

2. Comparison system:

After the input, the system will compare the coin data in D2 with the price of the beverage. When the coin is less than 2 yuan, the indicator Y0 is on, indicating that the coin is insufficient. At this time, you can reinvest the coin or choose to refund the coin. When the submitted coin is between 2 yuan and 3 yuan, the water selection indicator will stay on. When it is more than 3 yuan, the light of water and coffee will stay on at the same time. At this point, you can choose a drink or a refund.

3. Select the system:

After the completion of the comparison circuit, the light of the selection circuit is long, and when the selection of soda or coffee is pressed, the corresponding selection indicator changes from long light to flashing in a period of 1 second. When the drink is served, the flicker stops at the same time.

4. Beverage supply system:

When the select button is pressed, the corresponding solenoid valve (Y4 or Y6) and the motor (Y3 or Y5) start at the same time. At the same time of the output of the drink, subtract the corresponding number of coins purchased. When the beverage output reaches 8 seconds, the solenoid valve is turned off first, and the small motor continues to work for 0.5 seconds and then stops. The function of this small motor is to speed up the output of beverages. When the solenoid valve is closed, put pressure on the solenoid valve to accelerate the closing of the solenoid valve. (note: due to the long-term use of the vending machine, when the solenoid valve is used too much, the return elasticity will be reduced, and the drink will leak if it can not be turned off completely. At this time, the motor Y3 and Y5 extend the work for 0.5 seconds to increase the pressure of the solenoid valve, so that the solenoid valve can be closed in good condition. )

5. Coin refund system:

When the customer has finished buying the drink, the extra coin only needs to press the refund button. The system will first divide the number of coins in the data register D2 by 10 to get the integer part, which is the amount of 1 yuan that needs to be returned and stored in D10. The rest is stored in D11. The integer part obtained by dividing D11 by 5 is the amount of 50 cents to be returned, which is stored in D12. The rest is stored in D13. The value in * * D13 is the amount of ten cents to be returned. Start 3 refund motors while choosing the refund. The three sensors begin to count, and when the number recorded by the sensor is equal to the number of currencies returned by the data register, the refund motor stops running.

6. Alarm system:

If the alarm system is a non-fault alarm, you only need to notify the liquid delivery truck or coin delivery car through the network. However, if it is a fault alarm, it is necessary to notify the maintenance personnel to carry out maintenance. Stop the service at the same time to avoid the loss of customers. So much for the introduction of the UML vending machine system.

This is the answer to the question about how to carry out the demand analysis in the UML vending machine system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 270

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report