A new company has three buildings and each building is more than 100 m apart from the other. A backbone network is to be installed to connect the buildings together. A fiber-optic backbone is proposed. (9 marks)
Discuss whether the following results can be achieved by this proposal.
(i) The network must operate at a speed of at least 200 Mbps (3%)
(ii) The network should be secured from eavesdropping (3%)
(iii) The budget should be less expensive than coaxial-cable (3%)
a) What is CIDR ? Why do we use classless instead of classful in ip subnetting ?
b) Describe the differences between CIDR 200.23.16.0/23 and 200.23.16.0/24
a) What are the differences between Network layer and Transport layer, in terms of logical communication.
b) Describe the definition of routing and forwarding in ip routing algorithms.
c) What is DHCP ?
You have given A and B as2 lists which may have repeated elements in respective list. Write a python function mg-L(A,B) which takes list A and B as input and returns a merged list. The function will merge the list B with A (means the list A will be expanded) such that the resultant A
still contain no duplicates. Specify input in fixed form. Use only list operations. For example if
A =[2,4,8,2,1] and B=[10,4,3,8,7] merged-list =[1,2,3,4,7,8,10]
Selected words to Uppercase
the goal of this code to get output using string methods startsWith(), endsWith() and toUpperCase()
convert uppercase if a string in wordsList starts or ends with the given myString
log the array containg the converted strings in the console
input
the first line containing an array wordsList
second line containing a string myString
output
the output should be single line containing an array with converted strings
input1
['absolute','umbrella','achivement','formula']
a
output1
['ABSOLUTE', 'UMBERELLA','ACHIVEMENT','FORMULA']
function readLine() {
return inputString[currentLine++];
}
function main() {
const wordsList = JSON.parse(readLine().replace(/'/g, '"'));
const myString = readLine();
/* Please do not modify anything above this line */
// Write your code here
}
Create a console calculator application that:
-Takes one command-line argument; your name and surname. When the program starts, display the date with a welcome message for the user
-Your calculator must include the arithmetic operations, as well as at least 5 scientific operations of the Math class. It's must also have the ability to round a number and truncate it. When you multiply by 2, Don't use the * operator to perform the operation (use shift operators). It must also be able to reverse the sign of a number.
-Includes sufficient error checking to ensure that the user only enters valid input. Make use of the String, Character and other wrapper classes
-Is able to do conversions between decimal, octal and hexadecimal numbers.
-Makes use of a menu. You should give the user the option to end the program when enters a certain option.
-Displays a message for the user, stating the current time, calculates and displays how long the user used your program, when the program exits.
Write a program to implement the following: create a class representing a
company where a company has a minimum and maximum limit of the
quantity of products. Allow the user to order from the company product
list (create a list of any ten products). Apply proper constraint if user
order more than the quantity available with the company. Based on the
quantity generate the customer bill.
Flattening & case conversion
the given code to get output using array methods flat(),map() and string methods toLowerCase() and toUpperCase().
input
the first line input is an array nestedArray
the second line input is a number depth
output
the output containing an array with words having even lengths in lowercase and odd length in uppercase
input1
['Inspector', ['ANKLE',['HIKE']],'pawn']
output2
['INSPECTOR','ANKLE', 'hike',' pawn']
function readLine() {
return inputString[currentLine++];
}
function main() {
const nestedArray = JSON.parse(readLine().replace(/'/g, '"'));
const depth = JSON.parse(readLine());
/* Please do not modify anything above this line */
// Write your code here
}
words with vowels
the goal of the code is to get output using array method filter()
input
the input will be single line containing an array wordsList
output
the output should be single line containing an array with filtered words
input1
['Sword', 'Myth', 'Patient' ,'Rhythm] output2
['Sword', 'Patient']
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const wordsList = JSON.parse(readLine().replace(/'/g, '"'));
const vowelsList = ["a", "e", "i", "o", "u"];
// Write your code here
}