I wanted to take on a project that seemed to be pretty cool - building a financial advisor for people using the Java language. Java is my favorite coding language by far, and I wanted to see if I can successfully complete this task. So let me show you my attempted program for accurately advising someone what to do with their money. The "Advise" ClassThe Advise class here is the main class. Now, what exactly is the main class you ask? The main class combines all the other classes to obtain the inputs and calculate the financial status of the person based on the inputs. So, first, I ask a question that is the whole purpose of this project, "are you spending the right way?" After I prompt the user, I start out with salary, and then initialize the variable 'salary' and print the statement out for them. I then carry out the getSpent method which gets the amount you spend from the getSpent class. Then, I carry out the credit card balance class to get the estimated balance. I then implement the 'if' and 'else' statements here for the user to find out whether they are spending well enough. |
Archives
March 2021
Topics
All
|