Question: 1.) Please use data structure to show how to add a node to the front of a list using the code Emprec.java (THIS PART IS
1.) Please use data structure to show how to add a node to the front of a list using the code Emprec.java (THIS PART IS MORE ABOUT THE VISUAL ILLUSTRATION OF HOW TO ADD A NODE TO THE FRONT EX: A GRAPH) Now show it working, run Emp_Ex.java
DATA STRUCTURE EXAMPLE (THIS IMAGE IS JUST AN EXAMPLE OF WHAT A DATA STRUCTURE IS SUPPOSED TO LOOK LIKE):

*******************************************************************************************(THIS IS JAVA)*********************************************************************************************************
*****************************************************************************************Java Classes code****************************************************************************************************
Emprec.java
/package file package com.jhaley.pk1; public class Emprec { public String name; public double hours; public double rate; public double calc_gross_pay() { int i; i = 1; return(500.00); } } *********************************************************************************************************************************************************************************************************************
Emp_Ex.java
//import com.jhaley.pk1.*; import com.jhaley.pk1.Emprec; //this class declares and object of type Emprec class Emp_Ex { public static void main(String args[]) { Emprec employee = new Emprec(); double employee_gross_pay; // lets assign values to the employees instance variables employee.name = "Mary Smith"; employee.hours = 40; employee.rate = 15.25; //lets compute the gross salary for this employee employee_gross_pay = (employee.hours * employee.rate); /ow lets print the output for this employee System.out.print(" The gross salary for " + employee.name); System.out.printf(" is %.2f ",employee_gross_pay); System.out.printf(" Calling the method the answer is %.2f ", employee.calc_gross_pay()); }//main }//Emp_Ex
*********************************************************************************************************************************************************************************************************************
ADD A NODE AT FRONT front NULL NULL front end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
