Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java Programming Challenge

julesxdujour
julesxdujour 


Create an application that works like a shopping cart system for a book store. Use the file BookPrices.txt. This file contains the names and prices of various books, formatted in the following fashion: I Did It Your Way, 11.95 The History of Scotland, 14.50 Learn calculus in One Day, 29,95 Feel the Stress, 18.50 Each line in the file contains the name of a book, followed by a comma, followed by the books retail price. When your application begins execution, it should read the contents of the file and store the book titles in a list component. The suer should be able to select a title form the list and add it to a shopping cart, which is simply another list component. The application should have buttons or menu items that allow the user to remove items from the shopping cart, clear the shopping cart of all selections, and check out. When the user checks out, the application should calculate and display the subtotal of all the books in the shopping cart, the sales tax (which is 6 percent of the subtotal), and the total. Attachments Tags Clarifications

Answers

Java BookStore

dickersonka
dickersonka 



Attached is the java bookstore Attachments
BookStore.zip (11 K) Download









Preview
Did It Your Way, 11.95 The

Preview
String getTitle() { return title; } public String getAuthor() { return author; } public double getPrice() { return price; } public void setTitle( String title ) { this.title = title;

Preview
+ tax; DecimalFormat fmt = new DecimalFormat( "$##,##0.00" ); subTotalText.setText( fmt.format( subTotal ) ); taxText.setText( fmt.format( tax ) ); totalText.setText( fmt.format( total ) ); } private class AddButtonListener implements ActionListener { public void actionPerformed( ActionEvent e )

Screenshots
Purchase Answer