CSC113_Lab10 - King Saud University College of Computer and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, February 21, 2011 Lab #10 : Text File IO Book Class 1. Book (t: String, a: String, p: double): Constructor with parameters for title, author and price of the book. 2. Book(b: Book): Copy constructor. 3. setters/getters: Setters and getters for title, author, and price. Bookstore Class 1. Bookstore(n: String, l: String, size: int): Constructor with parameters for name and location for the bookstore, as well as the size of the books array. 2. add(b: Book): add a new book to the bookstore if there is a place and return true. Otherwise, return false. 3. save(filename: String): Save all the information of the bookstore (name, location, and all the books information) to a text file with the name filename which is passed to this method. Note: You can also save any additional information such as array size and/or number of books if you prefer. Book
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/18/2011 for the course COMPUTER S CSC 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Page1 / 2

CSC113_Lab10 - King Saud University College of Computer and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online