Rust Programming for Smart Contract Development
Task: Rusty Store Inventory Management System
Your task is to create an inventory management system for a small retail store using Rust. The system should be able to manage the store's inventory, sales, and purchases.
The system should have the following features:
Inventory Management: The system should allow store managers to add, edit, and delete products from the inventory. Each product should have a name, description, price, and quantity.
Sales Management: The system should allow store managers to record sales transactions, including the product sold, the quantity sold, and the sale price. The system should also calculate and display the total sales and profit made from each transaction.
Purchase Management: The system should allow store managers to record purchase transactions, including the product purchased, the quantity purchased, and the purchase price. The system should also calculate and display the total cost of each purchase.
Reporting: The system should be able to generate reports that show the store's inventory, sales, and purchase history. Reports should be generated in a user-friendly text format that's easy to read, such as a well-structured table or list.
Error Handling: The system should have robust error handling capabilities, including handling of invalid inputs, out-of-stock items, and other possible errors.
Security: The system should have basic security measures in place, such as authentication for store managers to prevent unauthorized access to the inventory, sales, and purchase data.
User Interface: The system should have a clear and intuitive text-based user interface that allows store managers to easily navigate and perform tasks.
To complete this project, you will need to use Rust's basic data types, functions, and control flow structures, as well as concepts such as ownership, borrowing, structs, enums, traits, and error handling. You may also use third-party libraries and crates to enhance the functionality of your system.
You should submit your project in a GitHub repository, including detailed documentation on how to run and use the system, as well as a README file with instructions for building and running the system. Please include a comprehensive suite of test cases to demonstrate the correctness of your code and some basic examples of authentication and access control to enhance system security.
Good luck, and have fun building your Rusty Store Inventory Management System!
Project
Comments
You need to enroll in the course to be able to comment!