5 Replies - 1335 Views - Last Post: 06 May 2009 - 09:49 AM

#1 tone10lite   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 05-May 09

Computer Science Program Help

Posted 05 May 2009 - 03:32 PM

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
{

}

Is This A Good Question/Topic? 0
  • +

Replies To: Computer Science Program Help

#2 erik.price   User is offline

  • D.I.C Lover
  • member icon

Reputation: 486
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Computer Science Program Help

Posted 05 May 2009 - 04:49 PM

Please use the code tags. This seems more like a Java topic then a Comp Science topic.


What problems specifically are you having?
Was This Post Helpful? 0
  • +
  • -

#3 tone10lite   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 05-May 09

Re: Computer Science Program Help

Posted 05 May 2009 - 05:07 PM

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.
Was This Post Helpful? 0
  • +
  • -

#4 Ostralis   User is offline

  • #include <greeter>
  • member icon

Reputation: 9
  • View blog
  • Posts: 562
  • Joined: 13-December 08

Re: Computer Science Program Help

Posted 05 May 2009 - 06:28 PM

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:. Like I said, I'll have a look at this later if pbl doesn't get to it.
Was This Post Helpful? 1
  • +
  • -

#5 tone10lite   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 05-May 09

Re: Computer Science Program Help

Posted 05 May 2009 - 09:21 PM

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!
Was This Post Helpful? 0
  • +
  • -

#6 Ostralis   User is offline

  • #include <greeter>
  • member icon

Reputation: 9
  • View blog
  • Posts: 562
  • Joined: 13-December 08

Re: Computer Science Program Help

Posted 06 May 2009 - 09:49 AM

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: [email protected]
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1