1. Write a linked list classes (one class for Node and another class for List), which store the items in the transaction. 2. Test the classes by printing the items in the linked list 3. Show the total price of the transaction. The following listing is the sample output for your reference: BC Items Price 10 Pagoda Gnut 110g 11 Hup Seng Cream Cracker 4.19 12 Yit Poh 2n1 Kopi-o 3.49 7.28 13 Zoelife SN & Seed 5.24 14 Gatsby S/FO Wet&Hard 16.99 15 GB W/G U/Hold 150g 6.49 Total (GST Incl.) 43.68

Question

In a POS system, a transaction is based on items purchased by the customer. The following is an example of a customer transaction receipt, where the prices shown in the receipt are GST inclusive.

1. Write a linked list classes (one class for Node and another class for List), which store the
items in the transaction.
2. Test the classes by printing the items in the linked list
3. Show the total price of the transaction. The following listing is the sample output for
your reference:
BC Items
Price
10 Pagoda Gnut 110g
11 Hup Seng Cream Cracker 4.19
12 Yit Poh 2n1 Kopi-o
3.49
7.28
13 Zoelife SN & Seed
5.24
14 Gatsby S/FO Wet&Hard 16.99
15 GB W/G U/Hold 150g
6.49
Total (GST Incl.)
43.68
Expand
Transcribed Image Text

1. Write a linked list classes (one class for Node and another class for List), which store the items in the transaction. 2. Test the classes by printing the items in the linked list 3. Show the total price of the transaction. The following listing is the sample output for your reference: BC Items Price 10 Pagoda Gnut 110g 11 Hup Seng Cream Cracker 4.19 12 Yit Poh 2n1 Kopi-o 3.49 7.28 13 Zoelife SN & Seed 5.24 14 Gatsby S/FO Wet&Hard 16.99 15 GB W/G U/Hold 150g 6.49 Total (GST Incl.) 43.68

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Programing Language

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Write bash script which takes array as an input of size 10 bind its even indexes to accept even valu...

A: The, script has given below;

Q: Convert the grammar S → aSb bSa a|b into Greibach Normal Form

A: Click to see the answer

Q: Write a program to do the following operations on a Binary Search Tree (BST) considering the inputs ...

A: // Tree traversal in C++ #include <iostream>using namespace std; struct Node {  int data;  str...

Q: Compare between Relational database and NoSQL database.

A: Relational database and NoSQL database NoSQL database is a better option for modern applications. I...

Q: This is the question -  In Chapter 2, you created an application named QuartsToGallonsInteractive th...

A: InputMismatchException occurs when the number entered by the user is of a different data type than t...

Q: ues java and show me the output

