Results 1 to 20 of 27
- 04-06-2011, 07:00 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
Starting Pseudo-Code For My Asignment?
Greetings fellow Java users. I have a new assignment that is due this Thursday, at 10:00 PM.
It's a pretty big difficulty jump from my last assignment, so I was wondering if you could start me off with a basic pseudo-code template?
Here is the assignment:
Please complete following tasks in the NetBeans.
Please create a project called MyBankingAssignment in NetBeans, and then load all classes and interfaces in the attached zip into this project. Now, please write a CreditCardAccount class according to following requirements:
1. A credit card account is still identified by an account number.
2. Description of the account is still required for recording account nick name and promotion information.
3. It still needs to track account balance.
4. The opening balance and opening date are recorded when a credit card account is open.
5. The credit account needs to compute the monthly interest based on the current account balance and monthly interest rate.
6. The credit account allows customers to pay their payment that is not over the current balance any time.
7. The credit account allows customers to use the credit card to make purchase as long as the account balance is not over the given credit line.
8. The CreditCardAccount class should implement the CreditAccount inteface.
Please (1) write a CreditCardAccount class according to the above requirements; (2) write a tester class CreditCardAccountTester in which please write at least 2 testing cases for each method you defined in the CreditCardAccount class (3) pack all files (with path) in the project into a zip file named as <Your Full Name>-mybanking.zip
And here is the attached zip with the classes and interfaces:
https://fordham.blackboard.com/cours...Assignment.zip
Thanks in advance.
- 04-06-2011, 07:33 AM #2
I don't see why you need help writing a template for this. Your assignment gives you all the information you need. It tells you that you need a class file and a tester file, there may be more classes required than your last assignment but just break it down.
Look at what its asking and turn it into a flow chart. Group the sections of the chart that could relate in the sense that you can reuse a single class to obtain your results.
If you've been given this assignment then shouldn't you have already learned enough about classes to know where to start?
- 04-06-2011, 11:46 PM #3
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
TBH, I find this to be the hardest class I've ever taken. My professor goes very fast and basically wants us to read the textbook and devise these programs via the textbook. And the amount of information you have to soak in is mind-blowing. I try to read it, but it's hard to remember much.
Anyway, I unzipped the folder and put the five pre-made classes into the project. I copied the CheckingAccount.java class into the CreditCardAccount.java class I need to create, since I understand that the format is about the same.
I then created the CreditCardAccountTester.java class and copied in this previous tester we went over, since I understand this contains much of what I need.
I've started to do some adjustments, but I guess my question is, what other changes do I need to make? I'm guessing I just need to create some code for the tester class? I'm kind of lost now. :(Java Code:public static void main (String[] args) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); CheckingAccount ca1 = new CheckingAccount(12392123, "EZ checking account", 2000.0, 1800.0, sdf.parse("03/23/2002"), 0.0032); CheckingAccount ca2 = new CheckingAccount(12393336, "Regular checking account", 15000.0, 16000.0, sdf.parse("03/23/2002"), 0.0032); System.out.println("After initialization"); System.out.println("Account No\tBalance\t\tInterest"); System.out.println(ca1.getAccountNum() + "\t" + ca1.getBalance() + "\t\t" + ca1.getInterest()); System.out.println(ca2.getAccountNum() + "\t" + ca2.getBalance() + "\t\t" + ca2.getInterest()); System.out.println("------------------------------------------------------"); ca1.draw(1000.0); ca2.deposit(2039.0); ca1.draw(1200.0); ca2.draw(16000.0); System.out.println("After draw and deposit"); System.out.println("Account No\tBalance\t\tInterest"); System.out.println(ca1.getAccountNum() + "\t" + ca1.getBalance() + "\t\t" + ca1.getInterest()); System.out.println(ca2.getAccountNum() + "\t" + ca2.getBalance() + "\t\t" + ca2.getInterest()); System.out.println("------------------------------------------------------"); }
- 04-07-2011, 12:18 AM #4
- 04-07-2011, 12:32 AM #5
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
Ah, we have a wise guy on our hands, huh?
I'm just asking what this assignment is asking for once I completed those steps. You obviously can't help me with each specific issue, but I'm asking where most of my new code needs to be.
Right now I'm trying to write code in the tester class after the initialization and before the results. I'm trying to ask the user whether they want a payment or purchase, and then put in code for their decision. Is that on the right track? And do I need to write out all the calculations, or am I supposed to just call it from one of the other classes, or something along those lines?
BTW, I'm confused on what "payment" and "purchase" mean according to the assignment:
6. The credit account allows customers to pay their payment that is not over the current balance any time.
7. The credit account allows customers to use the credit card to make purchase as long as the account balance is not over the given credit line.
- 04-07-2011, 12:38 AM #6
- 04-07-2011, 12:39 AM #7
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
- 04-07-2011, 12:47 AM #8
We can help you with specific parts of your code. However, if you have trouble understanding the requirements of the assignment then I suggest seeking clarification from your teacher.
- 04-07-2011, 12:53 AM #9
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
OK, here is the testing class I'm working on:
Java Code:package com.mybanking; import java.text.SimpleDateFormat; import java.util.Scanner; public class CreditCardAccountTester { public static void main (String[] args) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); CreditCardAccount ca1 = new CreditCardAccount(12392123, "EZ checking account", 2000.0, 1800.0, sdf.parse("03/23/2002"), 0.0032); System.out.println("After Initialization"); System.out.println("Account No\tBalance\t\tInterest"); System.out.println(ca1.getAccountNum() + "\t" + ca1.getBalance() + "\t\t" + ca1.getMonthlyInterest()); System.out.println("------------------------------------------------------"); System.out.println(""); System.out.println("Payment(1) Or Purchase(2)?"); System.out.println("After Payment Or Purchase"); System.out.println("Account No\tBalance\t\tInterest"); System.out.println(ca1.getAccountNum() + "\t" + ca1.getBalance() + "\t\t" + ca1.getMonthlyInterest()); System.out.println("------------------------------------------------------"); } }
I'm trying to figure out what to do under the "Payment(1) Or Purchase(2)?" part. I was thinking of asking for an input of 1 or 2, then writing code for each decision. Would that work, or am I supposed to do something else?
- 04-07-2011, 02:08 AM #10
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
A lot of people here tend to be very blunt, if you don't ask good questions, don't expect good answers. That being said, you seem to have clarified a bit.
With regards to the difference between purchase and payment, do you understand how a credit card works in real life?(a vague understanding is enough)
A payment is like how much you owe on the card. Say you charge 500 dollars, you can make payments towards reducing that at any time. A purchase is when you go to the store and actually buy an item. Let's say you owe 15000 dollars on that card, and your limit happens to be 15000, then if you try to buy something with that credit card you will not be allowed to make a purchase since you are at or above the limit.
- 04-07-2011, 03:17 AM #11
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
Thanks. I only acquired my first credit card last month, so I'm not 100% in tune with how they work.
Anyway, for now, I simply put in a fixed payment and a fixed purchase in my tester program, roughly as follows:
Java Code:ca1.purchase(1000); ca1.payment(2000);
I tried to ask the user whether they wanted a payment or purchase, but when I declared a new variable for the input of the decision, it said something about the variable being in a "static context". Does that mean I can't declare a new variable in a tester program or something?
So basically, I'm just trying to figure out how to ask the user whether they want to pay or purchase, and how much. The code for payment and purchasing are already in CreditCardAccount. Also, should this be done in CreditCardAccount or CreditCardAccountTester?Last edited by EpyonCustom; 04-07-2011 at 03:19 AM.
- 04-07-2011, 03:27 AM #12
- 04-07-2011, 03:37 AM #13
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
When asking questions try to be concise. Pretend we have no knowledge of the problem, the details may help us out a lot.
- 04-07-2011, 05:51 AM #14
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
I'm new to this stuff. I have no idea what I'm doing, so I also have no idea what you guys need to know.
Anyway, I'm not at the computer lab anymore, so I'll have to wait until tomorrow to post the code.
But here's the link to the project folder, so if you want to upload everything and have a crack at identifying what needs to be done, then that would be most triumphant:
https://fordham.blackboard.com/cours...Assignment.zip
- 04-07-2011, 06:03 AM #15
This page can help a lot with that.I have no idea what I'm doing, so I also have no idea what you guys need to know.
Did you come here for help with your learning process, or to find someone to help you cheat your way through?if you want to upload everything and have a crack at identifying what needs to be done, then that would be most triumphant:
db
- 04-07-2011, 06:53 AM #16
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
Jesus Christ. Where the hell did you get that idea? I never told anyone to finish my assignment. I said you could help "identifying what needs to be done". In other words, you take a look at my code and tell me what's wrong, so I could do it myself.
What's the difference between that and posting everything on here? The only reason I posted the file is because I use a Mac for personal use and cannot do any coding unless I'm at a computer lab.
- 04-07-2011, 06:54 AM #17
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
You do know that you can write java code on any system(including Mac) right?
- 04-07-2011, 06:58 AM #18
- 04-07-2011, 06:58 AM #19
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
- 04-07-2011, 07:00 AM #20
Member
- Join Date
- Mar 2011
- Posts
- 23
- Rep Power
- 0
I never told you to work on anything! Holy crap. You guys are ridiculous. Is this some kind of joke you're all playing on me?
"Identifying" does not mean "work". It means looking at the code, just like you would be doing if I posted the code on here, but I can't right now.
Similar Threads
-
Pseudo-priorityQueue datastructure
By leeple in forum Advanced JavaReplies: 2Last Post: 03-01-2011, 11:30 AM -
pseudo code
By jamiem in forum New To JavaReplies: 4Last Post: 12-20-2010, 05:25 PM -
Providing pseudo Webcam
By H@CK3R in forum New To JavaReplies: 21Last Post: 09-28-2010, 06:08 AM -
generate pseudo random numbers in java
By csr81 in forum Advanced JavaReplies: 3Last Post: 03-01-2010, 07:08 AM -
Implementing a pseudo random generator with shift-register method
By NewJavaBean in forum New To JavaReplies: 7Last Post: 04-07-2009, 06:04 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks