Comments (4)
@vhpx what is your suggestion?
from video-store-manager.
The rental status should be in Transaction
and be named as isReturned. Being rented or not does not related to the stock whatsoever, but it is what we need to calculate the remaining stocks of any specific item.
For example:
int stocks = 30;
Transaction t1 = {..., true}
Transaction t2 = {..., false}
Transaction t3 = {..., true}
// For loop to increment by 1 when isReturned is true and decrement by 1 when it is false
// Result is 29 items in stock because 1 transaction isn't resolved yet.
To check if the item still has stocks to be rented, create hasStock()
in Item.
from video-store-manager.
Thank you for your suggestion. I'll delete the attribute rentalStatus
.
For the method hasStock()
, we aleady have the method isEmpty()
which has the same purpose.
In terms of the for loop, I think we need to update the stock whenever a transaction is made, not by looping through all transactions.
from video-store-manager.
Yup, that sounds great to me. I'll check back once you push your code.
from video-store-manager.
Related Issues (15)
- Change wildcard imports to specific import to avoid wasting resources on unnecessary imports. HOT 4
- Missing some authentication functionalities
- The main README file inside `docs` folder needs to be updated HOT 2
- Account constructor class and its methods are missing exception handlers HOT 1
- Account class is missing some CRUD and other necessary methods HOT 3
- Missing UI components & screens HOT 2
- Dependency Dashboard
- Missing functions related to transaction (stock, rent item, return item, ....) HOT 2
- Missing functions to display Item HOT 2
- Missing functions related to Account class (role promotion, search, etc...) HOT 3
- Need some clarifications about renting and calculating points HOT 8
- Missing common components (menu, button, input, dropdown, ... )
- Missing unstyled screens HOT 1
- Missing loading indicator when doing resource-intensive operations like I/O, searching, and filtering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video-store-manager.