my homework number 6
This repository was create for my homework number 6.
Task 1.
Create a CreditCard class with the fields account number and current amount in the account. Create one constructor with two parameters. Add a method that allows you to charge the amount to your credit card. The method takes an amount as input and adds this amount to the current one. Consider how you should set the method's input and output parameters. Add a method that allows you to withdraw a certain amount from the card. The method takes an amount as input and subtracts this amount from the current one. Consider how you should set the method's input and output parameters. Add a method that displays current card information. Write a program that creates three objects of the CreditCard class that are given an account number and an initial amount. Test script for verification: Place money on the first two cards and withdraw from the third. Display the current status of all three cards.
Task 2.
Create a class to describe a student in our group. Class fields: first name, last name, passport number, group name (you can add your own fields if desired - for example, age). Create objects of this class for each student in our group. Place all these objects into an array. Loop through the array with a for-each loop and output information to the console.
Addditional task:
Additional task 1.
The user makes a deposit in average rubles for a period of several years at 10% per annum. (every year the size of his contribution increases by 10%. This money is added to deposit amount, and there will also be interest on them next year). Write a bank program that accepts arguments after a year and returns. The amount that will be in the user's account.