Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Baskar
Book Bank
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


Dear Sir, Could you send me the java codings for BOOK BANK.Its very urgent, please


Advertisement
View Answers

December 18, 2010 at 3:00 PM


Hi Friend,

Try the following code:

import java.io.*;
import java.util.*;

 public class BookBank{
    public static void main(String[]args)throws Exception{
        File f=new File("C:/books.txt");
        BufferedWriter bw=new BufferedWriter(new FileWriter(f,true));
        Book b=new Book();
        Scanner input=new Scanner(System.in);
        System.out.println("Book ID: ");
        String id=input.nextLine();
        System.out.println("Title: ");
        String  title=input.nextLine();
        System.out.println("Author: ");
        String  author=input.nextLine();
        System.out.println("Price: ");
        double  price=input.nextDouble();
        bw.write(id+" "+title+" "+author+" "+Double.toString(price));
        bw.newLine();
        bw.close();
        BufferedReader br=new BufferedReader(new FileReader(f));
        String line="";
        ArrayList list = new ArrayList();
           while((line = br.readLine()) != null){
           list.add(line);
           }
           Iterator itr;
           for (itr = list.iterator(); itr.hasNext();) {
           String str = itr.next().toString();
           String[] splitSt = str.split(" ");
           String ide = "", tit = "",aut="",p="";
           for (int i = 0; i < splitSt.length; i++) {
           ide = splitSt[0];
           tit = splitSt[1];
           aut = splitSt[2];
           p = splitSt[3];
           }
           System.out.println(ide+"    "+tit+"     "+aut+"    "+p);
           }
    }   
}

Hope that it will be helpful for you.

Thanks



