What is java?
Java is a general-purpose, class-based, object-oriented programming language designed for having lesser implementation dependencies. It is a computing platform for application development. Java is fast, secure, and reliable, therefore. It is widely used for developing Java applications in laptops, data centers, game consoles, scientific supercomputers, cell phones, etc
Right now there are around 4 billion devices in the world that uses java
What is object-oriented programming?
Object-oriented programming (OOP) is a programming paradigm based on the concept of objects which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods)
Some important features of object-oriented programming
Encapsulation
Abstraction
Polymorphism
Inheritance
Java project work
overview: -
A new bank wants to make a simple application to keep track of all accounts and transactions. it is required to help the bank manager implement the required application.
Requirements: -
It is required to store all bank accounts in one collection and all the transactions that happened in another collection
Each account has a unique account number, a holder, and a balance. There is a specific prefix (common for all accounts) that should be added to the holder's civil id to create the unique account number. In addition, it is not allowed for a holder to have more than one account. Furthermore, only three transactions are allowed on any account: deposit, withdrawal, and transfer money to another account
Each holder has a unique civil ID (national id), a name, and other attributes (add at least 2 attributes from your choice).
For each transaction, it is required to store the account(s) affected, amount of money, date, and if they are successful. There are 3 types of transactions: deposit, withdrawal, and transfer
Moreover, you have been informed that the following operations happen frequently:
Creating a new account
Deposit money into a specified account
Withdrawal money from a specified account
Transfer money between two specified accounts
Printing details of the transaction where the maximum amount of money has been transferred between 2 accounts
Saving all accounts and transactions into a text file. For accounts, they should be sorted in ascending order (according to the civil id)
Hints: -
For each class, it is required to implement constructors, setters, getters, toString() method, and any other necessary method
If the user tries to do an operation that could violate the state of objects, the operation should be ignored and the application should display an error message (e.g. creating an account for the same holder twice, etc.)
Checking equality of any 2 objects should be done via the equals() method
There is a class that will do the main job of the bank as follows:
It has a collection to store the accounts and another one to store the transactions
It has static methods, one for each operation that happens frequently
For each operation, a message should be displayed to the user to explain the status of the operation (i.e. if it was successful or not
Testing: -
After implementing the required classes, design and implement a testing class to test them as follows:
Create at least 3 bank accounts and do some transactions on them
Try to violate the state of the objects and show that your code prevents all violations
Show that the other operations that happen frequently are working fine
You can use the above information to make the project or If you want a full solution or you want to learn anything then please send help request atcontact@codersarts.com or fill the form or Chat with website assistant
Comentarios