Question: Create a circular (singly linked list) of ints using the file in HW10. You are to use SINGLY LINKED NODES and NOT the java Linked

Create a circular (singly linked list) of ints using the file in HW10.

You are to use SINGLY LINKED NODES and NOT the java Linked List class.

Pass this list to a method that deletes ever node whose item is an EVEN number.

Print the list. You should have only odd numbers remaining.

HW10:

import java.util.ArrayList; import java.util.List; import java.util.Scanner;

public static void main(String[] args) { //create a list called "list1" that conatains integers Scanner keyboard = new Scanner(System.in); Listlist1 = new ArrayList<>(); int n; System.out.println("Enter input numbers with space between each integer"); System.out.println(""); // add integers to list1 do{ n = keyboard.nextInt(); if(n==0){ break; } list1.add(n); } while (true); //display inputed integers System.out.print(" Inputed list of numbers are: "); for(int i =0; ieven = new ArrayList<>(); Listodd = new ArrayList<>(); //use for loop to determine whether an integer is even or odd for (int i =0; i

Rubric:

* method to create initial CIRCULAR list

* method to print CIRCULAR list

* method to delete even numbers from CIRCULAR LIST. Only HALF credit if you turned it into a list, deleted , and then made it circular again

* Good, modular, well written code

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!