C Question!
Problem: Given a day of the week (1-7 corresponding to Sunday through Saturday), the month number (1-12), and the year, determine whether that given month has five occurrences of the day of the week and display those dates.
Example Execution #1:
Enter day of week (1-7) -> 4
Enter month of the year -> 10
Enter the year -> 2019
Finding: There exists five Wednesday dates in October of 2019.
Dates: 2 9 16 23 30
Example Execution #2:
Enter day of week (1-7) -> 2
Enter month of the year -> 10
Enter the year -> 2019
Finding: There are not five Monday dates in October of 2019.
In: Computer Science
question 1) Give some advantages and
disadvantages of :
a. Stateless Address Auto configuration in IPv6 (2.5 marks)
b. Stateful Address Auto configuration in IPv6 (2.5 marks)
question 2) . (a) What is the purpose of extension
headers in IPv6? List the names of at least two extension headers
used in IPv6. [2.5 Marks]
(b) How are jumbograms used in the IPv6 environment?
(2.5 marks)
question 3) Compare and contrast the OSI
reference model with the TCP/IP networking model. Which one do you
think is more useful when working with and describing networks and
why? [5 Marks]
question 4) In the context of securing TCP/IP environment,
provide a brief discussion on typical TCP/IP attacks, exploits and
break-ins [5 Marks]
question 5) Explain the three ways, route entries are
placed in a routing table ?
In: Computer Science
Using JavaScript for the following assignment
Design and code a function named "intersection" that
takes two arrays of numbers in parameter and returns a new
array containing only the values that are both in the
two arrays. A value must not be found more than once in
the resulting array but can be found more than once in
the arrays in parameter. The order of the elements in the resulting array
must respect the order of the first parameter. For example :
intersection ([3, 1, 4, 1, 5], [2, 4, 4, 3])
must return [3, 4].
You also need to design and code a unit test function and
call it. To test that the result of
intersection ([3, 1, 4, 1, 5], [2, 4, 4, 3])
which returns [3, 4], you can use a test like this:
assert (intersection ([3, 1, 4, 1, 5], [2, 4, 4, 3]) == "3,4");
This works because the == operator does the automatic conversion
from arrays to text (if one of the two operands are a text).
In: Computer Science
Describe the OSI Model?
Describe the TCP/IP (Internet Model)?
How do you determine the cost of a system?
What are some of the application areas where a LAN can be an effective tool?
What are some of the features offered by Windows 2003/2008?
What are the advantages and disadvantages of ATM?
What are the advantages of frame relay?
What are the functions performed by a network operating system?
What are the SDLC phases?
In: Computer Science
Compare and contrast an Ethernet frame with a different layer 2 frame header. How are they different?
Compare the Cisco ISO CLI to another Cisco CLI platform. How are they similar and how are they different?
Look at an Ethernet frame and review the header. Take five items that are included in the frame header and explain their function.
In: Computer Science
Create a Packet Tracer file that completes the required steps below.
Add two Cisco 2960 switches and wire it up accordingly; use a crossover cable.
Device |
Interface |
To |
|
Switch 1 |
G0/0 |
Switch 2 |
G0/1 |
Switch 2 |
G0/1 |
Switch 1 |
G0/0 |
After you have added the switches, add the following devices and wire accordingly.
Device |
Interface |
To |
|
PC1-A |
F0 |
Switch 1 |
F0/4 |
PC1-B |
F0 |
Switch 1 |
F0/3 |
PC2-A |
F0 |
Switch 2 |
F0/4 |
PC2-B |
F0 |
Switch 2 |
F0/3 |
Configure the following information on the computers:
Device |
IP |
Subnet |
PC1-A |
10.10.0.145 |
255.255.255.0 |
PC1-B |
10.10.0.133 |
255.255.255.0 |
PC2-A |
10.10.0.243 |
255.255.255.0 |
PC2-B |
10.10.0.210 |
255.255.255.0 |
Configure the following items:
In: Computer Science
In Python: read in 'marks.txt' . The file format is one number per line. Your program will run through all these numbers, and make sure that they are valid input.
you have to Create two lists: one for valid numbers and one for invalid numbers.
For a number to be valid the number has to:
Must be less than or equal to 100
Must be greater than or equal to 0
Must not have any letters inside of it (it must be numeric -- use the string function .isnumeric())
Print out list of bad inputs, and print out average of the good inputs.
thank you
In: Computer Science
Please discuss and explain the concept of Corporate Information Security. What is it? Why is it important?
In: Computer Science
What type of misses are reduced by each of these cache optimization techniques. List all types of misses reduced for full credit. In addition, list the possible disadvantages of using the optimization technique.
•Data and instruction prefetching:
•Pipelined cache accesses:
•Higher associativity :
•Larger cache capacity:
In: Computer Science
Choose one of the following cryptography techniques and
implement it using (java )programming language. Your program should
provide the user with two options Encryption and Decryption, with a
simple UI to get the input from the user, and view the result. You
can use any restriction you need for the user input but you need to
clarify that and validate the user input base on your
restriction.
● Feistel ● Keyword columnar ● Any cryptosystem of your choice
(needs to be approved by the instructor)
In: Computer Science
python program
You are going to write a program that takes two inputs: A string representing a list of names of the following form: first name 1, last name 1, (nick name 1); first name 2, last name 2, (nick name 2); ... A string representing part of or the complete family name. You are going to output all nick names for those names where there is a partial or complete match of the family name. If no match was found you should output: Not found! Here a few examples.
Names: Chun Kit, Chui (Kit gor); Dirk, Schnieders (Dirk); Jun-fan, Lee (Bruce); Rowan Sebastian, Atkinson (Bean)
Family name: Schni
Dirk
In: Computer Science
Create a Packet Tracer file that completes the required steps below.
After you have added the switches, add the following devices and wire accordingly.
Device |
Interface |
To |
|
PC1-A |
F0 |
Switch 1 |
F0/1 |
PC1-B |
F0 |
Switch 1 |
F0/5 |
Configure the following information on the computers:
Device |
IP |
Subnet |
PC1-A |
172.16.30.3 |
255.255.255.0 |
PC1-B |
172.16.30.4 |
255.255.255.0 |
Configure the following items:
In: Computer Science
Imagine you are a student enrolled in a College course where the course grade is calculated using a weighted average. (It might not be too hard to imagine.) It’s nearing the midterm of the semester and you want to know what your grade is. Luckily, your professor has provided you with a syllabus, and in that syllabus he or she has listed the formula for calculating your course grade. (This is sounding more familiar all the time.)
Graded Activity Percentage
Exams are 30%
Projects are 30%
Assignments are 15%
Quizzes are 5%
You will notice that the weighted percentages only add up to 80% of the total grade. That’s because the final exam will represent the last 20% of your grade. That said, let’s calculate our current grade with only the grades we have SO FAR, and ignoring the final exam part. You want to write a program that asks you for all of your grades, one graded activity at a time, one grade at a time. (See the SAMPLE RUNS section below.)
You need to write a program that does this making use of the following functions:
void printPrompt(int a)
– This function accepts a single incoming integer (value 1 through 4). Depending on the value of the incoming integer the function prints out the prompt to enter grades of a certain type (quiz grades, assignment grades, exam grades, and project grades) and tells the user to enter -1 to quit. This function is only responsible for printing the prompt and accepts NO user input. It also returns nothing.
double average()
– This function takes no incoming data (no parameters), but it does receive input from the user through cin. The user enters a series of integer grades with a -1 to terminate input. It also calculates the average of all inputs entered. This average is returned as a double.
double weightedAverage(double, double, double, double)
– This function takes in four double values which represent the averages of the four types of graded activity. It calculates and returns the current weighted average, in the form of a double.
void outputAverages(double, double, double, double, double)
– This function accepts five double values: the four graded activity averages calculated before, as well as the overall weighted average. The function prints out the average of each type of grade; quiz average, assignment average, exam average, and project average, as well as the current grade in the course. It has no outgoing data (no return values).
PROVIDED SKELETON CODE:
For this assignment we have provided part of your solution for you. Specifically, we have provided a file where we have listed all the necessary function declarations as well as a main function that makes calls to these functions. DO NOT MODIFY either the function declarations OR the main function.
Your job will be to add the function definitions below the main function. A completed and
fully functional program should result if you correctly define these functions.
SAMPLE RUNS:
Sample Run 1:
Enter your quiz grades (-1 to end input):
100 95 90 85 -1
Enter your assignment grades (-1 to end input):
50 100 100 25 0 -1
Enter your exam grades (-1 to end input):
65 -1
Enter your project grades (-1 to end input):
80 93 75 -1
Your quiz average: 92.5
Your assignment average: 55
Your exam average: 65
Your project average: 82.6667
Your current grade in this course is: 71.4687
SKELETON (DO NOT MODIFY THE MAIN)
#include <iostream>
using namespace std;
//FUNCTION DECLARATIONS - ***DO NOT MODIFY***
/*name: printPrompt
INCOMING: An integer of possible values 1 through 4 indicating a specific graded
activity
OUTGOING: None
*/
void printPrompt(int);
/*name: average
INCOMING: None
OUTGOING: The double average of the integer grades as entered by the user
*/
double average();
/*name: weightedAverage
INCOMING: Four double values representing the averages for the four graded
activities
OUTGOING: The double value representing the weighted average for the course so
far (a.k.a. the current grade)
*/
double weightedAverage(double, double, double, double);
/*name: outputAverages
INCOMING: A double value representing the current grade and four double values
for four graded activity averages
OUTGOING: None
*/
void outputAverages(double, double, double, double, double);
//MAIN FUNCTION - ***DO NOT MODIFY***
int main(){
double quizAvg, assignAvg, examAvg, projAvg, currentGrade;
int count = 1;
while (count<=4){
printPrompt(count);
switch(count){
case 1:
//1 - getting the quiz grades
quizAvg = average();
break;
case 2:
//2 - getting the assignment grades
assignAvg = average();
break;
case 3:
//3 - getting exam grades
examAvg = average();
break;
case 4:
//4 - getting project grades
projAvg = average();
break;
}
count++;
}
//get the current grade, based on the different averages and their weights.
currentGrade = weightedAverage(quizAvg, assignAvg, examAvg, projAvg);
outputAverages(currentGrade, quizAvg, assignAvg, examAvg, projAvg);
}
//END MAIN FUNCTION
//**--YOUR WORK HERE--**
//**PLACE YOUR FUNCTION DEFINITIONS (a.k.a. IMPLEMENTATIONS) BELOW**
In: Computer Science
The following relations are part of a school database:
STUDENT(STUD#, STUD_NAME, MAJOR, YEAR, GPA)
TEACHER(FACULTY#, DEPT, TEACHERNAME)
ENROLLMENT(STUD#, COURSE#, GRADE)
RESPONSIBILITY(FACULTY#, COURSE#)
Using PROJECT, SELECT and JOIN, write the sequence of operations to answer each of the following questions:
What are the names of teachers who are responsible for courses in which students whose name is 'JONES' are enrolled?
Use relational Algebra and relational calculus for this question.
In: Computer Science
Create 512 subnets from Class A IP address range 10.*.*.*. For the first four (4) and last four (4) subnets, list the network IP address, broadcast IP address, 1st assignable IP address, and last assignable IP address. What subnet mask IP address will all devices in all subnets use?
In: Computer Science