Related Tutorials/Questions & Answers:
Book Bank
Book Bank  Dear Sir, Could you send me the java codings for BOOK BANK.Its very urgent, please   Hi Friend, Try the following code...)); Book b=new Book(); Scanner input=new Scanner(System.in
Mini project on Book Bank using netbeans tool with java and for database using mysql
Mini project on Book Bank using netbeans tool with java and for database using mysql  hi roseindia, i have need the miniproject on bookbank with the deisgn using the netbeans tool, and create the database for that using mysql
Advertisements
Mini project on Book Bank using netbeans tool with java and for database using mysql
Mini project on Book Bank using netbeans tool with java and for database using mysql  hi roseindia, i have need the miniproject on bookbank with the deisgn using the netbeans tool, and create the database for that using mysql
bank application
bank application  hello sir I got the simple bank application project which is very useful but I want the database for this project kindly send me database for this simple online bank application
Bank project
Bank project   Create a class Customer a. Having Instance variables Customer id(int), Customer Name(String), Customer Address(String), Customer Telephone(String) and Customer Email id(String) b. Method which generates Customer Id
refrence book
refrence book  suggest many good book for hibernet
validate bank account number
validate bank account number  how to validate bank account number in jsp
validate bank account number
validate bank account number  how to validate bank account number in jsp
Bank Management System
Bank Management System  I need a Bank Management System Project in Java Swing
security mangement for bank's IT infrastructure
security mangement for bank's IT infrastructure  how i can give account number to a customer in our bank database??? plz help me out
book system
book system  i have a problem here..how can i make a system for borrowing books, which include members or non members category, books category, rent category, return category and buy category
abt the bank application
abt the bank application  pls can u send to me the user table and transaction table sql statement with their datatype used in this bank application to my email
bank management - Java Beginners
bank management  Assume that the bank maintains two kinds of accounts for its customers, one called savings account and the other current account... but no cheque book facility. The current Account provides cheque book facility
how to generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
bank details - JSP-Servlet
bank details  hi i just need a coding for bank details... since iam working as a trainee my leader gave me task like this.. What he want me to do is first to set the user account details in database, and the to create a login
bank account gui
bank account gui  Add event handling to the AccountUI class which will allow you to: 1.Create new account, when the ??Create?? button is pressed...[]){ Account at=new Account (); at.setTitle("Bank Account System"); at.setSize(500,300
Bank account gui
Bank account gui  Add event handling to the AccountUI class which will allow you to: 1. Create new account, when the â??Createâ?? button... static void main(String arg[]){ Account at=new Account (); at.setTitle("Bank Account
Bank account manangement - Java Beginners
Bank account manangement  Assume that the bank maintains two kinds of accounts for its customers, one called savings account and the other current... but no cheque book facility. The current Account provides cheque book facility
note book program
note book program  note reference program
E BOOK REQUIRED
E BOOK REQUIRED  Wicket in Action pdf required Urgently. Thnx
simple bank application - JSP-Servlet
simple bank application  hi i got ur codings...But if we register a new user it is not updating in the database...so plz snd me the database also.... Thank you
j2ee text book
j2ee text book  what is the best book for learning j2ee with examples in weblogic server with (netbeans or eclipse
online address book
online address book  how to create online address book using jsp and mysql
book for struts 1.2.9 - Struts
book for struts 1.2.9  Can any body suggest me book for struts 1.2.9 ? because using net beans 6.1 and they provided struts 1.2.9 support for net beans 6.1 please suggest me book for same and link if u have so i can download
miniproject on address book in java
miniproject on address book in java  hi rose india, i urgently need an miniproject on address book in java(netbeans ide 6.9.1) using mysql..... Though not of address book but operations are same i.e add,delete,search,update
Address book in iphone
Address book in iphone  hello.. how can we use address book in our iphone app ???   hello Nice Question first of all you have...{ return NO; } this is the whole process for implement address book in you
Book Writing
Book Writing Book Writing... story told? We know that writing a book is not everyone's cup of tea... partner to give a professional support for your book writing
Simple Bank Application in JSP
Simple Bank Application in JSP       In this section, we have developed a simple bank... transaction report  for particular time period. We run this Bank Application
Java Bank Account Application
Java Bank Account Application Here we have created a Bank Account Application that will allow users to do their transactions. For this, user will have to enter all the required information like, name, account number, account type
project on bank management system - Swing AWT
project on bank management system  plz give me code to move from by clicking a button on one panel to other panel and the add textfield and label such as name , address etc to second panel and textfield are one below to other
online book store by using MVC architecture
online book store by using MVC architecture  Tarzan book store... will add books with book name, author name, category (Java, Philosophy, Fiction... to search books by category or author name or book name and it should accept wild
Computer questions for Bank PO Exams and upsc competitive exams
Computer questions for Bank PO Exams and upsc competitive exams  Computer questions for Bank PO Exams and upsc competitive exams. These questions will help you to improve your basic knowledge of computers. characteristics
Help with an address book program! - Java Beginners
Help with an address book program!  I have a very long question... the pieces together) that would represent a contact book. Here's what I need it to do: * The address book application is command line based. It takes
How to design a simple note book
How to design a simple note book In this example you will learn to make simple note book, It is a very simple so follow this tutorial. New File: Create a new file with appropriate size. Rectangle Shape
Can you suggest any good book to learn struts
Can you suggest any good book to learn struts  Can you suggest any good book to learn struts
Phone Book Midlet Example
J2ME Contact List       This Example goes to create a Phone Book MIDlet This example illustrates how to create your phone book. In this example we are taking three SCREEN
Design a class named BankAccount to hold datas for a bank account in Java using Bluej Software - Java Interview Questions
Design a class named BankAccount to hold datas for a bank account in Java using Bluej Software  1)Design a class named BankAccount to hold the following data for a bank account: - Balance - Number of deposits
flex didn't know how to drag and drop video and audio in flip book - Framework
;hello sir in my project in flex flip book it is book which can be flip.our target to add the video audio and photo in this book i am able to add the photo in this book but i didn't able to add video and audio so pls help me for my project
Book Writing
Book Writing We have been providing exceptional... to get your story told? We know that writing a book is not everyone's cup... as an ideal partner to give a professional support for your book writing
Hibernate Book
Hibernate Book      ... need to start working with Hibernate now. The book focuses on the 20% you... Hibernate 3 Pro Hibernate 3 is the first book to offer complete coverage
Re-installing Mac OS X on Mac Book Pro by formatting the Hard Disk
and then reinstalling the Mac OS X on your Mac Book Pro. Sometimes you need to reinstallMac OS X on your Mac Book pro due to certain reasons and often it looks a tedious task but it is actually not so. You can reinstall your Mac Book pro
Java Application for Book Store
); int menu = 0; System.out.println("Book Store"); System.out.println(); System.out.println("1. Buy book"); System.out.println("2. Receipt...(); switch (menu) { case 1: count++; System.out.println("Book Title
PHP Ajax Book
PHP Ajax Book      .... This book will teach you how to create faster, lighter, better web applications... a basic knowledge of PHP, XML, JavaScript and MySQL, this book will help you
Advertisements
 

 

 

DMCA.com