Page 1 of 2 12 LastLast
Results 1 to 20 of 27
  1. #1
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Post 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.

  2. #2
    Dark's Avatar
    Dark is offline Senior Member
    Join Date
    Apr 2011
    Location
    Camp Lejuene, North Carolina
    Posts
    643
    Rep Power
    4

    Default

    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?

  3. #3
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Dark View Post
    If you've been given this assignment then shouldn't you have already learned enough about classes to know where to start?
    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.

    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("------------------------------------------------------");  
      }
    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. :(

  4. #4
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    Quote Originally Posted by EpyonCustom View Post
    what other changes do I need to make? I'm
    Do you realise how vague that question is. A perfectly valid answer: remove unnecessary code, add missing code and change incorrect code. Those are the changes you need to make.

  5. #5
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Junky View Post
    Do you realise how vague that question is. A perfectly valid answer: remove unnecessary code, add missing code and change incorrect code. Those are the changes you need to make.
    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.

  6. #6
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    No I'm not trying to be smart, just highlighting a lack of communication on your part.
    Quote Originally Posted by EpyonCustom View Post
    You obviously can't help me with each specific issue
    Quite the opposite. Ask a specific question and get a specific answer.

  7. #7
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Junky View Post
    No I'm not trying to be smart, just highlighting a lack of communication on your part.

    Quite the opposite. Ask a specific question and get a specific answer.

    I was more specific in my above post. Do you still need more information?

  8. #8
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    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.

  9. #9
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Junky View Post
    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.
    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?

  10. #10
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    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.

  11. #11
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by sunde887 View Post
    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.

    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.

  12. #12
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    Quote Originally Posted by EpyonCustom View Post
    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?
    No, it means you need to revise what static means. Once again we have a communication problem. If you are getting errors then you need to post your latest version of code and paste the EXACT error message(s). We don't read minds.

  13. #13
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    When asking questions try to be concise. Pretend we have no knowledge of the problem, the details may help us out a lot.

  14. #14
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Junky View Post
    No, it means you need to revise what static means. Once again we have a communication problem. If you are getting errors then you need to post your latest version of code and paste the EXACT error message(s). We don't read minds.

    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

  15. #15
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,413
    Rep Power
    20

    Default

    I have no idea what I'm doing, so I also have no idea what you guys need to know.
    This page can help a lot with that.

    if you want to upload everything and have a crack at identifying what needs to be done, then that would be most triumphant:
    Did you come here for help with your learning process, or to find someone to help you cheat your way through?

    db

  16. #16
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Darryl.Burke View Post
    Did you come here for help with your learning process, or to find someone to help you cheat your way through?

    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.

  17. #17
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You do know that you can write java code on any system(including Mac) right?

  18. #18
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    Quote Originally Posted by EpyonCustom View Post
    Where the hell did you get that idea?
    From the comment in your previous post.
    so if you want to upload everything and have a crack at identifying what needs to be done
    This implies that you want us to work on the assignment while you get your beauty sleep. Don't hold your breath.

  19. #19
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by sunde887 View Post
    You do know that you can write java code on any system(including Mac) right?
    My professor told us not to use Macs. Is there a reason why he might say that?

  20. #20
    EpyonCustom is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Quote Originally Posted by Junky View Post
    From the comment in your previous post.

    This implies that you want us to work on the assignment while you get your beauty sleep. Don't hold your breath.
    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.

Page 1 of 2 12 LastLast

Similar Threads

  1. Pseudo-priorityQueue datastructure
    By leeple in forum Advanced Java
    Replies: 2
    Last Post: 03-01-2011, 11:30 AM
  2. pseudo code
    By jamiem in forum New To Java
    Replies: 4
    Last Post: 12-20-2010, 05:25 PM
  3. Providing pseudo Webcam
    By H@CK3R in forum New To Java
    Replies: 21
    Last Post: 09-28-2010, 06:08 AM
  4. generate pseudo random numbers in java
    By csr81 in forum Advanced Java
    Replies: 3
    Last Post: 03-01-2010, 07:08 AM
  5. Replies: 7
    Last Post: 04-07-2009, 06:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •