maxfarnham / pharmmanager Goto Github PK
View Code? Open in Web Editor NEWUIC CS342 Pharmacy Inventory management project
UIC CS342 Pharmacy Inventory management project
There's a smattering of code like this in the codebase:
public void update() {
System.out.println("Daily alerts for stock on " + getName() + ":");
Iterator bulkIterator = createIterator();
[...]
We need to refactor this so all presentation code is handled centrally, without any business logic around it, or it will be very difficult to add a GUI later.
Just wondering what you guys have in mind for tables/names/fields for our database. So far I have this one:
medicine: (int) medicineID, (string) name, (int) lowThreshold, (int) overThreshold, (string) size
Let me know if you want any additional tables and/or want to change the current table (as I see size can be an int depending on our implementation)
Anywhere we have the PharmacyManager directly accessing the meds list, we need to pull that out into a SQL statement that accesses the datalayer. I think my original design for the datalayer is a bit off, as we discussed tonight, and we should just need three functions:
executeUpdate(string SQL)
executeQuery(string SQL)
executeScalar(string SQL)
So with that in mind, basically anywhere we have stuff like:
meds.add(newMed);
We need to replace it with something like:
DB.executeUpdate("INSERT INTO Meds(Blah, Blah) VALUES('Bloo','Bloo')
We can also discuss the table structure here, I like Justo's separation of Medicine and "Bulks" (should we maybe call them shipments?), similar to what we did. So the meds table would look something like:
MedicineID | Name | LowStockThreshold | OverstockThreshold |
---|---|---|---|
int | string | int | int |
The bulk/shipment table would look like:
ShipmentID | Sold | Expired | InStock | ExpDate | MedicineID |
---|---|---|---|---|---|
int | int | int | int | DateTime | int |
Any thoughts on any of this?
If we execute a non-scalar query, to get all medicines in the table for example, what is it returning?
I know in 341 we worked with DataSets and adapters.
@justodiaz, do we need the factory in here? I think the factory is unnecessary and doesn't really add any value. We were thinking of using the template pattern instead, in the observables, which may fit more naturally into our problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.