Scenario: A builder needs a database to keep track of contractors he hires for various projects. So far, we have this 2NF relation, with sample data shown. Normalize to 3NF.
CONTRACTOR: # ConID, Lname, Fname, JobTitle, Company, Street, City, State, Zip, CompanyPhone, CellPhone
ConID |
Lname |
Fname |
JobTitle |
Company |
Street |
City |
State |
Zip |
Phone |
CellPhone |
2 |
Garcia |
Mary |
Carpenter |
Construct Co |
123 Main |
Portland |
OR |
97204 |
823-1234 |
645-5423 |
14 |
Jones |
Tomas |
Welder |
Construct Co |
123 Main |
Portland |
OR |
97204 |
823-1234 |
344-3475 |
21 |
Smith |
Joey |
Welder |
Construct Co |
123 Main |
Portland |
OR |
97204 |
823-1234 |
676-0495 |
8 |
Tanaka |
Bill |
Plumber |
Water Inc |
456 21st St |
Portland |
OR |
97219 |
722-0045 |
805-7602 |
9 |
Alredd |
Pete |
PipeFitter |
Water Inc |
456 21st St |
Portland |
OR |
97219 |
722-0045 |
341-1243 |
Explain your reasoning here (not what you did but why you did it). What does 3NF mean? How did you apply it?
Your 3NF relation or relations go here.
In: Computer Science
Write a C++ program (using the pthread library) that accepts a phrase of unspecified length on the command line.
For example: prompt$: ./vowcon Operating Systems Class at CSUN
The main() in this program should read the phrase from the terminal. This phrase can be read into a global variable. This phrase or its parts can be directly accessed from the main() and from the threads. The main() has to create two threads running functions (vow and con). The main() can also send the phrase or its parts to the threads. The threads should print only the words of the phrase as follows:
The vow thread function should print all the words that start with a vowel
The con thread function should print all the words starting with a consonant.
Note that the main thread (running main()) should not print anything itself, the output should be printed by the threads that it creates. The main() can decide which thread to begin executing first, or it can leave it to the threads to sort this out. The order of words in the phrase should not be changed in the print. Your program should work for any phrase of any reasonable length, not just the one given in the example. The output of your program should look similar to the following
$ ./vowcon Operating Systems Class at CSUN
vow: Operating
con: Systems
con: Class
vow: at con: CSUN
In this part you are *not allowed* to use synchronization primitives such as semaphores, mutexes, mutex locks such as pthread_mutex_lock and pthread_mutex_unlock and conditional variables such as pthread_cond_wait and pthread_cond_signal etc. from pthreads library for thread coordination. You do not neet to use sched_yield() to relinquish control of the CPU, but you can use it if you like. You will have to may also investigate some of the other pthread functions available to you for this project, and use them if you like. Although you do not actually need them.
In: Computer Science
For this assignment, you will create a command-line version of the game Hangman. You should work in a group of two on the project and not view Hangman code of other students or found on-line. Submit this project-- your .java file-- here on Canvas.
For this assignment you will research on StringBuilder Class (Use this link) and use it in your code.
Functional requirements (rubric)
● Your game should have a list of at least ten phrases of your choosing (appropriate to all audiences please!) The game chooses a random phrase from the list. This is the phrase the player tries to guess. (10)
● The phrase is hidden-- all letters are replaced with asterisks. Spaces and punctuation are left unhidden. So if the phrase is "Joe Programmer", the initial partially hidden phrase is: *** ********** (15)
● The user guesses a letter. All occurrences of the letter in the phrase are replaced in the partially hidden phrase. For our example, if the user guessed "o", the new partially hidden phrase would change to: * o * ** o******* 15
● Allow the phrases and guesses to include lowercase and uppercase letters and digits. If a guess is not a letter or digit (e.g., ‘%’) the user should be notified but not penalized a miss. 10
● If the guessed letter does not occur in the phrase, the user is notified of the miss and how many misses/chances are left. 10
● The user should NOT be penalized for guessing a previously correct or incorrect guess, but should be notified. 10
● If the user misses 8 times, they lose and the game is over. If all letters in the phrase are guessed, the user wins! 10
● Provide a reasonable user interface such that the players is given instructions on how to play and it is clear how to proceed at each step. Test this out by performing a usability test with at least two people! 10
Style Requirements
● Style your code using the Google Java Style Guidelines (Links to an external site.)Links to an external site.. For this first project, be sure and follow the formatting (Links to an external site.)Links to an external site. and naming (Links to an external site.)Links to an external site. guides.
Coding Specifications
● Define the ten phrases as an array of Strings.
○ String phraseList[] = {"cats and dogs", "stephen curry"};
○ then phraseList[0] will give "cats and dogs" and phraseList[1]
will
give "stephen curry".
● Define the randomly chosen phrase as a String
● Define the hidden phrase as a StringBuilder, because you will be changing it as the game is played.
● You need not define other methods other than main.
In: Computer Science
Write a java program to produce an invoice for the lease groups who use the camp Orchard Green.
Orchard Green is a 200 acre camp with access to different activities for lease groups. Lease groups rent the spaces they want to use, have programs (tower, canoeing, team building) run for them to enjoy, and are provided meals. Orchard green has a maximum capacity of 100 people. There are two residence halls (A and B), each with a capacity of 50 people. Each residence hall costs $1600 per night. For those groups that want to have other meeting spaces and areas to enjoy, there is a lodge ($500 per group), meeting room ($800 per group), and gym ($500 per group). The dining hall costs $300 for the group to use, provides breakfast, lunch, and dinner, and each meal costs $8 per person. Groups arrive at 4pm on the first day and leave at 4pm on the last day. Lease groups can have tower sessions where they climb a 50 foot tower ($20 per person), canoeing sessions where they canoe and peddle boat on a lake ($200 per group), and team building sessions where groups learn the value of teamwork ($200 per group). Orchard Green will provide 4 staff members to run the activities at $200 per staff member for the group. The lease group will also need a host from Orchard Green who will provide a variety of support during their stay ($40 per day).
The program will ask for the number of participants and the number of nights staying at the camp.
Input
90, 3
The prompts
Number of participants:
Number of nights staying at the camp:
Notes:
Document your program.
Example of Invoice:
ORCHARD GREEN INVOICE Idaho Bluegills Basketball Association |
|
Number of Participants |
90 |
Number of Nights |
3 |
Number of Days |
|
Residence Hall A |
|
Residence Hall B |
|
Lodge (per group rate) |
$500.00 |
Meeting room (per group rate) |
$800.00 |
Gym (per group rate) |
$500.00 |
Dining Hall (per group rate) |
$300.00 |
Meals |
|
Tower Session |
|
Canoeing Session |
$200.00 |
Team Building Session |
$200.00 |
Cost of Staff |
|
Cost of Host |
|
Subtotal |
|
Tax (6% on non-meal items) |
|
Grand Total |
In: Computer Science
Non-certified individuals are still allowed to practice software engineering. Discuss the pros and cons of this
In: Computer Science
You have now created a big data repository for your enterprise and, you spend time worrying about two things:
[a] How will this data be useful to me?
[b] How can I make it available to my organization?
In: Computer Science
class Arrays1{
public int getSumOfValues(int[] arr){
// return the sum of values of array elements
int sum = 0;
int i;
for(i = 0; i < arr.length; i++){
sum += arr[1];
}
return sum;
}
public int getAverageValueInArray(int[] arr){
// return the average value of array elements
int value = 0;
for(int i = 0; i < arr.length; i++){
double average = value/ arr.length;
}
return value;
}
public int getNumberOfEvens(int[] arr){
//return the number of even values found in the array
int even = 0;
for(int i = 0; i < arr.length; i++){
if(i % 2 == 0){
}
}
return even;
}
public int getNumberOfOdds(int[] arr){
// return the number of odd vsalues found in the array
int odd = 0;
for(int i = 0; i < arr.length; i++){
if(i % 2 != 0){
}
}
return odd;
}
public int maxValue(int[] arr){
// return max value in array
int maxValue = arr[0];
for(int i = 1; i < arr.length; i++){
if(arr[i] > maxValue){
maxValue = arr[i];
}
}
return maxValue;
}
public int minValue(int[] arr){
// return min value in array
int minValue = arr[0];
for(int i = 1; i < arr.length; i++){
if(arr[i] < minValue){
minValue = arr[i];
}
}
return minValue;
}
public boolean arrayContainsWord(String[] arr, String word){
// return true if array contains specific word, false
otherwise
for(int i = 0; i < arr.length; i++){
if(arr[i].equals(word));
return true;
}
return false;
}
public int getIndexOfWord(String[] arr, String word){
// if found, return the index of word, otherwise return -1
for(int i = 0; i < arr.length; i++){
if(arr[i].equals(word)){
return i;
}
}
return -1;
}
public boolean areArrays(int[] arr1, int[] arr2){
// 1. initial check: both arrays need to have the same length,
return false if not the same
// 2. return true if both given arrats are equals(same values in
the same indices), false otherwise
if(arr1.length != arr2.length){
return false;
}
for(int i = 0; i < arr1.length; i++){
if(arr1[i] != arr2[i]){
}
}
return true;
}
public boolean areArraysEqual(String[] arr1, String[] arr2){
// 1. initial check: both arrays need to have the same length,
return false if not the same
// 2. return true if both given arrays are equals(same values in
the same indices), false otherwise
if(arr1.length != arr2.length){
return false;
}
for(int i = 0; i < arr1.length; i++){
if(arr1[i].equals(arr2[i])){
}
}
return false;
}
}
Write ArraysDriver (similar design to LoopsDriver):
In this assignment, you will pass arrays as arguments to these methods. You may declare and initialize these arrays before the loop and reuse them throughout your application. For this assignment, use arrays of 5 elements. You will need 2 int[] arrays and 2 String[] arrays to be declared and initialized before the main loop. You may use arbitrary values for each item/element in the arrays.
The only input you will need from the user (other than the menu option selected) is a word to use for arrayContainsWord and getIndexOfWord.
In: Computer Science
Can anyone come up with 10 interesting ideas for senior project / capstone for an Information Technology major? I can't think of anything interesting.
In: Computer Science
You are investigating systems requirements for a shipping company. Assume that you have set up an interview with the manager of the shipping department. Your objective is to determine how shipping works and what the information requirements for the new system will be.
IN 300 WORDS Make a list of questions—three (3) open ended and three (3) closed ended— that you would use. Include four (4) questions or techniques you would use to ensure you find out about the exceptions.
In: Computer Science
I keep on get a redefinition error and an undefined error.
Customer List
(1) CustomerList() and ~CustomerList() - default constructor and destructor.
(2) bool addStore(Store*s) - Add an instance of store to the linked list. Return true if successful.
(3) Store *removeStore(int ID) - Locate a Store in the list if it exists, remove and return it.
(4) Store *getStore(int ID) - Locate a Store in the list and return a pointer to it.
(5) bool updateStore(int ID, char *name, char *addr, char *city, char *st, char *zip) - Locate a store in the list then update all its information. Return true if successful.
(6) void printStoreInfo() - Iterate over the list of store and have each print itself.
Employee Record
(1) Add a pointer to a class of type CustomerList called m_pCustomerList.
(2) Add a function CustomerList *getCustomerList to return the pointer to the EmployeeRecord's CustomerList object.
-------------------------------------------------------------
CustomerList.h
#pragma once;
#include
#include "Store.h"
class CustomerList
{
public:
Store *m_pHead;
CustomerList();
~CustomerList();
bool addStore(Store *s);
Store *removeStore(int ID);
Store *getStore(int ID);
bool updateStore(int ID, char *name, char *addr, char *city, char *st, char *zip);
void printStoresInfo();
};
----------------------------------------------------------------------------
CustomerList.cpp
#include
#include "CustomerList.h"
#include "Store.h"
using namespace std;
CustomerList::CustomerList()
{
// Default constructor
}
CustomerList::~CustomerList()
{
// Destructor
}
bool CustomerList:: addStore(Store *s)
{
//creating a new instance
s = new Store();
if(s==NULL)
return true;
}
Store *CustomerList::removeStore(int ID)
{
Store *temp, *back;
temp = m_pHead;
back = NULL;
while((temp != NULL)&&(ID != temp ->getStoreID()))
{
back=temp;
temp=temp->m_pNext;
}
if(temp==NULL)
return NULL;
else if(back==NULL)
{
m_pHead = m_pHead ->m_pNext;
return temp;
}
else
{
back -> m_pNext = temp-> m_pNext;
return temp;
}
return NULL;
}
Store *CustomerList::getStore(int ID)
{
Store *temp;
temp = m_pHead;
while((temp != NULL) && (ID != temp ->getStoreID()))
{
temp = temp->m_pNext;
}
if(temp == NULL)
return NULL;
else
{
Store *retStore = new Store;
*retStore = *temp;
retStore->m_pNext = NULL;
return retStore;
}
}
bool CustomerList::updateStore(int ID, char *name, char *addr, char *city, char *st, char *zip)
{
return false;
}
void CustomerList::printStoresInfo()
{
Store *temp;
cout << " ===================================================================================== " << endl;
if(m_pHead== NULL)
cout << " The List is currently empty.\n" ;
else
{
temp = m_pHead;
while(temp != NULL)
{
cout << temp->m_pNext << endl;
}
}
}
--------------------------------------------------------------------------------
Store.h
#pragma once;
#include
#include
using namespace std;
class Store
{
private:
int m_iStoreID;
char m_sStoreName[64];
char m_sAddress[64];
char m_sCity[32];
char m_sState[32];
char m_sZip[11];
public:
Store *m_pNext;
Store(); // Default constructor
Store(int ID, // Constructor
char *name,
char *addr,
char *city,
char *st,
char *zip);
~Store(); // Destructor
int getStoreID(); // Get/Set store ID
void setStoreID(int ID);
char *getStoreName(); // Get/Set store name
void setStoreName(char *name);
char *getStoreAddress(); // Get/Set store address
void setStoreAddress(char *addr);
char *getStoreCity(); // Get/Set store city
void setStoreCity(char *city);
char *getStoreState(); // Get/Set store state
void setStoreState(char *state);
char *getStoreZip(); // Get/Set store zip code
void setStoreZip(char *zip);
void printStoreInfo(); // Print all info on this store
};
------------------------------------------------------------------------------
Store.cpp
#include "Store.h"
#include
using namespace std;
Store::Store()
{
m_pNext = NULL;
}
Store::Store(int ID, char *name, char *addr, char *city, char *st, char *zip)
{
m_iStoreID = ID;
strcpy(m_sStoreName, name);
strcpy(m_sAddress, addr);
strcpy(m_sCity, city);
strcpy(m_sState, st);
strcpy(m_sZip, zip);
m_pNext = NULL;
}
Store::~Store()
{
// Nothing to do here
}
int Store::getStoreID()
{
return m_iStoreID;
}
void Store::setStoreID(int ID)
{
m_iStoreID = ID;
}
char *Store::getStoreName()
{
char *name = new char[strlen(m_sStoreName) + 1];
strcpy(name, m_sStoreName);
return name;
}
void Store::setStoreName(char *name)
{
strcpy(m_sStoreName, name);
}
char *Store::getStoreAddress()
{
char *addr = new char[strlen(m_sAddress) + 1];
strcpy(addr, m_sAddress);
return addr;
}
void Store::setStoreAddress(char *addr)
{
strcpy(m_sAddress, addr);
}
char *Store::getStoreCity()
{
char *city = new char[strlen(m_sCity) + 1];
strcpy(city, m_sCity);
return city;
}
void Store::setStoreCity(char *city)
{
strcpy(m_sCity, city);
}
char *Store::getStoreState()
{
char *state = new char[strlen(m_sState) + 1];
strcpy(state, m_sState);
return state;
}
void Store::setStoreState(char *state)
{
strcpy(m_sState, state);
}
char *Store::getStoreZip()
{
char *zip = new char[strlen(m_sZip) + 1];
strcpy(zip, m_sZip);
return zip;
}
void Store::setStoreZip(char *zip)
{
strcpy(m_sZip, zip);
}
void Store::printStoreInfo()
{
cout << m_iStoreID << setw(20) << m_sStoreName << setw(15) << m_sAddress
<< setw(15) << m_sCity << ", " << m_sState << setw(10) << m_sZip << "\n";
}
----------------------------------------------------------
EmployeeRecord.h
#pragma once
#include "CustomerList.h"
class EmployeeRecord
{
private:
int m_iEmployeeID;
char m_sLastName[32];
char m_sFirstName[32];
int m_iDeptID;
double m_dSalary;
public:
CustomerList *getCustomerList();
CustomerList *m_pCustomerList;
//The default constructor
EmployeeRecord();
// Constructor shall set the member values passed into the function.
EmployeeRecord(int ID, char *fName, char *lName, int dept, double sal);
// The destructor
~EmployeeRecord();
// shall return the value stored in the member variable
int getID();
// will set the member variable m_iEmployeeID to the value of its' argument.
void setID(int ID);
// The getName() function shall copy the member variables m_sFirstName and m_sLastName into the character arrays pointed to by the function arguments.
void getName(char *fName, char *lName);
// The setName() function will copy the function arguments into the member variables m_sFirstName and m_sLastName
void setName(char *fName, char *lName);
// The getDept() function shall be defined as a reference function. That is, a call to this function will copy the member variable m_iDeptID into the int variable referenced by the function argument.
int getDept();
// The setDept() function will copy the function argument into the member variable m_iDeptID.
void setDept(int d);
// The getSalary() function shall be defined as a pointer function.
double getSalary();
// The function setSalary() shall copy the function argument into the member variable m_dSalary.
void setSalary(double sal);
//This function shall print to the screen all data found in the employee's record
void printRecord();
};
-----------------------------------------------------------------------------
EmployeeRecord.cpp
#include
#include "EmployeeRecord.h"
using namespace std;
//Default Constructor
EmployeeRecord::EmployeeRecord()
{
// The default constructor shall set the member variables to the following
m_iEmployeeID = 0;
m_sFirstName[0] = '\0';
m_sLastName[0] = '\0';
m_iDeptID = 0;
m_dSalary = 0.0;
}
EmployeeRecord::EmployeeRecord(int ID, char *fName, char *lName, int dept, double sal)
{
// Copying the member varibles for First and Last name
strcpy(m_sFirstName, fName);
strcpy(m_sLastName, lName);
// Copying other member variables
m_iEmployeeID = ID;
m_iDeptID = dept;
m_dSalary = sal;
fName = NULL;
lName = NULL;
}
// Default Desctrutor
EmployeeRecord::~EmployeeRecord()
{
// It was tested in sprint 1
}
int EmployeeRecord:: getID()
{
/*cout <<"\n====================================="<< endl;
cout << " Testing data:" << endl;
cout <<"====================================="<< endl;
// Testing ID
cout << "Testing getID(). Result = " << m_iEmployeeID << endl;*/
return m_iEmployeeID;
}
void EmployeeRecord::setID(int ID)
{
m_iEmployeeID = ID;
/*cout <<"====================================="<< endl;
cout << " Setting data in Record:" << endl;
cout <<"====================================="<< endl;
cout << "ID = " << m_iEmployeeID << endl;*/
}
void EmployeeRecord::getName(char *fName, char *lName)
{
//Copying member variables to parameters for name.
strcpy(fName, m_sFirstName);
strcpy(lName, m_sLastName);
//cout << "Testing getName(). Result = " << m_sFirstName << " " << m_sLastName << endl;
}
void EmployeeRecord::setName(char *fName, char *lName)
{
strcpy(m_sFirstName, fName);
strcpy(m_sLastName, lName);
//cout << "First Name = " << m_sFirstName <
//cout << "Last Name = " << m_sLastName <
}
int EmployeeRecord::getDept()
{
//Copying member variables to parameters for Dept ID
return m_iDeptID;
// testing getDept()
//cout << "Testing getDept(). Result = " << d << endl;
}
void EmployeeRecord::setDept(int d)
{
m_iDeptID = d;
// cout << "Dept = " << m_iDeptID << endl;
}
double EmployeeRecord::getSalary()
{
return m_dSalary;
//cout << "Testing getSalary(). Result = " << *sal << endl;
//cout << endl << endl;
}
void EmployeeRecord::setSalary(double sal)
{
m_dSalary = sal;
//cout << "Salary = $" << m_dSalary << "\n";
//cout << endl << endl;
}
void EmployeeRecord::printRecord()
{
// Print out Employee Record
cout <<" Print Record " << endl
cout << "ID: " << m_iEmployeeID << "\t";
cout << "\tName: " << m_sLastName << " , " << m_sFirstName << "\t";
cout << "\tDept: " << m_iDeptID << "\t" << "\t";
cout << "Salary: $" << m_dSalary << "\t" << endl << endl;
}
---------------------------------------------------------------------------------
MainProgram.cpp
#include
#include "EmployeeRecord.h"
#include
using namespace std;
int main()
{
int employee_id = 100, dept_id = 42, IDNum;
char fname [32];
char lname [32];
double salary = 65000;
double salaryp;
double *p_salary ;
salaryp = 65000;
p_salary = &salaryp;
//=========================================================================EmployeeRecord Testing==========================================================================================
EmployeeRecord *Employee1 = new EmployeeRecord(dept_id, fname, lname, dept_id, salary);
Employee1->setID(employee_id);
Employee1->setName("John", "Doe");
Employee1->setDept(42);
Employee1->setSalary(salary);
IDNum = Employee1-> getID();
Employee1->getName(fname,lname);
Employee1->getDept();
Employee1->getSalary();
if(IDNum == employee_id)
//Test Successful
if((strcmp(fname, "John") == 0)&&(strcmp(lname,"Doe") == 0))
//Test Successful
if(dept_id == 42)
//Test Successful
if(*p_salary == salary)
//Test Successful
Employee1->printRecord();
Employee1->setID(456);
Employee1->setName("Jane", "Smith");
Employee1->setDept(45);
Employee1->setSalary(4000);
IDNum = Employee1-> getID();
Employee1->getName(fname,lname);
Employee1->getDept();
Employee1->getSalary();
if(IDNum == 456)
//Test Successful
if((strcmp(fname, "Jane") == 0)&&(strcmp(lname,"Smith") == 0))
//Test Successful
if(dept_id == 45)
//Test Successful
if(*p_salary == 4000)
Employee1->printRecord();
//=====================================Customer List Testing====================================
CustomerList *cl = Employee1 ->getCustomerList();
//----Testing the addStore, and printStoresInfo functions:--------------------------------------
Store *s = new Store(4567,"A Computer Store", "1111 Main St." ,"West City" ,"Alabama", "12345");
cl -> addStore(s);
cl -> printStoresInfo();
//----------------------------------------------------------------------------------------------
//---Testing the get store function:---------
Store *s = NULL;
s=cl->getStore(1234);
if((s != NULL) && (s->getStoreID() == 1234))
s = cl->getStore(9999);
if(s == NULL)
//-------------------------------------------
//---Testing updateStore Function: ----------------------------------------------------------------------
bool chk = cl->updateStore(1234, "Test Name", "1111 TestAddress", "TestCity", "TestState", "TestZip");
if(chk)
cl ->printStoresInfo();
else
cout << "updateStore test failed\n";
bool chk = cl -> updateStore(9999, "NoName", "1111 NoAddress", "NoCity", "NoState", "NoZip");
if(!chk)
cout << "updateStore negative test passed.\n";
else
cout << "updateStore negative test failed.\n";
//---------------------------------------------------------------------------------------------------------
//--Testing the removeStore function---------------
Store *s;
s = cl ->removeStore(4567);
if(s == NULL)
Store *s = cl -> removeStore(4567);
if(( s != NULL) && (s->getStoreID() == 4567))
cl -> printStoresInfo();
//------------------------------------------------
//---Testing the destructor-----------------
EmployeeRecord *e = new EmployeeRecord();
delete e;
//------------------------------------------
system ("pause");
return 0;
}
In: Computer Science
Chicago Hospital manages their emergency room (ER) registration through a check-in process. When it’s a patient’s turn, a doctor will see the patient first, then assign the patient either with a prescription (end of the process) or with admission to the hospital. Currently, there are 13 patients (per hour) in average arrive at the ER. Among them 4 patients will be admitted to the hospital. The hospital finds out that, in average, there are 1.2 people waiting to be registered, and 3.2 registered patients are waiting to see a doctor. The registration process takes 4 minutes per patient in average. Those patients who get prescription take an average of 8 minutes seeing a doctor. Those who are admitted to the hospital spend 30 minutes in average with a doctor. Assume the process is stable and the average inflow rate equals the average outflow rate. (1) On average, how long does a patient spend in the ER (from the time entering to the time leaving)? (2) On average, how many patients are being examined by doctors? (3) On average, how many patients are there in the ER?
Please write legibly!
In: Computer Science
Python please:
In: Computer Science
Write a C++ program for all the methods (Bisection, Newton-Raphson, Secant, False-Position, and Modified Secant) for locating roots. Make sure that you have clever checks in your program to be warned and stop if you have a divergent solution or stop if the solution is very slowly convergent after a maximum number of iterations.
In: Computer Science
Use this implementation of Integer node,
public class IntegerNode {
public int item;
public IntegerNode next;
public IntegerNode(int newItem) {
item = newItem;
next = null;
} // end constructor
public IntegerNode(int newItem, IntegerNode nextNode) {
item = newItem;
next = nextNode;
} // end constructor
} // end class IntegerNode
You need to implement add( ), delete( ), traverse( ) methods for an ordered linked list. And after insertion and deletion, your linked list will remain ordered.
Your code should include comments and documentation.
Testing
Here is the procedure for testing, which must be documented (a Word document is preferred, as is the use of screenshots).
In: Computer Science