13. List and define the three different regimes that protect intellectual property rights.
14. List and describe the principal causes of system quality problems.
15. Name and describe four quality-of-life impacts of computers and information systems.
In: Computer Science
The MyLinkedList class is a one-way directional linked list that enables one-way traversal of the list. Modify the Node class to add the new field name previous to refer to the previous node in the list, as follows:
public class Node {
E element;
Node next;
Node previous;
public Node(E o) {
element = o;
}
}
Implement a new class named MyTwoWayLinkedList that uses a doubly linked list to store elements.
Hint. The MyLinkedList class in the text extends MyAbstractList. You may define MyTwoWayLinkedList to extend the java.util.AbstractSequentialList class. You need to implement the methods listIterator() and listIterator(int index). Both return an instance of java.util.ListIterator. The former sets the cursor to the head of the list and the latter to the element at the specified index.
In: Computer Science
Objective: Learning linked list.
Problem Specification:
An employer would like to maintain a linked list for employees, the data stored is
·An employee number (a positive integer)
·A yearly salary (a float).
·Number of dependents (a short positive integer)
The employer would like you as the programmer to design and implement a linked list using classes. For each class two files are needed, one to define the class, the other to implement the methods. In addition, the client uses a menu driven program with options to handle choices (methods). The methods are:
·Insert: Which inserts elements at the beginning of the list, which is the most recent input is at the beginning of the list.
·Remove: which deletes the last element in the list.
·Display: its purpose is to display the list but needs the assistance of a Print function.
·Print: a recursive function that prints all the elements of the list, first to last.
·Clear: a recursive function that deletes every Node from the list and leaves the list empty.
Requirements:
·Define a class Node containing the employee’s data and a pointer to the next Node.
·Define the necessary functions to access, instantiate, and set the data in the class Node.
·Define a class LinkedList that has only one data member, a pointer to a Node, and the necessary member functions in addition to the member functions above.
Grading criteria:
10 points Sufficient comments including specifications
5 points Menu is used to display options and calls methods.
5 points Guards are used.
10 points Insert performs it task correctly.
10 points Remove performs it task correctly.
10 points Display performs it task correctly.
10 points print is recursive and performs it task correctly.
10 points Clear performs it task correctly in a recursive manner.
10 points UML class diagrams are submitted and each is correct.
15 points Program runs correctly and performs its task correctly.
5 points test run is handed-in and demonstrates all activities.
Submission Details:
Submit a print-out of:
·The source program
·Demonstration of all activities.
In: Computer Science
def largest_rectangle_in_matrix(matrix: List[List[int]]) ->
int:
"""
Returns the area of the largest rectangle in <matrix>.
The area of a rectangle is defined as the number of 1's that it contains.
Again, you MUST make use of
<largest_rectangle_at_position> here. If you
managed to code largest_rectangle_at_position correctly, this
function
should be very easy to implement.
Similarly, do not modify the input matrix.
Precondition:
<matrix> will only contain the integers 1 and 0.
>>> case1 = [[1, 0, 1, 0, 0],
... [1, 0, 1, 1, 1],
... [1, 1, 1, 1, 1],
... [1, 0, 0, 1, 0]]
>>> largest_rectangle_in_matrix(case1)
6
"""
pass
In: Computer Science
Linked List:
Complete the following code to create a linked list from an Array. After creating the list, display the elements of the linked list iteratively.
Write two others function called as RDisplayTailRecursion(first) and RDisplayTailRecursion(first) which will print elements of the linked list using the tail and head recursions respectively.
#include <stdio.h>
#include <stdlib.h>
struct Node
{
}*first=NULL;
void create(int A[], int n)
{
for(i=1; i<n; i++)
{
}
}
void Display(struct Node*p)
{
while(p!=NULL)
{
}
}
void RDisplayTailRecursion (struct Node*p)
{
if(p!=NULL)
{
}
}
void RDisplayHeadRecursion (struct Node*p)
{
if(p!=NULL)
{
}
}
int main()
{
struct Node *temp;
int A[] = {3,5,7,10,25,8,32,2};
create(A,8);
Display(first);
printf("\n");
RDisplayTailRecursion(first);
RDisplayTailRecursion(first);
return 0;
}
In: Computer Science
Using C++, Create a singly Linked List of patients list so that you can sort and search the list by last 4 digits of the patient's Social Security number. Implement Node insertion, deletion, update and display functionality in the Linked List.
Each patient's record or node should have the following data:
Patient Name:
Age:
Last 4 digits of Social Security Number:
The program should first display a menu that gives the user the option to:
1) Add a Patient's record (After adding one patient the user should be prompted: Do you want to add another patient's record? 1 for Yes and 0 for No)
2) Modify a Patient's record ((After modifying/updating one patient the user should be prompted: Do you want to add modify patient's record? 1 for Yes and 0 for No)
3) Delete a Patient's Record ((After deleting one patient the user should be prompted: Do you want to delete another patient's record? 1 for Yes and 0 for No)
4) Display a Patient's record
In: Computer Science
In: Operations Management
The List method addAll(i,c) inserts all elements of the Collection c into the list at position i. (The add(i,x) method is a special case where c = {x}.) Explain why, for the data structures in this chapter, it is not efficient to implement addAll(i,c) by repeated calls to add(i,x). Design and implement a more efficient implementation.
In: Computer Science
What do you (the students) see as your future engineering professional responsibilities in relation to preserving or protecting the environment?
In: Civil Engineering
Students should consider focusing on CAGE framework to study
the
Cultural, Administrative, Geographic and Economic between Oman and
UK
In: Economics