Hello every one , I am new to java learning from different example i am useing bluej. Any help would be much appreciated. I just dont know where to start i done few programs my friend show me that on her Pc but i didnt understand very well. so i need to understand that example.

E.G
BankAccountInput
This is a simple exercise to ensure that you know how to use the UserInput class. The problem concerns the input and display of a BankAccount details and it will be developed further in the next unit. Write a program to input and display details of a BankAccount.

Method
I got the skeleton code and replace the dots with the text you are required to print.
Typical Input: John Stevens
1509
11 Main Road
Cardiff
CF32 7GH
Wales
Typical Output: Name: John Stevens
PIN: 1509
11 Main Road
Cardiff
CF32 7GH
Wales

Hints
Make use of UserInput.read........() to read input from the keyboard. Make liberal use of comments and use correct indentation style to make your program more readable and easy to understand.


skeleton code :

///////////////////////////////////////////////////
/////  
/////  LogName: pplassma
/////  FullName: 
/////  CreationDate: 2006-09-28 15:04:27
/////  
///////////////////////////////////////////////////




/*
 * Write a description of class InputBankAccount here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

public class InputBankAccount{

   public static void main(String[] argv) {

      // Complete here with appropriate code

      // put your  local declarations  here

      // Prompt and read the name

      // Prompt and read the PIN

      // Prompt and read the Address

      // print
      System.out.println("............");

      // or use the BankAccount class like this
      BankAccount p = new BankAccount("Bob Smith",1509);

      // print
      System.out.println(p);

   } // end of main

} // end class

Please need help to kick off .. Thanks i hope i learn a lot here ...I am web devel in flash if any one need help most welcome.

First, decide what properties a Bank Account has. For example, a Rectangle has the following properties:

height, width, area

Once you decide what properties a Bank Account has, create variables in your Bank Account class to represent those properties. Then, create methods to do certain things with those properties. Does this sound too vague? Probably. Why? Because nobody can 'get you started' on Java or any programming language for that matter. You have to get yourself started by picking up a book or tutorial on Java, then come to us with specific questions about things you don't understand.

The Starting Java post at the top of the forum has many helpful resources.

most important: write your own code and don't just copy-paste something a friend gave you. it's nice as illustration, but you won't learn half as much in it as when you write it yourself.

But i need just to start thats why some one can help me for one example please. i m also reading books its not that easy

considering the hints you were given, and that you are also checking your books, have you made any improvements in your code?

Working fine .if any one need in future have fun. no help what so ever on deniweb site anyway thanks all for your time.

/*
 * Write a description of class InputBankAccount here.
 * 
 * @author (Farhan Mirza) 
 * @version (10-11-2008)
 */

public class InputBankAccount{

   public static void main(String[] argv) {


        String name;
        int pin;
        String Street;
        String Town;
        String PostCode;
        String Country;

       System.out.println("user name");
       name = UserInput.readString();
       System.out.println("Pin");
       pin = UserInput.readInt();
       System.out.println("Street");
       Street = UserInput.readString();
       System.out.println("Town");
       Town = UserInput.readString();
       System.out.println("Post Code");
       PostCode = UserInput.readString();
       System.out.println("Country");
       Country = UserInput.readString();
       System.out.println("\nName: " + name+ "\nPin: " + pin + "\n" + Street + "\n" + Town + "\n" + PostCode + "\n" + Country );  // print

   } // end of main

} // end class
commented: Terrible attitude. -2

You didn't get a lot of detailed help because you didn't show the least bit of effort to understand or complete the assignment yourself. Perhaps if you had posted even one specific question that demonstrated that you had tried understanding anything about it whatsoever, you might have gotten a bit more assistance.

But thanks for posting an absolutely useless example of "How to program Java procedurally and ignore the entire point of an object-oriented language" though. I'm sure it will help many new students learn how not to use Java.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.