Topic: savings-account Goto Github
Some thing interesting about savings-account
Some thing interesting about savings-account
savings-account,Calculates and presents "real rates of return" for savings products available in the New Zealand marketplace.
User: adrianparker
savings-account,This project is very similar in design to the Mouse2 class and Mouse2Driver example in the book (Introduction to Programming with Java: A Problem Solving Approach, Second Edition by John Dean and Raymond Dean). Remember the project in Ch 4 about calculating the value of an account as it grows, which was enhanced in Ch 5 to look better? Weâll do the same work here but using OOP methodology. In this project, the user will specify the starting balance for a savings account, the interest rate, and the number of cycles it will grow at that interest rate. The program will display how much the account is worth at the end of that growth. We need a class that provides the blueprint for this savings account. What kind of variables do we need? The current balance is essential. Since this is a savings account that grows by adding earned interest, we need the value for the interest rate to be able to calculate that earned interest. You might want to know the customer who owns this account â but notice that the customer is the owner, not part of the account. Therefore, the customer info is not part of this account. So the data needed to provide the information about the account and its current state is balance and interest rate. What actions can this account take, what can it do? The first thing needed will be setting the balance and the interest rate, so we need âmutatorâ or âsetâ methods for those actions. We need to be able to see the balance, which is an âaccessorâ or âgetâ method. Is there any other method required for this class? We could stop here, and âgrowâ the account in the driver class or main method. But that doesnât make the best use of OOP design and programming, so weâre going add a method to the class to âgrowâ the account. Next, consider if the instance variables are public or private â protected or open to the world? If you want methods outside of this class, other programmerâs methods, to be able to change the variable directly, then make it public. Most of the time, youâll want to protect the variable, make sure itâs changed only by the methods provided in the class. For this account, we certainly want to protect the balance and interest rate, so they need to be private. Add a minus sign or hyphen in front of those two variables in the UML diagram to represent that access. Next consider the data type for each variable â double or integer? The balance is money, and interest rates require decimals, so the variables need to be doubles. The next step is to consider the methods. Are they private or public, available to the world outside of this class? All of them need to be public, because we are going to execute them from the driver class, which is outside of this class. What type of data will each method return? The âgetâ method will return the current value in the instance variable for balance, so it must return a double, matching data type of that variable. The two âsetâ methods donât need to return anything, so their return type is âvoidâ. The growAccount method is going to do work to change the account balance â does it need to return anything? No, its results will be in the balance variable, and we can get that number with the get method. So the growAccount method is also void. Do any of those methods need information passed into them when they are called? Usually the âsetâ methods need data to change the values in the variables. Here, we need to know the starting balance, the interest rate, and the number of cycles to grow the account, information provided by the user. For this project, we are going to use the driver class to ask the user for all that information. Therefore the driver class needs to pass the data to the methods in this class â the data will be provided to the method inside of its parentheses. The setBalance and setInterestRate methods need doubles passed to them. The growAccount method needs an integer for the number of cycles to grow the account. Begin by creating a new project and name it âCh6SavingsAccountâ. The IDE provides you the main class heading, which is the driver for this project. Weâll code that later; first, we need the class that will be the basis for that driver. In the File menu, click on âNew Fileâ â not new project, new FILE. Specify that the File Type is âJava Classâ, and name it âAccountâ. This is the name of the class â the file name must match the name of the class. The IDE has again given you the starting point for this type of file. Now that the class exists, turn your attention to the driver or main code. What needs to happen here? The user needs to provide the starting balance, interest rate, and number of cycles to grow the account. As you have done in previous projects, youâll ask the user to enter the necessary information. Take a moment to consider the interest rate value. The interest rate must be a double because it is a fraction of one whole unit. If someone says an interest rate is 7%, we donât use â7â for the calculations â we use 7 / 100. Always make it clear to the user if they are supposed to enter percentage rates (7 for 7%) or the mathematical percentage (0.07 for 7%). It is usually best to have the user type it as if there was a percent symbol following it â 7 for 7% makes a lot more sense to a user than 0.07 for 7%. If the user types in a number like 7, you must do the math in the program to convert that to its decimal equivalent of 0.07 â divide the interest rate by 100. That code is in the class above. Notice that there are variables for balance, interest rate, and cycles in this driver class, which seem like a repetition of the instance variables in the Account class. The variables in the driver class are used to communicate with the user, to get the data to pass to the Account class to create a specific account. As discussed in the book, we could use different names for the variables, like ânewBalanceâ or âinputInterestRateâ, and sometimes that is helpful to make it very clear what data is being stored in each variable. But they really are the same data here, so weâll use the same variable names in the driver class and the Account class. The prefix âthis.â in the Account class helps to clarify that the data passed into the method is assigned to the private instance variable in the Account class.
User: bell-kevin
savings-account,In this example, you will enhance the Savings Account driver to create multiple accounts. The project will create 3 separate Savings Accounts, simulating 3 different customers creating these accounts. Note that no changes are needed in the Account class â it describes an account, and it doesnât matter how many accounts we create with that class. Itâs like a favorite cookie recipe â itâs the same recipe no matter how many times you bake cookies. First, MAKE A COPY of the previous project for the Savings Account. In the project in Example 1, a Savings Account was created with this line: Account savingsAccount = new Account(); In this project, for clarity, name that account âsavings1â, like this: Account savings1 = new Account(); To create a second account, you repeat that same code but with a different name for the object. Account savings1 = new Account(); // first account Account savings2 = new Account(); // second account When this executes, there will be 2 distinct account objects. Each one has its own instance variables of balance and interest rate, and each has its own methods to get and set its variables and to grow. Create a third account. The original project asked the user for 3 pieces of information for 1 account. This project simulates asking 3 different users for those 3 pieces of information. That sounds like repetition, so use a FOR loop to ask for the data and assign the values to the variables in each object. Also grow the accounts inside this loop. You must use the same variables for the user input â balance, interestRate, and cycles â for each userâs information. Do not create 3 sets of those variables.
User: bell-kevin
savings-account,This project is very similar in design to the Mouse2 class and Mouse2Driver example in the book. Remember the project in Ch 4 about calculating the value of an account as it grows, which was enhanced in Ch 5 to look better? Weâll do the same work here but using OOP methodology. In this project, the user will specify the starting balance for a savings account, the interest rate, and the number of cycles it will grow at that interest rate. The program will display how much the account is worth at the end of that growth. We need a class that provides the blueprint for this savings account. What kind of variables do we need? The current balance is essential. Since this is a savings account that grows by adding earned interest, we need the value for the interest rate to be able to calculate that earned interest. You might want to know the customer who owns this account â but notice that the customer is the owner, not part of the account. Therefore, the customer info is not part of this account. So the data needed to provide the information about the account and its current state is balance and interest rate. What actions can this account take, what can it do? The first thing needed will be setting the balance and the interest rate, so we need âmutatorâ or âsetâ methods for those actions. We need to be able to see the balance, which is an âaccessorâ or âgetâ method. Is there any other method required for this class? We could stop here, and âgrowâ the account in the driver class or main method. But that doesnât make the best use of OOP design and programming, so weâre going add a method to the class to âgrowâ the account. Next, consider if the instance variables are public or private â protected or open to the world? If you want methods outside of this class, other programmerâs methods, to be able to change the variable directly, then make it public. Most of the time, youâll want to protect the variable, make sure itâs changed only by the methods provided in the class. For this account, we certainly want to protect the balance and interest rate, so they need to be private. Add a minus sign or hyphen in front of those two variables in the UML diagram to represent that access. Next consider the data type for each variable â double or integer? The balance is money, and interest rates require decimals, so the variables need to be doubles. The next step is to consider the methods. Are they private or public, available to the world outside of this class? All of them need to be public, because we are going to execute them from the driver class, which is outside of this class. What type of data will each method return? The âgetâ method will return the current value in the instance variable for balance, so it must return a double, matching data type of that variable. The two âsetâ methods donât need to return anything, so their return type is âvoidâ. The growAccount method is going to do work to change the account balance â does it need to return anything? No, its results will be in the balance variable, and we can get that number with the get method. So the growAccount method is also void. Do any of those methods need information passed into them when they are called? Usually the âsetâ methods need data to change the values in the variables. Here, we need to know the starting balance, the interest rate, and the number of cycles to grow the account, information provided by the user. For this project, we are going to use the driver class to ask the user for all that information. Therefore the driver class needs to pass the data to the methods in this class â the data will be provided to the method inside of its parentheses. The setBalance and setInterestRate methods need doubles passed to them. The growAccount method needs an integer for the number of cycles to grow the account. Begin by creating a new project and name it âCh6SavingsAccountâ. The IDE provides you the main class heading, which is the driver for this project. Weâll code that later; first, we need the class that will be the basis for that driver. In the File menu, click on âNew Fileâ â not new project, new FILE. Specify that the File Type is âJava Classâ, and name it âAccountâ. This is the name of the class â the file name must match the name of the class. The IDE has again given you the starting point for this type of file. Now that the class exists, turn your attention to the driver or main code. What needs to happen here? The user needs to provide the starting balance, interest rate, and number of cycles to grow the account. As you have done in previous projects, youâll ask the user to enter the necessary information. Take a moment to consider the interest rate value. The interest rate must be a double because it is a fraction of one whole unit. If someone says an interest rate is 7%, we donât use â7â for the calculations â we use 7 / 100. Always make it clear to the user if they are supposed to enter percentage rates (7 for 7%) or the mathematical percentage (0.07 for 7%). It is usually best to have the user type it as if there was a percent symbol following it â 7 for 7% makes a lot more sense to a user than 0.07 for 7%. If the user types in a number like 7, you must do the math in the program to convert that to its decimal equivalent of 0.07 â divide the interest rate by 100. That code is in the class above. Notice that there are variables for balance, interest rate, and cycles in this driver class, which seem like a repetition of the instance variables in the Account class. The variables in the driver class are used to communicate with the user, to get the data to pass to the Account class to create a specific account. As discussed in the book, we could use different names for the variables, like ânewBalanceâ or âinputInterestRateâ, and sometimes that is helpful to make it very clear what data is being stored in each variable. But they really are the same data here, so weâll use the same variable names in the driver class and the Account class. The prefix âthis.â in the Account class helps to clarify that the data passed into the method is assigned to the private instance variable in the Account class. Take a screenshot of your program execution that matches the sample session, then run the program 2 more times with different data and take 2 more screenshots. Submission: 3 screenshots, and the root folder for the project Pay careful attention to the rubric for this assignment. Remember the standards that apply to every project. Note that you must use correct formatting in the code -- appropriate indentation is most important. You can use Shift-Alt-F to have NetBeans automatically format the code correctly. If the formatting is incorrect, it will be returned to you for changes with a grade of zero. Note: You need to submit the whole project for these assignments. In File Explorer, go to the location where you created the project. There will be a folder with the name of your project -- that is the root folder of the project. If you submit the root folder of the project, the instructor can run it on a different machine to grade it. If you don't submit the proper folder, it won't run on another machine, and the assignment will be marked with a zero.
User: bell-kevin
savings-account,Stack Sats. Dollar cost average (DCA) calculator for stacking bitcoin
User: bitkarrot
Home Page: https://stack.bitcoin.org.hk
savings-account,Solidity smart contract for the creation of a "piggy bank" style savings account.
User: douglas-robert-hill
savings-account,This project consists of four Python files that together form a simple banking system to manage and calculate the balance and interest earned on Savings and Certificate of Deposit (CD) accounts.
User: elphysalvarez01
savings-account,A PHP script to calculate and display the growth of a savings account over 20 years with an initial deposit of 1000 DH and an annual interest rate of 2%.
User: er-hiba
savings-account,My implementation of a DeFi Mini Savings Account using Solidity and Foundry.
User: ivan-kyu
savings-account,A FinTech Streamlit app to monitor, manage and optimize your bank savings
User: jumitti
Home Page: https://gklb-fintech.streamlit.app/
savings-account,Self-hosted web-based virtual pots to manage multiple saving goals with one saving account at the bank
User: karlh001
savings-account,Simple saving account smart contract which with borrowing/lending functionalities
User: kitanovicd
savings-account,Open Finance research group repository
Organization: ledgerback
savings-account,The goal of this project was to create a contract that can send ETH to either one of two savings accounts.
User: mmsaki
savings-account,đŠ Calculate Future Compounding Interest Earnings/PaymentsđȘ
User: prem-ium
savings-account,Passive Cash Ideas
User: stevob14
Home Page: https://www.passivecash.xyz
savings-account,Java Codes
User: theprov1
savings-account,A savings account management app.
User: yud-bet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. đđđ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google â€ïž Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.