School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,419 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,506 people online right now. Registration is fast and FREE... Join Now!




Computer Science Program Help

 

Computer Science Program Help

tone10lite

5 May, 2009 - 02:32 PM
Post #1

New D.I.C Head
*

Joined: 5 May, 2009
Posts: 4

Hi i need help with this program i started earlier and cant figure out. I would greatly appreciate it if someone could help me out. Thanks.

(Original Problem)
Write a project to keep the inventory of books in a book store. Create a book class with the following variables and methods

Title
Price
Pages

getTitle()
setTitle()
setPrice()
getPrice()
setPages()
getPages()

create a subclass ok book called booklet with the following additional method

display properties()

The displayProperties method will print the title, price, and number of pages. Create a GUI to create booklets and display each booklets properties.








/**
* Program designed to keep the inventory of books in a bookstore.
*
* @author
* @version 1.0 Dveloped on May 3, 2009
*/

import java.awt.*;
import javaswing.*;
import java.awt.*;


public class Books
{
Variables
String Title;
private int Price, Pages;


METHODS

private int getTitle(), setTitle(), setPrice(), getPrice(), setPages(), getPages();
{

private void Booklet implements displayProperties()
{


}




private viod createGUI
{

}




User is offlineProfile CardPM
+Quote Post


erik.price

RE: Computer Science Program Help

5 May, 2009 - 03:49 PM
Post #2

Segfault Artist
Group Icon

Joined: 18 Dec, 2008
Posts: 694



Thanked: 23 times
Dream Kudos: 525
My Contributions
Please use the code tags. This seems more like a Java topic then a Comp Science topic.


What problems specifically are you having?
User is offlineProfile CardPM
+Quote Post

tone10lite

RE: Computer Science Program Help

5 May, 2009 - 04:07 PM
Post #3

New D.I.C Head
*

Joined: 5 May, 2009
Posts: 4

Im sorry i thought this was the right area but i need to complete it and im not sure what i have to do to finish. My teacher was the worst and i didnt learn much so im kinda lost.
User is offlineProfile CardPM
+Quote Post

Ostralis

RE: Computer Science Program Help

5 May, 2009 - 05:28 PM
Post #4

D.I.C Regular
Group Icon

Joined: 13 Dec, 2008
Posts: 405



Thanked: 3 times
My Contributions
I'm surprised I found this, but I'll surely help you out mate. Might I suggest the use of ArrayLists? I have some homework to get to, but I'll have a look at this later, it looks pretty simple, and I understand where you're going.

I'd also suggest the use of JFrame and JPanel, which I see you were headed.

For future reference, like Erik said, use code.gif. Like I said, I'll have a look at this later if pbl doesn't get to it.
User is offlineProfile CardPM
+Quote Post

tone10lite

RE: Computer Science Program Help

5 May, 2009 - 08:21 PM
Post #5

New D.I.C Head
*

Joined: 5 May, 2009
Posts: 4

Thank you!!!! Its due tommorow at 11 am so i need to do this asap. I saw you have aim so you can hit me up on tone10lite if you want!
User is offlineProfile CardPM
+Quote Post

Ostralis

RE: Computer Science Program Help

6 May, 2009 - 08:49 AM
Post #6

D.I.C Regular
Group Icon

Joined: 13 Dec, 2008
Posts: 405



Thanked: 3 times
My Contributions
Did you get this fixed? I ended up falling asleep, which I'm really sorry about, wiped out from the APs... If you want I can help you out later today, hit me up at AIM: athmokiwi or MSN: drew@fringefx.net.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 11:50PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month