- This project uses jdk 11.
- My project implements a simple customer-cash system that is, a store.
- Project uses console, without swing interface.
- Project uses files to store information, not a database.
✅ Sing in/Log out
✅ Registration
✅ Show list purchase and bill
✅ Top up the account
✅ Create purchase
✅ Clear list purchase
You can generate user
System.out.println("Registration");
try {
new Registration(getData("Enter your login please "), getData("Enter your e-mail please "),
getData("Enter your password please "), getData("Enter your sex please "),
Double.parseDouble(Objects.requireNonNull(getData("Enter your money please ")))).start();
} catch (Exception e) {
System.out.println("Maybe you enter bad symbol in field");
}
You authorization in system
System.out.println("Authorization");
try {
Login l = new Login(getData("Enter your login please "), getData("Enter your password please "));
l.start();
while (true) {
String role = checkUserRole(l.getLogin(), l.getPassword());
if (role != null) {
if (!menuAfterAuthorization(role, l.getLogin(), l.getPassword(), checkUserMoney(l.getLogin(), l.getPassword())))
break;
} else break;
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("Exception authorization!");
}
And you can also features referred to in paragraph Features.
Data about users and purchase will be store into files in such as users.txt
and purchase.txt.
Also I add some purchase because I wanna to buy many things =)
You can see in the next photo all list purchase.
Clear list - I think it's clear how it works.