Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is java (data structure) help me, I will upvote you, Thank you! *Given the following Furniture, LinkedList, Queue ADTs. ADT means Abstract Data Type.

image text in transcribed

image text in transcribed

image text in transcribed

this is java (data structure)

help me, I will upvote you, Thank you!

*Given the following Furniture, LinkedList, Queue ADTs.

ADT means Abstract Data Type.

Given the following Furniture, Linkedlist and Quebe ADTS: public class Furniture string Code; // furniture code, e.g: SB002 String manufacturer double price; string payment Mode: 11 cash or Credit Card string design; // Modern or Classic Purniture String , String n, double p.string pay. String a) { public string getFcode- 1/return furniture code public String getManufacturer) (-) 7/return Manufacturer name public double getPrice() {-} //return price public String getMode (3) //return mode payment public string getDes-gai-) //return design type 1/setter methods public string toString() {-) 1 public class LinkedList public Linked:st() {--) public object gatPirat) {-} // return first element public object getNext () {-} //return next element public boolean i sEmpty ) - } // check it stack in empty public void inaortatBack()-} 17 insert element Write a main method to store various types of furniture for ABC Furniture Company. The number of input is entered by user. If the design of the furniture is modern, store the furniture data into a linked list named modernLL. Otherwise, store the furniture data into a linked list named classicLL. Calculate the total price of furniture according to those paid with cash and those paid using credit card. Determine whether the customer prefers to pay by cash or credit card based on the number of payment mode. Then, move all modern furniture with the price of more than RM10000 to a linked list named exclusiveLL. The sample output should be like the following: Total payment by cash : RM35500.00 Total payment by credit card: RM23000.00 Number of payment by cash: 3 Number of payment by credit card: 2 The customer prefer to pay by cash. (12 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions