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):

1.) Please use data structure to show how to add a node

*******************************************************************************************(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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!