A bookstore has a system for managing its customers. The system keeps information about the books each customer has bought,his debit balance[ the customers have the option of buying with credit (in other words to pay after a few months)], and the total amount of money he has spent till now( the cost of the books he bought so far). For each customers ,are available the below data(integers):
his code ( which constructed by 3 capital letters and 5(number) digits) > (Code)
his age >(Age)
the number of Books he already bought > (Books)
Total amount he has paid(spent) so far> (Total)
Debit Balance > (Decifit)
(in parenthesis are the name of the variables)
The file 'bookstore.csv' contains 1000 records of clients, unclassified, which are 'printed' from source file 'printCSVFile.java'.
And Below are the "Questions"for this Project :
B1. to write a class named 'client', which contains the above elements.
B2. to write a method that calculates the average price of books purchased by the customer (to the nearest whole number). Sought retroactive implementation of the method.
B3. to write a method, which calculates the net profit per customer of the bookshop, ( the money already spent minus the debit balance.)
B4. to write a method, which calculates the amount of monthly installment, if the outstanding balance must be paid within 3 months for a balance of 100 € and within six months on balance over 100 € (without regard to any rate) .
B5. to write a method, which calculates the importance of a client. A customer is considered 'important':
a. if you are over 40 years, has purchased at least 30 books and the outstanding balance does not
exceed 5% of the amount already spent or
b. if between 25 and 40 years and has purchased at least 10 books on average at least 15 € or
c. if you are over 40 years and the amount already spent at least 1500 €.
B6. to write a method (out of the class) that outputs to the minimum, maximum, average and standard deviation of the number of books already purchased by customers, the amount already spent and their debt balance. Finally, print and the percentage of customers that is important.
B7. to write a method (out of the class) which can print all customers who have already spent more than a certain amount or customers who have already bought more than a specified number of books. The criterion of 'amount' or 'books' should be selected by the user, as well as the minimum for the selected criteria.
B8. to write a method (out of the Class) which is to seek a client based on his code, using the method of BinarySearch.