Welcome to Dream.In.Code
Become a Java Expert!

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




help me about linked list plss

 
Reply to this topicStart new topic

help me about linked list plss, how to do a calculation in linked list

Hadry
15 Sep, 2008 - 01:12 PM
Post #1

New D.I.C Head
*

Joined: 15 Sep, 2008
Posts: 7

Linked List

Given the following Invoice and LinkedList ADTs:

CODE

public class Invoice
{
    private int orderID;
    private String custName;
    private String prodName;
    private int prodQuantity;
    private double unitPrice;        

    public Invoice() {…}
    public void setData(int oid, String cn, String pn, int pq
double up) {…}
public int getOrderID() {…}
public String getCustName() {…}
public String getProdName() {…}
public int getProdQuantity(){…}
public double getUnitPrice(){…}
    
}

public class LinkedList
{
    public void insert(Object elem){…}
        //insert elemen into list

    public Object remove(){…}
        //remove elemen from list

    public boolean isEmpty() {…}
        //return true if list is empty    

//definition for other methods
}


Write a Java application to solve the following problems:

a) Input 10 invoices into a linked list. (4 marks)

cool.gif Display the information of invoice that makes the highest payment. The payment is calculated by multiplying progQuality and unitPrice. At the end of the process, the information of all invoices must remain in the original linked list.
(6 marks)

c) Count the number of invoices where the payment is more than RM5000, and also display the information of those invoices.
(4 marks)


guys,can u give me tips on this question...this is just my revision study..

Please post your code like this
code.gif
Edited to add the [ code] tags

This post has been edited by pbl: 15 Sep, 2008 - 03:16 PM
User is offlineProfile CardPM
+Quote Post

pbl
RE: Help Me About Linked List Plss
15 Sep, 2008 - 03:18 PM
Post #2

D.I.C Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 3,574



Thanked: 233 times
Dream Kudos: 75
My Contributions
Are expecting us to fill in the blanks ?

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 05:23PM

Be Social

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

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month