For the following Paging configuration discuss what must be done
to ensure a processes address space is not violated.
Process with five pages of 2048 words.
In: Computer Science
Find the bit length of a LAN if the data rate is 1 Gbps and the medium length in meters for a communication between two stations is 200 m. Assume the propagation speed in the medium is 2 *10^8 m/s.
In: Computer Science
Objectives
Problem Specification
Skip by 7’s and 9’s
1. Generate n numbers between -100 and 100.
2. If the value is multiple of 7 or 9, replaced by *
3. Then change to new line after the multiple of 7 or 9 is appeared
Design Specification
Example:
In: Computer Science
Java Program. Please read carefully. i need the exact same output as below. if you unable to write the code according to the question, please dont do it. thanks
To the HighArray class in the highArray.java program (Listing 2.3), add the following methods:
1. getMax() that returns the value of the highest key (value) in the array without removing it from the array, or –1 if the array is empty.
2. removeMax() that removes the item with the highest key from the array.
3. reverse() method for the HighArray class to reverse the order of elements of the array.
Sample output of HighArray class once you do the above methods:
current array items: 77 99 44 55 22 88 11 0 66 33
Can't find 35
array items after delete some values: 77 44 22 88 11 66 33
the Max is 88
the array after calling max method: 77 44 22 88 11 66 33
the array after calling remove max method: 77 44 22 11 66 33
the new max is 77
the array after calling reverse method 33 66 11 22 44 77
In: Computer Science
Given an IP address and mask of 192.168.0.0 /24 (address / mask), design an IP addressing scheme that satisfies the following requirements. Network address/mask and the number of hosts for Subnets A and B will be provided by your instructor.
Subnet |
Number of Hosts |
Subnet A |
55 |
Subnet B |
25 |
The 0th subnet is used. No subnet calculators may be used. All work must be shown on the other side of this page.
Subnet A |
|||
Specification |
Student Input |
Points |
|
Number of bits in the subnet |
(5 points) |
||
IP mask (binary) |
|||
New IP mask (decimal) |
|||
Maximum number of usable subnets (including the 0th subnet) |
|||
Number of usable hosts per subnet |
|||
IP Subnet |
|||
First IP Host address |
|||
Last IP Host address |
|||
Subnet B |
|||
Specification |
Student Input |
Points |
|
Number of bits in the subnet |
(5 points) |
||
IP mask (binary) |
|||
New IP mask (decimal) |
|||
Maximum number of usable subnets (including the 0th subnet) |
|||
Number of usable hosts per subnet |
|||
IP Subnet |
|||
First IP Host address |
|||
Last IP Host address |
|||
Host computers will use the first IP address in the subnet. The network router will use the LAST network host address. The switch will use the second to the last network host address.
Write down the IP address information for each device:
Device |
IP address |
Subnet Mask |
Gateway |
Points |
PC-A |
(5 points) |
|||
R1-G0/0 |
N/A |
|||
R1-G0/1 |
N/A |
|||
S1 |
N/A |
|||
PC-B |
In: Computer Science
In java please, thank you :) For this assignment, you will continue your practice with dynamic structures. Specifically, you will be implementing a different version of a linked-list, called a Queue. Queues are very important and useful linear structures that are used in many applications. Follow the link below for a detailed description:
tutorialspoint - Queue (Links to an external site.)
The queue description above uses an array implementation for examples. As usual you will be not be using arrays, you will be using linked-lists. Specifically a singly-linked list.
Our job will be to implement the four basic queue methods which are enqueue(), dequeue(), peek() and isEmpty() as described in the tutorial mentioned above. You will not need to implement the isFull() method since we will be using linked-lists and linked-lists are theoretically never full.
For this assignment we will need to implement an uncommon version of enqueue(). In our version, if the element that is being processed is already in the queue then the element will not be enqueued and the equivalent element already in the queue will be placed at the end of the queue.
Additionally, you will be implementing a special kind of queue called a circular queue. A circular queue is a queue where the last position is connected back to the first position to make a circle. Therefore it does not have the traditional front and back data elements. It only has one data element, called rear that keeps track of the last element in the queue.
This structurally similar to a circular singly-linked list described here:
tutorialspoint - Circular Linked List (Links to an external site.)
The program's input will a single string that consists of single-character elements. You program will process each character in the string according the descriptions below. Where "->" signifies the front of the queue (blue designates input, red designates output):
ABCD (nothing will be outputted) ABCDA* B C D A
ABCD* -> A B C D
ABCD$ peek: A
ABCD#* ->
ABCD!* -> B C D
a The illegal character 'a' was encountered in the input stream.
Programming Notes:
Programming Rules:
Please use started code:
import java.util.Scanner; // Import the Scanner class
public class Homework7 {
public static void main(String[] args) {
// place your solution here
}
}
class SLLNode {
public char data;
public SLLNode next;
public SLLNode(char c) {
data = c;
next = null;
}
}
class Queue {
public SLLNode rear;
public Queue() {
// place your solution here
}
public void enqueue(char c) {
// place your solution here
}
public SLLNode dequeue() {
// place your solution here
}
public char peek() {
// place your solution here
}
public boolean isEmpty() {
// place your solution here
}
}
In: Computer Science
2.1) What is the kernel mode?
2.2) What is the user mode?
2.3) Which mode has more different instructions?
2.4) Why do we need these two modes in designing an operating system?
In: Computer Science
A byte is made up of 8 bits although a byte is rarely represented as a string of binary digits or bits. Instead, it is typically presented as a pair of hexadecimal digits where each digit represents 4 bits or half a byte or "nibble." We have been reading in hex digits and outputting their decimal value, but what we really want to do is create a byte from a pair of hex digits read from input.
Create a C program that:
The printf() function supports outputting an integer as a hexadecimal number using the %x (where the hexadecimal letters are presented in lower-case) and %X (where the hexadecimal letters are presented in upper-case).
To pack two integers that have values represented with only 4 bits, you need to perform two operations with the integers:
After the shift and the OR, the first integer will not have the lower 8 bits (byte) set to the values represented by the two characters read from input.
In: Computer Science
Write a program that uses a two dimensional array to store the highest and lowest temperatures for each month of the calendar year. The temperatures will be entered at the keyboard. This program must output the average high, average low, and highest and lowest temperatures of the year. The results will be printed on the console. The program must include the following methods:
Directions
In: Computer Science
According to NIST 800-61 r2, Incident response teams should use which staffing model?
All Employees |
||
Partially outsourced and partially employees |
||
All Outsourced |
||
Any of the above |
In: Computer Science
Write a C++ program that :
1. Allow the user to enter the size of the matrix such as N. N must be an integer that is >= 2 and < 11.
2. Create an vector of size N x N.
3. Call a function to do the following : Populate the vector with N2 distinct random numbers. Display the created array.
4. Call a function to determines whether the numbers in n x n vector satisfy the perfect matrix property. Look at the sample run for the exact output
5. Repeat steps 1 - 4 until the user terminates the program.
The program needs a main and 2 functions
In: Computer Science
FOR JAVA: Need to write a code for the implementation of this public static method: findLongestPalindrome takes a Scanner scn as its parameter and returns a String. It returns the longest token from scn that is a palindrome (if one exists) or the empty string (otherwise). (Implementation note: You'll find your isPalindrome method helpful here. This method calls for an optimization loop.)
In: Computer Science
Explain the difference between Arrays and ArrayList. What are the limitation of arrays? How many primitive data types Java have? Please list them out and list the corresponding wrapper classes for each type. What is the different between String class and StringBuilder class?
In: Computer Science
C++, Java, Python. Assume we have two sequences of values S1 containing 1, 5, 3, 6, 7, 8 while S2 containing 2, 5, 6, 9, 7. We’d store these two sequences as sets and performance set intersection and set difference. Write C++, Java, Python codes to do that respectively. Compare and contrast the readability and writability.
In: Computer Science
Please use Java language! with as much as comment! thanks!
Write a program that displays a frame with a three labels and three textfields. The labels should be "width:", "height:", and "title:" and should each be followed by one textfield. The texfields should be initialized with default values (Example 400, 600, default title), but should be edited by the user. There should be a button (label it whatever you want, I don't care). If you click the button, a new frame should become visible that has the title and dimensions the user entered in the textfields on the first frame (or the default values, if the user did not enter anything).
Use JPanels and the EXIT_ON_CLOSE statement. Give the first panel some proper dimensions using the setSize method.
In: Computer Science