project2/.classpath
project2/.project
project2
linklist
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
project2/bin/project2/emplist.classpackage project2;
publicsynchronizedclass emplist {
public void emplist();
publicstatic void main(String[]) throws java.io.IOException;
}
project2/bin/project2/method1.classpackage project2;
publicsynchronizedclass method1 {
java.util.LinkedList newList;
public void method1();
void reverse(java.util.LinkedList);
void downsize(java.util.LinkedList, int);
}
project2/employees.txt
Ahmed
Bill
Diana
Harry
Juliet
Nina
Romeo
Sam
Tom
Zack
project2/src/project2/emplist.javaproject2/src/project2/emplist.javapackage project2;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.ListIterator;
publicclass emplist {
publicstaticvoid main(String[] args)throwsIOException{
// TODO Auto-generated method stub
LinkedList<String> linkedlist =newLinkedList<String>();
method1 obj =new method1();
System.out.println("\t\t\t********************************************************");
System.out.println("\t\t\t********* This Program was written by ziyad **********");
System.out.println("\t\t\t********************************************************");
try(BufferedReader br =newBufferedReader(newFileReader(
"employees.txt"))){
String sCurrentLine;
while((sCurrentLine = br.readLine())!=null){
// System.out.println(sCurrentLine);
linkedlist.add(sCurrentLine);
// System.out.println(linkedlist);
}
String firstElement = linkedlist.get(0);
String lastElement = linkedlist.getLast();
System.out.println("\tDisplaying List contentusing traditional for loop");
for(int i =0; i < linkedlist.size(); i++){
System.out.println("Name of Emp is "+ linkedlist.get(i));
}
System.out.println("The first element of the List: "+ firstElement);
System.out.println("The last element of the List: "+ lastElement);
System.out.println("The size of the list after removing the last element Zack is: 9");
System.out.println("\tDisplaying using by using enhances for loop: ");
for(int a =0; a < linkedlist.size(); a++){
System.out.println(linkedlist.get(a));
}
ListIterator iter = linkedlist.listIterator();
while(iter.hasNext()){
int i = iter.nextIndex();
iter.next();
// System.out.println(iter.next() + " is at index" + i);
if(i ==0){
System.out.println("The current emplyee after advancing the iter five timers is: "
+ iter.previous());
Object element = iter.next();
iter.add("kelly");
// iter.set( "Kelly");
int k =0;
// while( k < linkedlist.size())
{
System.out.println("\tDisplaying list after inserting Kelly after the fifth position\n"+ linkedlist +" ");
k++;
}
}elseif(i ==6){
System.out.println("\tDisplaying list after setting the current element to Nancy"+ iter.previous());
Object element1 = iter.next();
.
Write a Java Class to Implement a Generic Linked ListYour list mus.pdfrozakashif85
Write a Java Class to Implement a Generic Linked List
Your list must be implemented as a singly-linked list of generic nodes, where each Node object
has two instance variables: an object of the “type variable” class, and a pointer to the next node
on the list.
Your class will contain separate methods to handle each of the operations read from a data file
(see II., below)
Your class will also override toString() to return the objects on the list in the order in which they
occur.
Write a Test Class for Your LinkedList Class
Your main method will read list operation instructions from a data file, until end-of-file and call
the appropriate LinkedList method to execute each one.
After each operation is executed, print out the operation and the updated list.
The data file to be used is on the class web site and the operations are:
APPEND X - Append object X to the end of the list
ADD N X - Insert object X as the new Nth element in the list, increasing the size of the list by 1
E.g. Suppose the list is:
head -> 1 -> 2 -> 3 -> 4->null
After ADD 3 7 it would be:
head -> 1 -> 2 -> 7 -> 3 -> 4->null
DELETE N – Remove the Nth object from the list
SWAP M N - Interchange the positions of the Mth and Nth
objects on the list
For credit, the two nodes must actually \"trade places\" in the list, and not merely swap their data
values
REVERSE - Reverse the order of the objects on the list
This must be done by reversing the order of the nodes themselves, rather than by swapping the
data stored
To get credit for your reverse() method, it must use either one of these 2 algorithms:
For each node on the list except the current “head”
node, delete the node and insert it as the new head
Use your swap() method
6. CLEAR – Clear the list (make it empty)
No credit will be given for programs that use any additional data structures – either from the Java
API or programmer defined -, other than your own LinkedList class
txt file:
Solution
//Java Program to Implement Singly Linked List
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/* Class Node */
class Nodes
{
protected Object data;
protected Nodes next;
/* Constructor */
public Nodes()
{
next = null;
data = null;
}
/* Constructor */
public Nodes(Object d,Nodes n)
{
data = d;
next = n;
}
/* Function to set link to next Node */
public void setLink(Nodes n)
{
next = n;
}
/* Function to set data to current Node */
public void setData(Object d)
{
data = d;
}
/* Function to get link to next node */
public Nodes getLink()
{
return next;
}
/* Function to get data from current Node */
public Object getData()
{
return data;
}
}
/* Class linkedList */
class linkList
{
protected Nodes start;
protected Nodes end ;
public int size ;
/* Constructor */
public linkList()
{
start = null;
end = null;
size = 0;
}
/* Function to check if list is empty */
public boolean isEmpty()
{
return start == null;
}
/* Function to get size of list */
public int getSize()
{
return .
Introduction and BackgroundIn recent lectures we discussed usi.pdfarpitaeron555
Introduction and Background
In recent lectures we discussed using arrays, classes and interfaces (see newly added course
notes if you want to read ahead about interfaces – we will cover them this week in lecture). In
this lab you will utilize all of these topics to build a simple yet useful new class. Consider the
following interface describing the methods for a simple double ended queue (or deque):
public interface SimpleDeque
{
public void addFront(Object X); // Add Object X at front of list
public void addRear(Object X); // Add Object X at rear of list
// If array is full, add methods should do nothing
public Object removeFront(); // Remove and return Object X from
// front of list
public Object removeRear(); // Remove and return Object X from
// rear of list
// If array is empty, remove methods should return null
public boolean isEmpty(); // Return true if the list is empty
// Return false otherwise
}
A queue has the behavior such that items are added at the rear and removed from the front,
thereby giving a First In First Out (FIFO) access to the items added and subsequently removed
from the list. No other manipulations of the data are permitted (for example, we cannot add or
remove anywhere in the middle). Looking at it \"in reverse\", we could add new items at the
front of the queue and remove them from the rear. This is still providing FIFO access, but just
from a different point of view. Now consider both adding and removing items at the rear of the
list (without ever accessing the front). This is called stack access and gives us Last In First Out
(LIFO) access to the items (the data is removed in reverse order). The same behavior occurs if
we both add and remove at the front without ever accessing the rear of the list.
The simple deque above is expressed as an interface rather than a class, because we are not
describing the data or how it is represented -- we are simply describing its access behavior.
However, to actually build a working deque, we need a class that implements the interface
above. For example:
public class MyDeque implements SimpleDeque
{
Object [] theData;
int numItems;
public MyDeque(int maxItems)
{
theData = new Object[maxItems];
numItems = 0;
}
// Implementation of the five methods of SimpleDeque, plus
// perhaps other methods as well
}
Note that the implementation above uses an array of Object to store the items in the deque. Since
Object is the base class to all other Java classes, an array of Object can thus be used to store any
Java class types (we can even store primitive values if we utilize their wrapper classes). Also
note that nothing in the SimpleDeque interface requires an array to be used to store the data. You
will see in your CS 0445 course that a linked list may in fact be a better implementation than an
array in this case. However, for this implementation we will use an array because it is simple and
easy to understand.
Another important thing to notice about the partial implementation above is tha.
In java , I want you to implement a Data Structure known as a Doubly.pdfaromalcom
In java , I want you to implement a Data Structure known as a Doubly-Ended-Queue. it is a
“fair” data structure in that it implements a FIFO (First In First Out ) behavior. As such, it is
often used to implement various wait lists in computer systems. For example, jobs waiting to use
the CPU, jobs waiting for a printer, jobs waiting to be placed into RAM for execution. In short,
whenever we want a fair strategy for waiting we use queues.
A DEQUE (Doubly-ended-queue) is a related data structure. Although similar to a Queue, it
differs in that it allows for insertions AND deletions from either end of the list (both the front
and the rear).
Your implementation MUST use a doubly-linked-list implementation. You may not use a static
array implementation.
Thus, a Deque is a List but it is one which only concerns itself with the first and last positions for
any insertion or deletion. The 6 operations supported are :
public void insertFront( int item ) - insert the given item (as a node) into the first position of the
Deque.
public void insertRear( int item ) - insert the given item (as a node) into the last position of the
Deque.
public int deleteFront( ) - delete and return the element stored in the first node of the Deque.
public int deletRear( ) – delete and return the element stored in the last node of the Deque.
public boolean isempty( ) - returns true if the Deque is currently empty or false if it is not.
public void printDeque( ) - print the integers from the list, one per line, from the first element
through to the last in order.
Classes
Your program must implement the following 3 classes. public class dequeDriver
This class will contain your program’s main method. It will need to declare a deque object and
process input as indicated below.
Your program should prompt the user for the path of an input file. It should open the file for
input and process it line by line. Each line of the input file will have one of the following forms.
PR
IF
IR
DF
DR
The meanings of each input is as follows:
PR - print the current contents of the deque from front to rear using the printDeque( ) method of
the deque object.
IF - insert the given int value into the front of the deque.
IR - insert the given int value into the rear of the deque.
DF - delete the front value from the deque.
DR – delete the rear element of the deque.
Below is an example input file that your program should be able to process.
PR
IF 4
IF 5
IF 6
IR 7
PR
DR
PR
DF
PR
The output for the input file shown above is :
EMPTY DEQUE
----- Front -----
6
5
4
7
----- Rear -----
----- Front -----
6
5
4
----- Rear -----
----- Front -----
5
4
----- Rear -----
public class dequeNode
This class will implement the linked nodes that will be used to implement the deque itself.
It should have the following protected data members.
protected dequeNode next; // next pointer to next node
protected dequeNode prev; // previous pointer to previous node
protected int val; // the integer value stored within the dequeNod.
CSC240: Programming Assignment #9: Stacks & Queues Assigned: Week 12 Due: Week 13
Points: 50 In this program, you will utilize objects of your class used in previous programs, and
create a program to store 10 objects each into a Stack and into a Queue. You can load the 10
data objects through any combination of user input, hard code the data records/initialization, or
read from a file. The preferred method is by reading from a file since it doesnt require any data
entry or data in code. Coding Requirements: 1. Create your application class, and your container
classes which will encapsulate the both a StackOfObjects and an QueueOfObjects. 2. Read the
file (or create data objects using another method) into a 10-element array of objects, which you
can encapsulate into a separate class. 3. Load the same data set into both the stack and the
queue from the array of objects. 4. In main(), create and invoke a short menu with items to perform
data entry/read from file, and to enable the user to test both the stack and queue functionality by
printing a report of the data. Since a stack is LIFO (Last In First Out) and a queue is FIFO (First In
First Out), the stack data should print in reverse order to which it was inserted, and the queue data
should print in the order to which it was inserted. Menu Items 1. List Original Data (in Array of
Objects) 2. Report of Stack of Data 3. Report of Queue of Data 4. End Program Output
Requirements: (Exercise all methods, including constructors to show their results/output) In your
main() method, exercise all menu items using the methods invoked by each menu item, running all
menu items, showing the initial list, then displaying it by popping objects off of the top of stack, or
de- queueing objects out of the queue. The report of the objects in your array will be columnar,
showing each of the values, formatting the columns and adding headers and footers as needed.
Assigned: Week 12 Due: Week 13 Points: 50 In this program, you will utilize objects of your class
used in previous programs, and create a program to store 10 objects each into a Stack and into a
Queue. You can load the 10 data objects through any combination of user input, hard code the
data records/initialization, or read from a file. The preferred method is by reading from a file since
it doesn't require any data entry or data in code. Coding Requirements: 1. Create your application
class, and your "container" classes which will encapsulate the both a StackOfObjects and an
QueueOfObjects. 2. Read the file (or create data objects using another method) into a 10-element
array of objects, which you can encapsulate into a separate class. 3. Load the same data set into
both the stack and the queue from the array of objects. 4. In main(), create and invoke a short
menu with items to perform data entry/read from file, and to enable the user to test both the stack
and queue functionality by printing a report of the data. Since a stack is LIFO (Last In First Out).
Taming Core Data by Arek Holko, MacoscopeMacoscope
Core Data is a framework that you use to manage the model layer objects in your application. A framework that you use to build the persistence layer in your application.
Write a Java Class to Implement a Generic Linked ListYour list mus.pdfrozakashif85
Write a Java Class to Implement a Generic Linked List
Your list must be implemented as a singly-linked list of generic nodes, where each Node object
has two instance variables: an object of the “type variable” class, and a pointer to the next node
on the list.
Your class will contain separate methods to handle each of the operations read from a data file
(see II., below)
Your class will also override toString() to return the objects on the list in the order in which they
occur.
Write a Test Class for Your LinkedList Class
Your main method will read list operation instructions from a data file, until end-of-file and call
the appropriate LinkedList method to execute each one.
After each operation is executed, print out the operation and the updated list.
The data file to be used is on the class web site and the operations are:
APPEND X - Append object X to the end of the list
ADD N X - Insert object X as the new Nth element in the list, increasing the size of the list by 1
E.g. Suppose the list is:
head -> 1 -> 2 -> 3 -> 4->null
After ADD 3 7 it would be:
head -> 1 -> 2 -> 7 -> 3 -> 4->null
DELETE N – Remove the Nth object from the list
SWAP M N - Interchange the positions of the Mth and Nth
objects on the list
For credit, the two nodes must actually \"trade places\" in the list, and not merely swap their data
values
REVERSE - Reverse the order of the objects on the list
This must be done by reversing the order of the nodes themselves, rather than by swapping the
data stored
To get credit for your reverse() method, it must use either one of these 2 algorithms:
For each node on the list except the current “head”
node, delete the node and insert it as the new head
Use your swap() method
6. CLEAR – Clear the list (make it empty)
No credit will be given for programs that use any additional data structures – either from the Java
API or programmer defined -, other than your own LinkedList class
txt file:
Solution
//Java Program to Implement Singly Linked List
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/* Class Node */
class Nodes
{
protected Object data;
protected Nodes next;
/* Constructor */
public Nodes()
{
next = null;
data = null;
}
/* Constructor */
public Nodes(Object d,Nodes n)
{
data = d;
next = n;
}
/* Function to set link to next Node */
public void setLink(Nodes n)
{
next = n;
}
/* Function to set data to current Node */
public void setData(Object d)
{
data = d;
}
/* Function to get link to next node */
public Nodes getLink()
{
return next;
}
/* Function to get data from current Node */
public Object getData()
{
return data;
}
}
/* Class linkedList */
class linkList
{
protected Nodes start;
protected Nodes end ;
public int size ;
/* Constructor */
public linkList()
{
start = null;
end = null;
size = 0;
}
/* Function to check if list is empty */
public boolean isEmpty()
{
return start == null;
}
/* Function to get size of list */
public int getSize()
{
return .
Introduction and BackgroundIn recent lectures we discussed usi.pdfarpitaeron555
Introduction and Background
In recent lectures we discussed using arrays, classes and interfaces (see newly added course
notes if you want to read ahead about interfaces – we will cover them this week in lecture). In
this lab you will utilize all of these topics to build a simple yet useful new class. Consider the
following interface describing the methods for a simple double ended queue (or deque):
public interface SimpleDeque
{
public void addFront(Object X); // Add Object X at front of list
public void addRear(Object X); // Add Object X at rear of list
// If array is full, add methods should do nothing
public Object removeFront(); // Remove and return Object X from
// front of list
public Object removeRear(); // Remove and return Object X from
// rear of list
// If array is empty, remove methods should return null
public boolean isEmpty(); // Return true if the list is empty
// Return false otherwise
}
A queue has the behavior such that items are added at the rear and removed from the front,
thereby giving a First In First Out (FIFO) access to the items added and subsequently removed
from the list. No other manipulations of the data are permitted (for example, we cannot add or
remove anywhere in the middle). Looking at it \"in reverse\", we could add new items at the
front of the queue and remove them from the rear. This is still providing FIFO access, but just
from a different point of view. Now consider both adding and removing items at the rear of the
list (without ever accessing the front). This is called stack access and gives us Last In First Out
(LIFO) access to the items (the data is removed in reverse order). The same behavior occurs if
we both add and remove at the front without ever accessing the rear of the list.
The simple deque above is expressed as an interface rather than a class, because we are not
describing the data or how it is represented -- we are simply describing its access behavior.
However, to actually build a working deque, we need a class that implements the interface
above. For example:
public class MyDeque implements SimpleDeque
{
Object [] theData;
int numItems;
public MyDeque(int maxItems)
{
theData = new Object[maxItems];
numItems = 0;
}
// Implementation of the five methods of SimpleDeque, plus
// perhaps other methods as well
}
Note that the implementation above uses an array of Object to store the items in the deque. Since
Object is the base class to all other Java classes, an array of Object can thus be used to store any
Java class types (we can even store primitive values if we utilize their wrapper classes). Also
note that nothing in the SimpleDeque interface requires an array to be used to store the data. You
will see in your CS 0445 course that a linked list may in fact be a better implementation than an
array in this case. However, for this implementation we will use an array because it is simple and
easy to understand.
Another important thing to notice about the partial implementation above is tha.
In java , I want you to implement a Data Structure known as a Doubly.pdfaromalcom
In java , I want you to implement a Data Structure known as a Doubly-Ended-Queue. it is a
“fair” data structure in that it implements a FIFO (First In First Out ) behavior. As such, it is
often used to implement various wait lists in computer systems. For example, jobs waiting to use
the CPU, jobs waiting for a printer, jobs waiting to be placed into RAM for execution. In short,
whenever we want a fair strategy for waiting we use queues.
A DEQUE (Doubly-ended-queue) is a related data structure. Although similar to a Queue, it
differs in that it allows for insertions AND deletions from either end of the list (both the front
and the rear).
Your implementation MUST use a doubly-linked-list implementation. You may not use a static
array implementation.
Thus, a Deque is a List but it is one which only concerns itself with the first and last positions for
any insertion or deletion. The 6 operations supported are :
public void insertFront( int item ) - insert the given item (as a node) into the first position of the
Deque.
public void insertRear( int item ) - insert the given item (as a node) into the last position of the
Deque.
public int deleteFront( ) - delete and return the element stored in the first node of the Deque.
public int deletRear( ) – delete and return the element stored in the last node of the Deque.
public boolean isempty( ) - returns true if the Deque is currently empty or false if it is not.
public void printDeque( ) - print the integers from the list, one per line, from the first element
through to the last in order.
Classes
Your program must implement the following 3 classes. public class dequeDriver
This class will contain your program’s main method. It will need to declare a deque object and
process input as indicated below.
Your program should prompt the user for the path of an input file. It should open the file for
input and process it line by line. Each line of the input file will have one of the following forms.
PR
IF
IR
DF
DR
The meanings of each input is as follows:
PR - print the current contents of the deque from front to rear using the printDeque( ) method of
the deque object.
IF - insert the given int value into the front of the deque.
IR - insert the given int value into the rear of the deque.
DF - delete the front value from the deque.
DR – delete the rear element of the deque.
Below is an example input file that your program should be able to process.
PR
IF 4
IF 5
IF 6
IR 7
PR
DR
PR
DF
PR
The output for the input file shown above is :
EMPTY DEQUE
----- Front -----
6
5
4
7
----- Rear -----
----- Front -----
6
5
4
----- Rear -----
----- Front -----
5
4
----- Rear -----
public class dequeNode
This class will implement the linked nodes that will be used to implement the deque itself.
It should have the following protected data members.
protected dequeNode next; // next pointer to next node
protected dequeNode prev; // previous pointer to previous node
protected int val; // the integer value stored within the dequeNod.
CSC240: Programming Assignment #9: Stacks & Queues Assigned: Week 12 Due: Week 13
Points: 50 In this program, you will utilize objects of your class used in previous programs, and
create a program to store 10 objects each into a Stack and into a Queue. You can load the 10
data objects through any combination of user input, hard code the data records/initialization, or
read from a file. The preferred method is by reading from a file since it doesnt require any data
entry or data in code. Coding Requirements: 1. Create your application class, and your container
classes which will encapsulate the both a StackOfObjects and an QueueOfObjects. 2. Read the
file (or create data objects using another method) into a 10-element array of objects, which you
can encapsulate into a separate class. 3. Load the same data set into both the stack and the
queue from the array of objects. 4. In main(), create and invoke a short menu with items to perform
data entry/read from file, and to enable the user to test both the stack and queue functionality by
printing a report of the data. Since a stack is LIFO (Last In First Out) and a queue is FIFO (First In
First Out), the stack data should print in reverse order to which it was inserted, and the queue data
should print in the order to which it was inserted. Menu Items 1. List Original Data (in Array of
Objects) 2. Report of Stack of Data 3. Report of Queue of Data 4. End Program Output
Requirements: (Exercise all methods, including constructors to show their results/output) In your
main() method, exercise all menu items using the methods invoked by each menu item, running all
menu items, showing the initial list, then displaying it by popping objects off of the top of stack, or
de- queueing objects out of the queue. The report of the objects in your array will be columnar,
showing each of the values, formatting the columns and adding headers and footers as needed.
Assigned: Week 12 Due: Week 13 Points: 50 In this program, you will utilize objects of your class
used in previous programs, and create a program to store 10 objects each into a Stack and into a
Queue. You can load the 10 data objects through any combination of user input, hard code the
data records/initialization, or read from a file. The preferred method is by reading from a file since
it doesn't require any data entry or data in code. Coding Requirements: 1. Create your application
class, and your "container" classes which will encapsulate the both a StackOfObjects and an
QueueOfObjects. 2. Read the file (or create data objects using another method) into a 10-element
array of objects, which you can encapsulate into a separate class. 3. Load the same data set into
both the stack and the queue from the array of objects. 4. In main(), create and invoke a short
menu with items to perform data entry/read from file, and to enable the user to test both the stack
and queue functionality by printing a report of the data. Since a stack is LIFO (Last In First Out).
Taming Core Data by Arek Holko, MacoscopeMacoscope
Core Data is a framework that you use to manage the model layer objects in your application. A framework that you use to build the persistence layer in your application.
For more classes visit
www.snaptutorial.com
General Instructions
Exercises 1, 2, 4, and 5 use the programs in DocSharinglabeled “User-defined classes."
Exercises 7 and 8 use the programs in DocSharinglabeled “Using interfaces."
Storing data is a basic and very common need in mobile apps. The Android application framework provides several storage options, one of which is SQLite databases.
In this tutorial you will see a simple Android database example. The example is based on the Android ListView Tutorial and the Android AsyncTask Tutorial, however these tutorials are not mandatory for the purpose of understanding the principles of proper Android database usage.
vision academy advance java note.
describe all points in the notes with example. This is not a class that focuses on theory. Participants will find the course is loaded with practical . After taking this class, developers will be able to build Web applications that perform well, are scalable, and that are easier to maintain.The course builds a strong understanding of JDBC Technology. It gives in to demonstrate why Servlets are the cornerstone of Java’s Web platform. It then shows how JSP is built on the Servlet architecture. Additionally, the class shows students how to use JSTL, custom tags and expression language to reduce Java code in Web pages while adding tremendous power and capability to those pages. The class culminates in an exploration of Java MVC frameworks like Struts at a high level.
You have collected the following documents (unstructured) and pl.docxbriancrawford30935
You have collected the following documents (unstructured) and plan to apply an index technique to convert them into an inverted index.
Doc 1?Information retrieval is the activity of obtaining information resources relevant to an information need from a collection of information resources. Searches can be based on full-text or other content-based indexing.
Doc 2?Information retrieval is finding material of an unstructured nature that satisfies an information need from within large collections.
Doc 3?Information systems is the study of complementary networks of hardware and software that people and organizations use to collect, filter, process, create, and distribute data.
In the process of creating the inverted index, please complete the following steps:
Remove all stop words and punctuation, and then apply Porter’s stemming algorithm to the documents. Thelist of stop words for this task is provided as follows:
Is, The, Of, To, An, A, From, Can, Be, On, Or, That, Within, And, Use
Create a merged inverted list including the within-document frequencies for each term.
Use the index created in part (b) to create a dictionary and the related posting file.
You may like to test the inverted index by using the following keywords:information, system, index
.
You have been working as a technology associate the information .docxbriancrawford30935
You have been working as a technology associate the information systems department at Corporation Techs for a while now. You have discovered so far that all of Corporation Techs’ computer systems share the same Class C public IP address range, including workstations along with servers providing authentication, e-mail, and both secure and public Web sites.
Your next task in this project is to construct a basic network design. An important requirement for the network design is to reduce the number of public addresses needed as the subnet lease results in very high ISP costs.
Tasks
Construct a basic network design, separating private and public services within the Corporation Techs’ network. To do so, you must:
Access the PCAP files using NetWitness Investigator, and browse the Nmap scan (XML format), topology fisheye chart (PDF format), and Nessus report (HTML format).
Identify vulnerabilities and clear-text information transfer.
Conduct research and determine the best network design to ensure security of internal access while retaining public Web site availability.
Identify any opportunities for reduced ISP costs through port redirection or address translation.
Design a network configuration, identifying network gateways, port or address redirection systems, and the location of hosts within private and protected network segments.
Create a professional report detailing the information above as supportive documentation for the network security plan.
Create a report that includes a basic network diagram and research results.
.
More Related Content
Similar to project2.classpathproject2.project project2 .docx
For more classes visit
www.snaptutorial.com
General Instructions
Exercises 1, 2, 4, and 5 use the programs in DocSharinglabeled “User-defined classes."
Exercises 7 and 8 use the programs in DocSharinglabeled “Using interfaces."
Storing data is a basic and very common need in mobile apps. The Android application framework provides several storage options, one of which is SQLite databases.
In this tutorial you will see a simple Android database example. The example is based on the Android ListView Tutorial and the Android AsyncTask Tutorial, however these tutorials are not mandatory for the purpose of understanding the principles of proper Android database usage.
vision academy advance java note.
describe all points in the notes with example. This is not a class that focuses on theory. Participants will find the course is loaded with practical . After taking this class, developers will be able to build Web applications that perform well, are scalable, and that are easier to maintain.The course builds a strong understanding of JDBC Technology. It gives in to demonstrate why Servlets are the cornerstone of Java’s Web platform. It then shows how JSP is built on the Servlet architecture. Additionally, the class shows students how to use JSTL, custom tags and expression language to reduce Java code in Web pages while adding tremendous power and capability to those pages. The class culminates in an exploration of Java MVC frameworks like Struts at a high level.
You have collected the following documents (unstructured) and pl.docxbriancrawford30935
You have collected the following documents (unstructured) and plan to apply an index technique to convert them into an inverted index.
Doc 1?Information retrieval is the activity of obtaining information resources relevant to an information need from a collection of information resources. Searches can be based on full-text or other content-based indexing.
Doc 2?Information retrieval is finding material of an unstructured nature that satisfies an information need from within large collections.
Doc 3?Information systems is the study of complementary networks of hardware and software that people and organizations use to collect, filter, process, create, and distribute data.
In the process of creating the inverted index, please complete the following steps:
Remove all stop words and punctuation, and then apply Porter’s stemming algorithm to the documents. Thelist of stop words for this task is provided as follows:
Is, The, Of, To, An, A, From, Can, Be, On, Or, That, Within, And, Use
Create a merged inverted list including the within-document frequencies for each term.
Use the index created in part (b) to create a dictionary and the related posting file.
You may like to test the inverted index by using the following keywords:information, system, index
.
You have been working as a technology associate the information .docxbriancrawford30935
You have been working as a technology associate the information systems department at Corporation Techs for a while now. You have discovered so far that all of Corporation Techs’ computer systems share the same Class C public IP address range, including workstations along with servers providing authentication, e-mail, and both secure and public Web sites.
Your next task in this project is to construct a basic network design. An important requirement for the network design is to reduce the number of public addresses needed as the subnet lease results in very high ISP costs.
Tasks
Construct a basic network design, separating private and public services within the Corporation Techs’ network. To do so, you must:
Access the PCAP files using NetWitness Investigator, and browse the Nmap scan (XML format), topology fisheye chart (PDF format), and Nessus report (HTML format).
Identify vulnerabilities and clear-text information transfer.
Conduct research and determine the best network design to ensure security of internal access while retaining public Web site availability.
Identify any opportunities for reduced ISP costs through port redirection or address translation.
Design a network configuration, identifying network gateways, port or address redirection systems, and the location of hosts within private and protected network segments.
Create a professional report detailing the information above as supportive documentation for the network security plan.
Create a report that includes a basic network diagram and research results.
.
You have chosen to join WHO. They are particularly interested in.docxbriancrawford30935
You have chosen to join WHO. They are particularly interested in your microbiology skills since there have been many outbreaks of disease around the world. Now that you have reviewed your microbiology, you have been notified that you will be sent to one of two areas, West Africa, or the Middle East. In preparation, the Peace Corp would like you to choose one of these areas and complete a plan to deal with outbreaks or potential outbreaks in the area.
Choose an outbreak from those below to investigate.
Ebola or Middle East respiratory syndrome coronavirus (MERS-CoV)
Locate resources that will provide information about the infection, causing microbe, mode of infection, mode of spread, group or groups specifically susceptible, where outbreak occurred and when, clinical evaluation and diagnosis, infection control.
Find first person reports such as interviews or personal reports or journals on the outbreak. If you need help work with the librarian.
Design and submit an outline of the information you have uncovered. You will use this information to complete the project.
The outline should contain information and cited resources for:
Name of the disease chosen
Causing microbe
Mode of infection
Mode of spread
Group or groups specifically susceptible
Where outbreak occurred and when
Clinical evaluation and diagnosis
Infection control.
.
You have been tasked to present at a town hall meeting in your local.docxbriancrawford30935
You have been tasked to present at a town hall meeting in your local town or city to present the details about a new local policy that is being proposed. The presentation will need to define the problem, proposed solutions, risks, challenges, and funding opportunities/challenges. Topics may include local government changes to communities (for example, transportation, commercial enterprise effects on nearby townships, affordable housing construction, environmental effects of new/old business operations, addressing homelessness support, and others).
Using the
Policy Identification and Analysis Assignment Template [PPTX],
develop an 8–10 slide presentation in which you:
Analyze and define the problem to include possible political conflicts.
Identify risks and challenges.
Identify and construct policy alternatives and solutions.
Identify stakeholders and key roles.
Identify funding opportunities, challenges, and budget cost factors, to include saving measures.
Select supportive and evaluative criteria.
Identify incentives, subsidies, and potential benefits.
Draw conclusions in a thorough summary, including lessons learned.
Use the Internet or Strayer databases at the
Strayer Library
to locate at least three quality resources in this assignment.
Note
: Wikipedia and similar websites do not qualify as quality resources.
Use the
Policy Identification and Analysis Assignment Template [PPTX]
.
.
You have been tasked as the health care administrator of a major hos.docxbriancrawford30935
You have been tasked as the health care administrator of a major hospital to create a financial plan for your organization. What would you include in your financial plan? Compare an operating budget versus a capital budget? Include examples of each budget in a hypothetical department or unit of a hospital. Cite and reference your resources.
.
You have been tasked to devise a program to address the needs of.docxbriancrawford30935
You have been tasked to devise a program to address the needs of crime victims. To better understand what type of program to devise, you need to review some crime data. The crime data will help you to identify the various types of crimes being committed and how the various types of crime victims are impacted by their offenders. Select a source that compiles crime data. Describe why you selected that particular source and what type of data that source contains. Secondly, describe the basic goals of your proposed program and what types of services the program would provide to crime victims based on the various types of crimes. For example, what would be a program goal for a rape victim, and what type of program(s) or service(s) would be devised to address the victim’s needs (this could include gender, age, and group counseling sessions).
Assignment Guidelines
Select a source that compiles crime data.
Address the following in 750–1,000 words:
Why did you select that particular source? Explain in detail.
What type of data does that source contain? Describe in detail.
What are the basic goals of your proposed program? Explain in detail.
What types of services would the program provide to crime victims with regard to the various types of crime? Explain in detail.
Be sure to reference all sources using APA style.
.
You have been successful in your application for the position be.docxbriancrawford30935
You have been successful in your application for the position below and are invited to interview – time and date to be arranged.
Job Title: Social Care Worker – Residential services Panel
The social care worker will…
· work with children / young people, families and / or significant others, Social Work teams, other healthcare providers and agencies, schools, training agencies and community groups.
· care for, protect, and support vulnerable or dependent clients, individually or in groups, in conjunction with the wider multidisciplinary team and other relevant agencies. S/he will ensure the welfare of those under his / her care and will act as an advocate as appropriate.
· contribute to the planning and evaluation of individualised and group programmes of care, which are based on needs, identified in consultation with the client and others and delivered through day-to-day shared life experiences.
· work as part of a team to provide a safe, caring environment for resident clients/ children / young people with the primary aim of providing the intervention necessary to address the issues that are preventing them from fulfilling their outcomes.
· treat clients/ children/ young people and their families with dignity and respect, promoting a culture of unconditional positive regard at all times.
· recognise clients/ children / young people as expert through experience, promoting their participation in care planning, placement planning, decision-making and service delivery.
· contribute to the promotion of good links with neighbours, local community resources, i.e. schools, employment schemes and clubs, local Gardai and any other appropriate service.
· engage in reflective and evidence based practice
. That guideline to use to answer this question 1 to 3
1. Creative practice, reflective practice and team skills
It is important that the Social Care Worker can work independently as well as part of a wider healthcare team, building and maintaining relationships and understanding and valuing individuals and their respective professional roles. S/he should be able to identify the limits of their practice and know when to seek advice and additional expertise or refer to another professional. S/he should be able to give and receive feedback and to input their learning into their practice.
In the space below, please give an example of a situation where you were responsible for an individual piece of work with a service user/group of service users and which demonstrates your ability in the above areas
2
.
Flexibility, resilience and ability to deal with challenges.
An effective Social Care Worker demonstrates a commitment to providing a quality service. S/he is innovative and open to change in striving to ensure high standards in service delivery. Challenges can arise in many ways in the course of Social Care practice and an ability to manage adversity when it arises is an important professional skill.
In the space below, please give an.
You have been hired as a project management consultant by compan.docxbriancrawford30935
You have been hired as a project management consultant by company XYZ to review the status of a CRM (Customer Relationship Management) implementation by their internal project manager. Project Manager has spent allot of time with stakeholders on request for additional features being added to the project, resulting in 7 CRs (total potential project impact of $400,000). You are to review and assess the available current data on the project and provide specific recommendations and prioritized next steps to the executive committee.
Start Date: March 2021
Planned Finish Date: September 2021
Current Phase: Implementation
Overall Percent Complete: 40%
Overall Approved budget: $1,000,000
Actual Cost to date: $650,000
Number of Change Requests submitted by stakeholders: 7
CPI = 0.45
SPI = 0.65
EV = $400,000
.
You have been hired to manage a particular aspect of the new ad.docxbriancrawford30935
You have been hired to manage a particular aspect of the new adult addictions center. It is your job to write a proposal to bring to the next board meeting so that funds can be allocated to initiate your plans. This is the brainstorming stage of the planning. Your proposal will need to be scrutinized by the board before it approves it. It is important to be as specific and detailed as possible to justify the needs of your department before going forward. It is also important to be realistic, but at the same time expand your ideas, goals, and aspirations into doable actions because this board wants you to think outside of the box.
MY ASSIGNED ROLE IS COMMUNITY RESOURCES
Community referrals and other needs (e.g., working with the justice system, local businesses, and nonprofit organizations)
Write a 900–1,200 word paper that addresses the following:
What is the department’s role within the organization, and what are its responsibilities?
What are the client needs or services that are addressed by this department?
What individuals and resources are needed to provide those services?
**** Paper must include ****
Abstract
Introduction
Conclusion
References for all of the sections, in APA style
.
You have been hired by Red Didgeridoo Technologies. They know th.docxbriancrawford30935
You have been hired by Red Didgeridoo Technologies. They know that they need to have network storage technologies, but their IT is a little lost. They want to have a scalable infrastructure to be able to expand and shrink the servers in their infrastructure when needed. In order to do this, they have purchased a license for VMware vSphere 6 Enterprise Plus.
NOTE:There must be at least 1 to 2 paragraphs per question.
1. Find and describe 2 distinct uses for a File Sharing Server which uses the sharing protocol named NFS (at least one of these must be a use specifically involving VMware vSphere 6 Enterprise Plus). List the advantages of using these implementations instead of using SMB or CIFS.
2. Find and describe 2 distinct uses (at least one of these must be a use which specifically involve VMware vSphere 6 Enterprise Plus) for iSCSI technology.
.
You have been hired by TMI to design an application using shell scri.docxbriancrawford30935
You have been hired by TMI to design an application using shell script programs. TMI
Case
Projects
needs you to design and create a new directory structure.
The company has several departments: accounting, sales, manufacturing, information tech-
nology, and headquarters. The accounting department has accounts receivable, accounts
payable, and payroll functions within it. The manufacturing department runs three shifts
and a weekend shift.The information technology department has five projects in progress.
The sales department has offices located in the West, East, North, and South.
First, design the Linux file system hierarchy on paper. Keep in mind that the depart-
ments, functions, shifts, regions, and projects need to translate into directories. Next, you
need to create this hierarchy on the Linux system. Create at least one empty file in each
directory. Use the department, function, shift, region, or project name as the filename
and include an extension of .dat.
.
You have been hired to evaluate the volcanic hazards associated .docxbriancrawford30935
You have been hired to evaluate the volcanic hazards associated with a dormant volcano. The volcano has no historically recorded eruptions, but is showing signs of stirring to life. Assuming that future volcanic activity would be similar to the prehistoric eruptions, what information would you seek out in the field as a part of your evaluation, and why would you collect this information?
.
You have been hired as an assistant to the public health officer for.docxbriancrawford30935
You have been hired as an assistant to the public health officer for the state. The budget deficit has impacted your state, and with elections high on the list of worries, legislators are concerned about their public image and are contemplating reducing the public health budget for the state. You are being asked to prepare a presentation to persuade legislators not to cut public health spending.
Select a public health program/service that will be impacted by a recently proposed state budget cut.
Prepare a PowerPoint presentation to persuade legislators not to cut public health funding. Present the cost/benefit of the public health program/service, the expected impact of the proposed cut, and conclude with an alternative proposal.
The presentation should have a minimum of 15 slides (not including the reference slides).
Notes should be present with each slide describing the information on the slide.
Provide supporting information.
Use charts, graphs, and other visuals.
Please make sure to present some state and local data of the community that will be impacted by the cuts.
REQUIREMENTS:
- Length: Assignment should be at least 15 slides, not counting reference slides.
- Cite your sources and include reference slides.
.
You have been engaged to develop a special calculator program. T.docxbriancrawford30935
You have been engaged to develop a special calculator program. The requirements for this program are very specific, and are as follows:
Create a Windows Forms application in Visual Studio using C#. The interface should look similar to the following:
Create the following controls, as shown above:
Labels for “Enter Information,” “Name,” “Input 1,” and “Input 2”
3 textboxes, as shown in the picture above
Buttons for addition, subtraction, multiplication, and division
Buttons for calculating sine, cosine, and tangent (based on the first input textbox only)
A button that calculates modulus
A button that clears the textboxes
Write a method for each of these calculations that will accept the incoming numbers from the two input fields and return the calculated value.
This value should be displayed in a MessageBox window, which should also display the user’s name from the first textbox.
Please submit your zipped Visual Studio project.
.
You have now delivered the project to your customer ahead of schedul.docxbriancrawford30935
You have now delivered the project to your customer ahead of schedule, but slightly over budget. Now, it is time to reflect on what went well and what didn’t go so well. Based on feedback throughout the course, what would you have done differently in terms of scope, resources, and / or schedule, and why?
.
You have now delivered the project to your customer. The project was.docxbriancrawford30935
You have now delivered the project to your customer. The project was delivered ahead of schedule, as requested by your project sponsor, but over budget by 20 percent. Now, it is time to reflect on what went well and what didn’t go well. Based on feedback throughout the course, what would you have done differently in terms of scope, resources, and schedule, and why?
.
You have now experienced the work of various scholars, artists and m.docxbriancrawford30935
You have now experienced the work of various scholars, artists and musicians who have connected words to social justice.
Now, it is your turn. Write a poem, song, spoken word, lecture, or rap that captures the struggle, action or hope that exists in a social issue of black lives matter. Be creative; this is your opportunity to express your reflections and ideas in a personal and compelling way.
.
You have learned that Mr. Moore does not drink alcohol in the mornin.docxbriancrawford30935
You have learned that Mr. Moore does not drink alcohol in the mornings. He does not binge drink, and he does not drink on Sundays. He does, however, drink the other 6 days of the week. Mrs. Moore explains his pattern of drinking Monday through Friday with his partners as stated in the scenario above, but he does not drink at home on those days. She also informs you that he does drink on Saturdays at home, often starting in the afternoon and passing out by dinnertime. He has a history of being loud, frightening, and angry when under the influence of alcohol. You also learn that Mr. Moore’s father was a winemaker from Italy.
Your supervisor, Officer Steve, suggests that you apply your knowledge of issues surrounding alcohol abuse and alcohol addiction to this case and write a memo to him. The memo should include the proper headings: "To," "From," "Date," and "Re:." The docket number and probation case file number should be included in the "Re:" section. You are beginning to determine whether Mr. Moore has an issue with alcohol that needs to be further addressed.
In the memo, do the following:
Submit the assignment in the format of a memo.
Include the proper headings: "To," "From," "Date," and "Re:." The docket number and probation case file number need to be included in the "Re:" section.
Apply the facts of Mr. Moore's case to the definitions of alcohol abuse and alcohol addiction.
Apply these facts to the differences between alcohol use and abuse.
Apply these facts to the DSM-IV criteria for a diagnosis of alcohol abuse.
Apply these facts to the disease model of alcohol abuse.
Apply these facts to the role genetics and heredity may play in the transmission of alcohol abuse from one generation to another
.
.
You have been hired by a large hospitality firm (e.g., Marriot.docxbriancrawford30935
You have been hired by a large hospitality firm (e.g., Marriott International, Hilton, Sheraton, Best Western, etc.) to be the project manager of the firm’s HQ office relocation project. You have been asked to speak to the HQ HR staff about the project. Many of the staff have very little understanding of project management. Also, they are fearful that this project will end up being a failure since other projects have failed at the firm. Explain to them the key elements of project management by comparing it to something they do understand well - human resources management (HRM). Be sure that your explanation addresses their fears of project management.
.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2. void reverse(java.util.LinkedList);
void downsize(java.util.LinkedList, int);
}
project2/employees.txt
Ahmed
Bill
Diana
Harry
Juliet
Nina
Romeo
Sam
Tom
Zack
project2/src/project2/emplist.javaproject2/src/project2/emplist.j
avapackage project2;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.ListIterator;
publicclass emplist {
3. publicstaticvoid main(String[] args)throwsIOException{
// TODO Auto-generated method stub
LinkedList<String> linkedlist =newLinkedList<String>();
method1 obj =new method1();
System.out.println("ttt********************************
************************");
System.out.println("ttt********* This Program was written
by ziyad **********");
System.out.println("ttt********************************
************************");
try(BufferedReader br =newBufferedReader(newFileReader(
"employees.txt"))){
String sCurrentLine;
while((sCurrentLine = br.readLine())!=null){
// System.out.println(sCurrentLine);
linkedlist.add(sCurrentLine);
// System.out.println(linkedlist);
}
String firstElement = linkedlist.get(0);
String lastElement = linkedlist.getLast();
System.out.println("tDisplaying List contentusing traditional fo
r loop");
for(int i =0; i < linkedlist.size(); i++){
System.out.println("Name of Emp is "+ linkedlist.get(i));
}
System.out.println("The first element of the List: "+ firstElemen
t);
System.out.println("The last element of the List: "+ lastElement
);
System.out.println("The size of the list after removing the last e
lement Zack is: 9");
4. System.out.println("tDisplaying using by using enhances for lo
op: ");
for(int a =0; a < linkedlist.size(); a++){
System.out.println(linkedlist.get(a));
}
ListIterator iter = linkedlist.listIterator();
while(iter.hasNext()){
int i = iter.nextIndex();
iter.next();
// System.out.println(iter.next() + " is at index" + i);
if(i ==0){
System.out.println("The current emplyee after advancing the ite
r five timers is: "
+ iter.previous());
Object element = iter.next();
iter.add("kelly");
// iter.set( "Kelly");
int k =0;
// while( k < linkedlist.size())
{
System.out.println("tDisplaying list after inserting Kelly after t
he fifth positionn"+ linkedlist +" ");
k++;
}
}elseif(i ==6){
System.out.println("tDisplaying list after setting the current ele
ment to Nancy"+ iter.previous());
Object element1 = iter.next();
iter.set("Nancy");
// iter.set( "");
int j =0;
// while( k < linkedlist.size())
{
System.out
.println("tDisplaying list after replacing the Kelly n"
5. + linkedlist +" ");
j++;
}
break;
}
}
System.out
.println("tDisplaying the list after calling the reverse method: "
);
obj.reverse(linkedlist);
System.out
.println("tDisplaying the list after calling the reverse method o
ne more time: n"
+ linkedlist);
System.out
.println("tDisplaying the list after calling the downsize method
with n=2 ");
obj.downsize(linkedlist,2);
}
}
}
project2/src/project2/method1.javaproject2/src/project2/method
1.javapackage project2;
import java.util.LinkedList;
publicclass method1 {
LinkedList<String> newList =newLinkedList<String>();
6. void reverse(LinkedList<String> strings){
newList.addAll(strings);
LinkedList<String> string1 = strings;
System.out.println(string1);
System.out.println("tDisplaying the list after calling the revers
e method ");
int k = strings.size();
System.out.print("[");
for(int i =0; k >1; i++){
System.out.print(string1.get(k -2)+", ");
k--;
}
System.out.println("]");
}
void downsize(LinkedList<String> employeeNames,int n){
int k = employeeNames.size();
for(int i =0; i < k; i++){
if(i == k){
System.out.println(n
+"tEmplyee has been downsize whose name is: "
+ employeeNames.get(i));
System.out.println("tUpdated list is: ");
employeeNames.remove(i);
}
}
System.out.println(employeeNames);
}
}
7. Page 1 of 3
Programming Project 4 (Due 11-17-2016 at 2:00 PM)
Write a JAVA program to solve the following problem. Your
program should properly
compile and run. Your code MUST follow the documentation
style used in your textbook.
You need to upload into Moodle the following:
s expected to be
composed of multiple
source code files. Thus to organize these files, all of them have
to be part of a
single package. Your package name MUST match the directory
containing your
code file. Finally, you need to export your package as a .JAR
file then upload this
single file into Moodle. If you are not familiar with how to
export your code into
a .JAR file, please check the following link.
http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.
doc.user%2Ftasks
%2Ftasks-33.htm
Very Important Note: Do NOT upload any other files into
Moodle; just ONE file
with the extension “.jar” that is it.
Problem Statement:
In this project, you are asked to write a Java application similar
to the one you wrote in Project 2
8. that handles a list of employees employed by a certain company.
Your code in project 2 had used
the built-in functionalities of the LinkedList class defined in the
Java Collection Classes. In this
project, you will still use a LinkedList as the main data
structure that stores your data but you
will provide your own implementation of a class called
RecLinkedLink. In doing so, all the
required methods to be defined in your RecLinkedList needs to
be implemented using recursive
algorithms. In other words, method such as size(), replace(),
add(), remove, etc. MUST use
recursion to achieve it functions. (check chapter 5 for details).
As done before, we will assume that each employee is only
represented by her/his first name.
The names of all employees in this small company are stored in
a given data file called
empNames.txt which is posted on Moodle next to this project
statement. Your program must do
the following task:
1. Define your own recursive implementation of LinkList in a
separate file called
“RecLinkedList.java”.
2. Create an object of RecLinkedList to be used in storing and
handling employees’ data.
3. Open the given file and read employee data into the
RecLinkedList object. In doing so,
your code needs to maintain the order of employee data in the
input file.
4. Verify the content of the employee data (just read) by
displaying them on the monitor
9. using a traditional for loop along with appropriate output
messages.
Page 2 of 3
5. Invoke various methods of the RecLinkedList class to
retrieve then display the first
element and the last element of the list. Display appropriate
messages on the monitor.
6. Invoke various methods of the RecLinkedList class to remove
the last element then
display the size of the list after the removal operation. Display
appropriate messages on
the monitor.
7. Display the current list contents using the enhanced for loop
along with appropriate
output messages.
8. Create a ListIterator object, iter, to be used in accessing the
RecLinkedList contents.
9. Advance the iterator for five positions then display the
current list item (using iterator
method and NOT list method).
10. Insert a new employee called “Kelly” at the current iterator
position then display the
current list contents using the compact form to be used from
this point on for any list
content display. Hint, use the implicit toString().
11. Execute the iter.previous() method followed by using the
10. iter.set() method to set the
current element to Nancy. Then, display the current list
contents.
12. Execute the iter.previous() method followed by the remove()
method then display the
current list contents.
13. In a separate file, create a helper class called HelpLists.
This class need to have the
code for two methods described below:
a. public void reverse(RecLinkedList<String> strings). This
method receives a
RecLinkedList object as its parameter then linearly access all
the elements in the
object while pushing them in a STACK object. You need to use
the STACK data
structure that you just created to retrieve the data from the stack
and display
them in reserve order on the monitor.
b. public void FIFO(RecLinkedList<String> strings). This
method receives a
RecLinkedList object as its parameter then linearly access all
the elements in the
object while inserting them in a QUEUE object. You need to use
the QUEUE
data structure that you just created to retrieve the data from the
queue and
display them in order on the monitor.
14. In your main class, create an object of type HelpLists class
then use it in the following.
15. Invoke the reverse method to reverse the order then display
the reversed list contents.
11. 16. Invoke the FIFO() method in order to create a queue and use
it to ensure that the order
of the data in RecLinkedList will be displayed without change.
A Sample output of your code need to look like the following
snapshot.
Page 3 of 3
(End of Project)
Koffman-index.indd 660 10/30/2015 7:27:45 PM
DATA STRUCTURES
Abstraction and Design
Using Java
THIRD EDITION
ELLIOT B. KOFFMAN
Temple University
14. returnlabel. If you have chosen to adopt this textbook for use in
your course, please accept this book as your complimentary
desk copy.
Outside of the United States, please contact your local sales
representative.
ISBN: 978-1-119-23914-7 (PBK)
ISBN: 978-1-119-22307-8 (EVALC)
Library of Congress Cataloging-in-Publication Data
Koffman, Elliot B.
[Objects, abstraction, data structures and design using Java]
Data structures : abstraction and design using Java / Elliot B.
Koffman, Temple University, Paul A.T. Wolfgang, Temple
University. —
Third edition.
pages cm
Original edition published under title: Objects, abstraction,
data structures and design using Java.
Includes index.
ISBN 978-1-119-23914-7 (pbk.) 1. Data structures (Computer
science) 2. Java (Computer program language) 3. Object-
oriented
programming (Computer science) 4. Application program
interfaces (Computer software) I. Wolfgang, Paul A. T. II. Title.
QA76.9.D35K58 2016
005.7'3—dc23
2015036861
Printing identification and country of origin will either be
included on this page and/or the end of the book. In addition, if
the ISBN on this
page and the back cover do not match, the ISBN on the back
cover should be considered the correct ISBN.
15. Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
Koffman-ffirs.indd 2 11/4/2015 3:00:52 PM
http://www.wiley.com/go/citizenship
http://www.copyright.com
http://www.wiley.com/go/permissions
http://www.wiley.com/goreturnlabel
Preface
Our goal in writing this book was to combine a strong emphasis
on problem solving and
software design with the study of data structures. To this end,
we discuss applications of each
data structure to motivate its study. After providing the
specification (interface) and the
implementation (a Java class), we then cover case studies that
use the data structure to solve
a significant problem. Examples include maintaining an ordered
list, evaluating arithmetic
expressions using a stack, finding the shortest path through a
maze, and Huffman coding
using a binary tree and a priority queue. In the implementation
of each data structure and in
the solutions of the case studies, we reinforce the message
“Think, then code” by performing
a thorough analysis of the problem and then carefully designing
a solution (using pseudo‐
code and UML class diagrams) before the implementation. We
also provide a performance
analysis when appropriate. Readers gain an understanding of
why different data structures
16. are needed, the applications they are suited for, and the
advantages and disadvantages of their
possible implementations.
Intended Audience
This book was written for anyone with a curiosity or need to
know about data structures,
those essential elements of good programs and reliable
software. We hope that the text will
be useful to readers with either professional or educational
interests.
It is intended as a textbook for the second programming course
in a computing curriculum
involving the study of data structures, especially one that
emphasizes Object‐Oriented Design
(OOD). The text could also be used in a more‐advanced course
in algorithms and data struc-
tures. Besides coverage of the basic data structures and
algorithms (lists, stacks, queues, trees,
recursion, sorting), there are chapters on sets and maps,
balanced binary search trees, graphs,
and an online appendix on event‐oriented programming.
Although we expect that most read-
ers will have completed a first programming course in Java,
there is an extensive review
chapter (included as an appendix) for those who may have taken
a first programming course
in a different language, or for those who need a refresher in
Java.
Emphasis on the Java Collections Framework
The book focuses on the interfaces and classes in the Java
Collections Framework. We begin
the study of a new data structure by specifying an abstract data
type as an interface, which
17. we adapt from the Java API. Readers are encouraged throughout
the text to use the Java
Collections Framework as a resource for their programming.
Our expectation is that readers who complete this book will be
familiar with the data struc-
tures available in the Java Collections Framework and will be
able to use them in their future
programming. However, we also expect that they will want to
know how the data structures
are implemented, so we provide thorough discussions of classes
that implement these data
structures. Each class follows the approach taken by the Java
designers where appropriate.
However, when their industrial‐strength solutions appear to be
too complicated for beginners
to understand, we have provided simpler implementations but
have tried to be faithful to
their approach.
Koffman-preface.indd 3 10/20/2015 3:02:35 PM
iv Preface
Think, then Code
To help you “Think, then code” we discuss problem solving and
introduce appropriate soft-
ware design tools throughout the textbook. For example,
Chapter 1 focuses on OOD and
Class Hierarchies. It introduces the Uniform Modeling
Language (also covered in Appendix B)
to document an OOD. It introduces the use of interfaces to
specify abstract data types and to
facilitate contract programming and describes how to document
18. classes using Javadoc‐style
comments. There is also coverage of exceptions and exception
handling. Chapter 2 intro-
duces the Java Collections Framework and focuses on the List
interface, and it shows how to
use big‐O notation to analyze program efficiency. In Chapter 3,
we cover different testing
strategies in some detail including a discussion of test‐driven
design and the use of the JUnit
program to facilitate testing.
Features of the Third Edition
We had two major goals for the third edition. The first was to
bring the coverage of Java up to
Java 8 by introducing new features of Java where appropriate.
For example, we use the Java 7
diamond operator when creating new Collection objects. We use
the Java 8 StringJoiner in
place of the older StringBuilder for joining strings.
A rather significant change was to introduce Java 8 lambda
expressions and functional inter-
faces as a way to facilitate functional programming in Java in a
new Section 6.4. Using these
features significantly improved the code.
The second major goal was to provide additional emphasis on
testing and debugging. To
facilitate this, we moved our discussion of testing and
debugging from an appendix to
Chapter 3 and expanded our coverage of testing including more
discussion of JUnit. We also
added a new section that introduced test‐driven development.
A third goal was to ease the transition to Java for Python
programmers. When introducing
19. Java data structures (for example, arrays, lists, sets, and maps),
we compared them to equiva-
lent Python data structures.
Other changes to the text included reorganizing the chapter on
lists and moving the discussion
of algorithm analysis to the beginning of the chapter so that
big‐O notation could be used to
compare the efficiency of different List implementations. We
also combined the chapters on
stacks and queues and increased our emphasis on using Deque
as an alternative to the legacy
Stack class. We also added a discussion of Timsort, which is
used in Java 8, to the chapter on
sorting algorithms. Finally, some large case studies and an
appendix were moved to online
supplements.
Case Studies
We illustrate OOD principles in the design and implementation
of new data structures and in
the solution of approximately 20 case studies. Case studies
follow a five‐step process (prob-
lem specification, analysis, design, implementation, and
testing). As is done in industry, we
sometimes perform these steps in an iterative fashion rather
than in strict sequence. Several
case studies have extensive discussions of testing and include
methods that automate the test-
ing process. Some case studies are revisited in later chapters,
and solutions involving different
data structures are compared. We also provide additional case
studies on the Web site for the
textbook (www.wiley.com/college/koffman), including one that
illustrates a solution to the
same problem using several different data structures.
20. Koffman-preface.indd 4 10/20/2015 3:02:35 PM
http://www.wiley.com/college/koffman
Preface v
Prerequisites
Our expectation is that the reader will be familiar with the Java
primitive data types including
int, boolean, char, and double; control structures including if,
case, while, for, and try‐catch;
the String class; the one‐dimensional array; input/output using
either JOptionPane dialog win-
dows or text streams (class Scanner or BufferedReader) and
console input/output. For those
readers who lack some of the concepts or who need some
review, we provide complete coverage
of these topics in Appendix A. Although labeled an Appendix,
the review chapter provides full
coverage of the background topics and has all the pedagogical
features (discussed below) of the
other chapters. We expect most readers will have some
experience with Java programming, but
someone who knows another programming language should be
able to undertake the book
after careful study of the review chapter. We do not require
prior knowledge of inheritance,
wrapper classes, or ArrayLists as we cover them in the book
(Chapters 1 and 2).
Pedagogy
The book contains the following pedagogical features to assist
inexperienced programmers
in learning the material.
21. • Learning objectives at the beginning of each chapter tell
readers what skills they should
develop.
• Introductions for each chapter help set the stage for what the
chapter will cover and tie
the chapter contents to other material that they have learned.
• Case Studies emphasize problem solving and provide complete
and detailed solutions to
real‐world problems using the data structures studied in the
chapter.
• Chapter Summaries review the contents of the chapter.
• Boxed Features emphasize and call attention to material
designed to help readers become
better programmers.
Pitfall boxes help readers identify common problems and how to
avoid
them.
Design Concept boxes illuminate programming design decisions
and
trade‐offs.
Programming Style boxes discuss program features that
illustrate good
programming style and provide tips for writing clear and
effective code.
Syntax boxes are a quick reference for the Java structures being
introduced.
22. • Self‐Check and Programming Exercises at the end of each
section provide immediate
feedback and practice for readers as they work through the
chapter.
• Quick‐Check, Review Exercises, and Programming Projects at
the end of each chapter
review chapter concepts and give readers a variety of
skill‐building activities, including
longer projects that integrate chapter concepts as they exercise
the use of data structures.
Theoretical Rigor
In Chapter 2, we discuss algorithm efficiency and big‐O
notation as a measure of algorithm
efficiency. We have tried to strike a balance between pure
“hand waving” and extreme rigor
when determining the efficiency of algorithms. Rather than
provide several paragraphs of
Koffman-preface.indd 5 10/20/2015 3:02:42 PM
vi Preface
formulas, we have provided simplified derivations of algorithm
efficiency using big‐O nota-
tion. We feel this will give readers an appreciation of the
performance of various algorithms
and methods and the process one follows to determine algorithm
efficiency without bogging
them down in unnecessary detail.
Overview of the book
Chapter 1 introduces Object Oriented Programming,
23. inheritance, and class hierarchies
including interfaces and abstract classes. We also introduce
UML class diagrams and Javadoc‐
style documentation. The Exception class hierarchy is studied as
an example of a Java class
hierarchy.
Chapter 2 introduces the Java Collections Framework as the
foundation for the traditional
data structures. These are covered in separate chapters: lists
(Chapter 2), stacks, queues and
deques (Chapter 4), Trees (Chapters 6 and 9), Sets and Maps
(Chapter 7), and Graphs
(Chapter 10). Each new data structure is introduced as an
abstract data type (ADT). We pro-
vide a specification of each ADT in the form of a Java interface.
Next, we implement the data
structure as a class that implements the interface. Finally, we
study applications of the data
structure by solving sample problems and case studies.
Chapter 3 covers different aspects of testing (e.g. top‐down,
bottom‐up, white‐box, black‐
box). It includes a section on developing a JUnit test harness
and also a section on Test‐
Driven Development. It also discuses using a debugger to help
find and correct errors.
Chapter 4 discusses stacks, queues, and deques. Several
applications of these data structures
are provided.
Chapter 5 covers recursion so that readers are prepared for the
study of trees, a recursive data
structure. This chapter could be studied earlier. There is an
optional section on list processing
24. applications of recursion that may be skipped if the chapter is
covered earlier.
Chapter 6 discusses binary trees, including binary search trees,
heaps, priority queues, and
Huffman trees. It also shows how Java 8 lambda expressions
and functional interfaces sup-
port functional programming.
Chapter 7 covers the Set and Map interfaces. It also discusses
hashing and hash tables and
shows how a hash table can be used in an implementation of
these interfaces. Building an
index for a file and Huffman Tree encoding and decoding are
two case studies covered in this
chapter.
Chapter 8 covers various sorting algorithms including
mergesort, heapsort, quicksort and
Timsort.
Chapter 9 covers self‐balancing search trees, focusing on
algorithms for manipulating them.
Included are AVL and Red‐Black trees, 2‐3 trees, 2‐3‐4 trees,
B‐trees, and skip‐lists.
Chapter 10 covers graphs. We provide several well‐known
algorithms for graphs, including
Dijkstra’s shortest path algorithm and Prim’s minimal spanning
tree algorithm. In most pro-
grams, the last few chapters would be covered in a second
course in algorithms and data
structures.
Supplements and Companion Web Sites
The following supplementary materials are available on the
25. Instructor’s Companion Web Site
for this textbook at www.wiley.com/college/koffman. Items
marked for students are accessi-
ble on the Student Companion Web Site at the same address.
Koffman-preface.indd 6 10/20/2015 3:02:42 PM
http://www.wiley.com/college/koffman
Preface vii
• Additional homework problems with solutions
• Additional case studies, including one that illustrates a
solution to the same problem
using several different data structures
• Source code for all classes in the book (for students and
instructors)
• PowerPoint slides
• Electronic test bank for instructors
•
Solution
s to end‐of‐section odd‐numbered self‐check and programming
exercises (for students)
•