A: public class Main{        public static void main (String[] args) {                Triangle t1=new T...

Q: Write bash script which takes array as an input of size 10 bind its even indexes to accept even valu...

A: Actually, array is a collection of elements.

Q: Design an expanding opcode to allow all the following to be encoded in a 32-bit instruction:15 instr...

A: Format 1:

Q: In the array-based stack project uploaded to the BIO system, you are required to create a demo class...

A: The program is written in java

Q: Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Re...

A: /File: ValidateCheckDigits.java import java.io.BufferedWriter; import java.io.File; import java.io.F...

Q: Let B be a Boolean algebra. Show that (a) a ^0 = 0 (b) a V (a A b) = (c) a V (¬a A b) = a V b.

A: Click to see the answer

Q: Write a C program, called msg.c, that reads messages from an input file (or stdin) and verifies whet...

A: Actually, program is a executable software that runs on a computer. 

Q: ). This problem is about linear probing method we discussed in the class. Problem 4, Consider a hash...

A: Hash Function hx=x mod 11 Start with 5. 5 will be placed at index 5 (a). 8 will be placed at index...

Q: Make block diagrams gor 16:1 multiplexers using 8:1 multiplexer and 2:1 multiplexers to design

A: In digital electronics, a multiplexer also called mux receives multiple input signals (both analog o...

Q: What is the significance of empowerment technologies?

A: Empowerment Technology -  Empowerment of technologies ia very important because it make the work of ...

Q: need code in C++ answer all parts Assume the Product structure is declared as follows: struct Produc...

A: I have solved the first 4 parts of the question, please post parts 5 to 7 in a separate post and I w...

Q: (g) get_total_crimes_by_type(adict, 2Dlist) takes a dictionary (crime_dict) and a 2D-list (database)...

A: def get_total_crimes_by_type(adict, 2Dlist):    total_crime = {}    for i in adict:        value = a...

Q: Subject:Database

A: Objective: A relation R (A,B,C,D,E,F,G,H) is given. We need to convert this functional dependency up...

Q: Subject: Java My last 5 digit : 03086

A: Programming instructions:   Include the necessary header file. Create a class. In the class, create...

Q: Convert the following C++ programs into Pep/9 assembly 1) #include Using namespace std; void minimu...

A: //1) Converting the given C++ program into the Assembly language code MEMORY ADDRESS MNEMONICS CO...

Q: The IT director of Global Hills started the meeting today by saying "I've got some good news and som...

A:   Solution 1:  Some of the drawbacks related to device growth are:  By the end of November, which i...

Q: Compiler Construction

A: Actually, compiler is a special program that turns the code into machine language.

Q: discrete math

A: Note : As per the guidelines we are supposed to answer only one question , please repost other quest...

Q: When removing the string "G" form the following skip list, how many references within this skip list...

A: Deletion In skip list means we have to make connection between predecessor and successor of deleted ...

Q: Two elements with identical keys should have the same hash code. Group of answer choices True False ...

A: The, answers has given below:

Q: A string of readings is stored in memory locations starting at XX70H, and the end of the string is i...

A: Algorithm: step 1. Load the BYTE1 in accumulator to register B step 2. Subtract the 50H from the acc...

Q: Create a class called Line with the followings:1. Private members: p1 and p2 as pointer to Point obj...

A: Creating the LINE class according to given specifications. #include <iostream>   #include<m...

Q: A robot is placed at the origin of a 2D coordinate plane (i.e. position (0, 0)). The robot is given ...

A: A coordinate plane is a two-dimensional plane formed by the intersection of a vertical line called y...

Q: Your friend Abiha has just received a computer. A computer carries Ubuntu Linux operating system. Sh...

A: System Software A type of software is the interface between application software and system, is call...

Q: Please answer the question posted and give full explanation of the answer. Please past the successfu...

A: Geometry classpublic static class Geometry {    public static double areaOfCircle(double radius) {  ...

Q: The Internet has fast become a key instrument for the exercise of the right to freedom of speech. In...

A: Freedom of speech is a principle that encourages an individual's or a community's freedom to express...

Q: Q6: (Display patterns using loops) Use nested loops that display the following pattern in three sepa...

A: Pattern A  : Program in  C #include <stdio.h> int main() {    int i, j, rows;    printf("Enter...

Q: The IT director of Global Hills started the meeting today by saying “I’ve got some good news andsome...

A: 1. Some of the constraints associated with the system's growth are:- By the end of November, the fra...

Q: Create a financial application that helps plan for retirement. The user will enter the data of their...

A: program for Flowgorithm is in step 2. please feel free to post any follow-up questions in case of an...

Q: Use Masters theorem to solve each of the following recurrences: (a) T(n) = 9T (n/3) + n. %3D (b) T(n...

A:  

Q: Program In C  Create one function that contains only one for loop to print the passed array of point...

A: #include <stdio.h> //Function declaration void print(char **arrVal, int size); int main() {   ...

Q: Explain the concept of tunneling IPv6 datagrams through IPv4 routers

A: Tunneling mechanism  Tunneling mechanism is the mechanism in which all the routers between two IPv6...

Q: (This if for mindtap on cengage, if not possible, use devc++ 5.11 but mindtap is more accurate) Writ...

A: int smallestIndex(int array[], int size) { int smallest = array[0], index = 0;  for(int i = 0; i &lt...

Q: 12) Write a program to (a) load the accumulator with the value AAH, and (b) compliment the ACC 2100 ...

A: Based on our rule, we should do the first question alone when multiple questions are posted. Please ...

Q: You have to construct a string “cmpmpcmpm” from a blank string. There are two ways to construct a st...

A: Click to see the answer