I have coursework to do and I am still not sure about some planning parts of my project. So, let me explain, I’ve got a SQL file (a big database with dummy data) and my task is to setup and connect to the database and write Java code and satisfy a few requirements which will check if my connection with the database is valid. The database consists of tables such as customers, payments, orders, products, etc. My task is to do some calculations with those tables, also the focus is on coding, not on queries. Here is what I came up with: (let’s focus on the payment table and calculations) I have 5 classes: Main class, MySQLAccess class and one class for each table(payment, orders, customers).
Please have a look at the diagram above
My biggest concern is where and when should I populate my lists, in the test classes, or in the main class when the app is run, also do i need Main class or it could be control class.
Please feel free to submit any reasonable suggestion - class diagram changes