Question: Java// only ise the code I have provided. If it is not the same as I provided it will be wrong. Thank you. Also the



Given the MileagetrackerNode class, complete main0 in the Mileagetracker inkedList class to insert nodes into a linked list (using the insertAfter() method). The first user-input value is the number of nodes in the linked list. Use the printNodeData) method to print the entire linked list. DO NOT print the dummy head node. Ex. if the input is the output is WA ACtivir B.8.1: LAB. Mileage tracker for a runner 0/10 mport java.util. Scanner; public class MileageTrackerLinkedList \{ public static void main (String args) \& Scanner scnr = new Scanner(System.in); // References for MileageTrackerNade objects MileageTrackerNode headNode; MiledgeTrackerNode currNode; MileageTrackerNode LastNode; double miles; String date; int {; 1/ Front of nodes list heodNode - new MileageTrackerNode(); lastNode - headNode: (1. TO00: Scan the number of nodes U/ TOo0: For the scanned number of nodes, scan 1/. In data and insert into the linked list. 1. TODO: Call the printNodeDatoO method Fo print the entire linked list B. Muleage tracker for a runner
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
