Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the first question, use a single list and store the given data using genirec I want this solution like this Please I want from

image text in transcribed

In the first question, use a single list and store the given data using genirec I want this solution like this

image text in transcribed

Please I want from you to read question Carefully apply what you see in front of you

Implement a simple application for Pharmacy. All medicines will be stored in a Single linked list (SLL). Every node in the linked list stores information for medicine as follows. - Medicine ID: string - Medicine name: string - Medicine Company: string - Medicine Price: float The following functionalities should be implemented. 1. Add a medicine 2. Delete medicine by name and ID 3. Update a medicine using the ID 4. Search for a medicine using a given ID 5. Sort the linked list using medicine ID 6. Print all medicines to the screen. public class Node\{ private T data; private Node next; public Node(T data) \{ this.data = data; \} public Node getNext()\{ return next; \} public void setNext(Node node) \{ this.next = node; \} public T getData() \{ return data; \} public String toString() \{ return String.valueOf(data); \} public class LinkedList { private Node head; public LinkedList() \{ this.head = null; \} public Node getHead()\{ return head; \} public void setHead(Node newNode) \{ this.head = newNode; public boolean isEmpty() \{ if(getHead() == null) \{ return true; return false: return false

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

=+3. Describe two types of treatment for PTSD.

Answered: 1 week ago

Question

Describe the job youd like to be doing five years from now.

Answered: 1 week ago

Question

So what disadvantages have you witnessed? (specific)

Answered: 1 week ago