Discount Get ECET 370 ALL WEEKS Solution ONLY $85.99 $123.95
ECET 370 Lab 1 - an Original and A++ Work !!! [$15.99]
ECET 370 Lab 2 - an Original and A++ Work !!! [$15.99]
ECET 370 Lab 3 - an Original and A++ Work !!! [$19.99]
ECET 370 Lab 4 - an Original and A++ Work !!! [$19.99]
ECET 370 Lab 5 - an Original and A++ Work !!! [$15.99]
ECET 370 Lab 6 - an Original and A++ Work !!! [$15.99]
ECET 370 Lab 7 - an Original and A++ Work !!! [$19.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
ECET370 Lab 2 - ECET 370 Lab 2 - an Original and A++ Work !!!
    ECET370 Lab 2 - ECET 370 Lab 2 - an Original and A++ Work !!! ECET370 Lab 2 - ECET 370 Lab 2 - an Original and A++ Work !!! ECET370 Lab 2 - ECET 370 Lab 2 - an Original and A++ Work !!!

ECET370 Lab 2 - ECET 370 Lab 2 - an Original and A++ Work !!!

$15.99

ECET370 Lab 2

 

iLAB OVERVIEW
Scenario and Summary
The purpose of the lab exercises is to help the student acquire skills in developing programs that require the implementation with linked lists of abstract data types, such as lists and bags.
Deliverables
There are four exercises in this lab, although not all of them will be required for submission. Be sure to read the following instructions carefully.
Exercise 1: No submission is required.
Exercise 2 contains Parts A, B, C, D, E, and F. Keep in mind that the methods developed for each of these parts should be within the same LinkedList class. We have added in Doc Sharing a framework for the LinkedList class with stubs for these methods. Use the framework to complete the exercise.
Create a folder and name it Week 2 Lab. Inside this folder, create the subfolders Ex2, Ex3, and Ex4. Place the solution to each of the three exercises required for submission in the corresponding subfolder. Compress the folder Week 2 Lab using a program like WinZip, and drop the resulting zipped folder into the Dropbox.
Note that Exercises 2, 3, and 4 require software development. Place in the corresponding folders only .java files. Do not submit the .class files or other files or folders that are generated by the IDE.
Required Software
Eclipse
Access the software at https://lab.devry.edu .

iLAB STEPS
Exercise 1: Review of Linked Lists
Back to Top
Create a project using the classes in the Doc Sharing area labeled A Simple LinkedList class. Compile it, run it, and review the code that is given carefully. This code tests the LinkedList class provided in the lecture.
Exercise 2: Implementing a Linked List
Back to Top
Modify the class LinkedList given in the lecture by adding the functions listed below for Exercise 2. In each case, the appropriate error message should be generated if an invalid condition occurs. For example, an error message should be generated when trying to replace the item at a given location in the list and the location is out of range. Create a main class to test your LinkedList class.
a. String toString(): Modify the display method to override the toString method of the object class. This method returns a string representation of the linked list elements.
b. int getLength(): Create this method to return the number of items in the list (accessor method).
c. void clear(): Create this method to remove all of the items from the list. After this operation, the length of the list is zero.
d. void addEnd(int item): Create this method to add the item to the end of the list.
e. void replace(int location, int item): Create this method to replace the item in the list at the position specified by location. The item should be replaced with the item.
f. int get(int location): Create a method that returns the element at location.
In the Doc Sharing document labeled Implementing a LinkedList class, you will find the basic framework of the LinkedList class you need to use to implement your solution.
Exercise 3: Using a Linked List
Back to Top
This exercise is similar to Exercise 3 in Lab 1 but uses the LinkedList class implemented in Exercise 2 above. That is, using the class LinkedList completed in the previous exercise, write a program to store the first 30 Fibonacci numbers in a LinkedList object.
Exercise 4: Implementing a Bag Class
Back to Top
Create a Bag class (multiset) that uses a linked list to store the bag items. The class should have the methods listed below. Create a main class to test your Bag class. This main class should fill a bag of integers with 10 random numbers, each in the interval [0, 15], and print how many times each integer in the interval [0, 15] appears in the bag.
a. Bag(): default constructor that creates an empty bag
b. boolean isEmpty(): determines whether the bag is empty
c. String toString(): returns a string representation of the linked list elements
d. int getLength(): returns the number of items in the bag
e. void clear(): removes all of the items from the bag
f. void add(int item): adds an item to the bag
g. void remove(int item): removes an item from the bag, all occurrences of item in the bag should be removed
h. int count(int item): counts the number of occurrences of item in the bag
(Note that you can reuse the code completed in Exercise 2 for the LinkedList class to create your Bag class. It will help you to save development time.)

Here is compete solution for ECET370 Lab 2

If you have more questions, please contact me via email support@extutorials.com

I will help you any time

Thank you

Attached Files

Move over [ preview ] file name to preview content in it!

  • ECET370_Week2.zip [43.7KB]
    • ECET370_Week2_Exercise2
      • .classpath
        • .project
          • .settings
          • bin
          • src
            • LinkedList.java [4.9KB] [ preview ]
            • Main.java [0.9KB] [ preview ]
            • Node.java [1.1KB] [ preview ]
        • ECET370_Week2_Exercise3
          • .classpath
            • .project
              • .settings
              • bin
              • src
                • LinkedList.java [4.9KB] [ preview ]
                • Main.java [0.4KB] [ preview ]
                • Node.java [1.1KB] [ preview ]
            • ECET370_Week2_Exercise4
              • .classpath
                • .project
                  • .settings
                  • bin
                  • src
                    • Bag.java [2.9KB] [ preview ]
                    • Main.java [0.6KB] [ preview ]
                    • Node.java [1.1KB] [ preview ]

              Write a review

              Your Name:


              Your Review: Note: HTML is not translated!

              Rating: Bad           Good

              Enter the code in the box below:



              PURCHASE SAVE
              2 Tutorials 10%
              3 Tutorials 13%
              4 Tutorials 16%
              5 Tutorials 19%
              6 Tutorials 22%
              7 Tutorials 25%
              8 Tutorials 28%
              9 Tutorials 31%
              10 Tutorials 34%
              add url more

              9MZQASHWN73B