Q. Operating systems are the most indispensable components of the software interface between users and the hardware of their computer systems. Explain.
In: Computer Science
Create a class that has a method that uses the ‘this’ keyword as the return statement. This method (called increment( ) in the class that you have just created ) increments the private integer field (private i ) in the class. In the main ( ) method, if you increment (using the ‘this’ with increment() call) four times, you should see the following display:
i is = 4
Thank You
In: Computer Science
Python to analyze weather data from a file. First, go to this Minnesota Dept. of Natural Resources web page, which displays weather data for Minneapolis on each day of the year 2000. Click the CSV link to download a file containing the data. The file is a “comma-separated values” text file of weather data. The first few lines look like this:
"Date","Maximum Temperature degrees (F)","Minimum Temperature... "2000-01-01","35.0","24.0","T","0.00","0.00" "2000-01-02","35.0","29.0","0.04","0.50","0.00" "2000-01-03","29.0","24.0","T","T","0.00"
The first line of the file contains column headings, and each of the remaining lines contain weather data for one specific day. These lines contain a date followed by the high temperature, low temperature, precipitation, snowfall, and snow depth recorded on that day. A value of “T” indicates a “trace” amount of precipitation or snowfall, which you can regard as zero.
Write some Python code to load the data from the file into one or more NumPy arrays. Then compute the following:
Compute the average high and low temperatures for each month. For example, the average high temperature for January is the average of the high temperatures for all 31 days in January.
Compute the number of days each month that received no precipitation. (Regard a “trace” amount of precipitation as zero precipitation.)
Compute the total snowfall for each month. (Again, regard a “trace” amount as no snowfall.)
Find the day that had the greatest difference between the high and low temperature for that day.
In: Computer Science
Does IPv6 provide similar functionality for DHCP, NAT, and PAT? Explain.
Does IPv6 support similar security associated with these technologies? Explain.
In: Computer Science
In: Computer Science
Make Animal an abstract class.
Using the code below:
public class Animal {
//Declaring instance variables
private int age;
private boolean RabiesVaccinationStatus;
private String name;
private String ownerName;
//Zero argumented constructor
public Animal() {
}
//Parameterized constructor
public Animal(int age, boolean rabiesVaccinationStatus, String name,
String ownerName) {
this.age = age;
RabiesVaccinationStatus = rabiesVaccinationStatus;
this.name = name;
this.ownerName = ownerName;
}
// getters and setters
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public boolean isRabiesVaccinationStatus() {
return RabiesVaccinationStatus;
}
public void setRabiesVaccinationStatus(boolean rabiesVaccinationStatus) {
RabiesVaccinationStatus = rabiesVaccinationStatus;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
//toString method is used to display the contents of an object inside it
public String toString() {
return "Age :" + age + ", Rabies Vaccination Status :"
+ RabiesVaccinationStatus + ", Name :" + name
+ ", Owner Name :" + ownerName;
}
}
// Dog.java
class Dog extends Animal {
//Declaring instance variables
private boolean distemperVaccinationStatus;
//Parameterized constructor
public Dog(boolean distemperVaccinationStatus) {
this.distemperVaccinationStatus = distemperVaccinationStatus;
}
//Parameterized constructor
public Dog(int age, boolean rabiesVaccinationStatus, String name,
String ownerName, boolean distemperVaccinationStatus) {
super(age, rabiesVaccinationStatus, name, ownerName);
this.distemperVaccinationStatus = distemperVaccinationStatus;
}
// getters and setters
public boolean isDistemperVaccinationStatus() {
return distemperVaccinationStatus;
}
public void setDistemperVaccinationStatus(boolean distemperVaccinationStatus) {
this.distemperVaccinationStatus = distemperVaccinationStatus;
}
//toString method is used to display the contents of an object inside it
public String toString() {
return "Dog :"+super.toString() + " Distemper Vaccination Status :"
+ distemperVaccinationStatus;
}
public void speak()
{
System.out.println("bark");
}
}
// Cat,.java
class Cat extends Animal {
//Declaring instance variables
private boolean felineLeukemiaVaccinationStatus;
private boolean declawedStatus;
//Parameterized constructor
public Cat(boolean felineLeukemiaVaccinationStatus, boolean declawedStatus) {
this.felineLeukemiaVaccinationStatus = felineLeukemiaVaccinationStatus;
this.declawedStatus = declawedStatus;
}
//Parameterized constructor
public Cat(int age, boolean rabiesVaccinationStatus, String name,
String ownerName, boolean felineLeukemiaVaccinationStatus,
boolean declawedStatus) {
super(age, rabiesVaccinationStatus, name, ownerName);
this.felineLeukemiaVaccinationStatus = felineLeukemiaVaccinationStatus;
this.declawedStatus = declawedStatus;
}
// getters and setters
public boolean isFelineLeukemiaVaccinationStatus() {
return felineLeukemiaVaccinationStatus;
}
public void setFelineLeukemiaVaccinationStatus(
boolean felineLeukemiaVaccinationStatus) {
this.felineLeukemiaVaccinationStatus = felineLeukemiaVaccinationStatus;
}
public boolean isDeclawedStatus() {
return declawedStatus;
}
public void setDeclawedStatus(boolean declawedStatus) {
this.declawedStatus = declawedStatus;
}
//toString method is used to display the contents of an object inside it
public String toString() {
return "Cat :"+super.toString() + " Feline Leukemia Vaccination Status :"
+ felineLeukemiaVaccinationStatus + ", Declawed Status :"
+ declawedStatus;
}
public void speak()
{
System.out.println("Meow");
}
}In: Computer Science
Which clauses in the Software Engineering Code of Ethics are upheld by a whistleblower (check all that apply)
- "Respect confidentiality"
- "Only use property in unauthorized ways"
- "Help create an environment supporting ethical
conduct".
- "Discloses actual/potential dangers".
From the Software Engineering Code of Ethics, which clauses relate to intellectual property (check all that apply)
- "Identify, document, collect evidence and report to the client
or the employer promptly if, in their opinion, a project is likely
to fail, to prove too expensive, to violate intellectual property
law, or otherwise to be problematic."
- "Ensure that there is a fair agreement concerning ownership of
any software, processes, research, writing, or other intellectual
property to which a software engineer has
contributed."
- "Not knowingly use software that is obtained or retained either
illegally or unethically."
- "Disclose to all concerned parties those conflicts of interest
that cannot reasonably be avoided or escaped."
In: Computer Science
What command(s) is/are required to restore a flashed backup of the IOS
In: Computer Science
Add the operation Insert to the linkedListClass. An Insert operation inserts a new item after a given key in the linked list. The method headline can be void Insert(int item, int key), where the first parameter is the new item, and the second parameter is the key of the item before the new item.
In: Computer Science
3. Write a program that will accept only 5 numbers from 50 to 100. The program should remind the user if an inputted number is not on the range. Compute the sum and average of the 1st and the 5th inputted numbers.
In: Computer Science
Program: Drawing a half arrow
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height, arrow base width, and arrow head width.
(1) Modify the given program to use a loop to output an arrow base of height arrowBaseHeight. (1 pt)
(2) Modify the given program to use a loop to output an arrow base of width arrowBaseWidth. Use a nested loop in which the inner loop draws the *’s, and the outer loop iterates a number of times equal to the height of the arrow base. (1 pt)
(3) Modify the given program to use a loop to output an arrow head of width arrowHeadWidth. Use a nested loop in which the inner loop draws the *’s, and the outer loop iterates a number of times equal to the height of the arrow head. (2 pts)
(4) Modify the given program to only accept an arrow head width that is larger than the arrow base width. Use a loop to continue prompting the user for an arrow head width until the value is larger than the arrow base width. (1 pt)
while (arrowHeadWidth <= arrowBaseWidth) {
// Prompt user for a valid arrow head value
}
Example output for arrowBaseHeight = 5, arrowBaseWidth = 2, and arrowHeadWidth = 4:
Enter arrow base height: 5 Enter arrow base width: 2 Enter arrow head width: 4 ** ** ** ** ** **** *** ** *
In: Computer Science
5.24 (Diamond Printing Program) Write an application that prints the following diamond shape. You may use output statements that print a single asterisk (*), a single space or a single new- line character. Maximize your use of repetition (with nested for statements), and minimize the number of output statements."
Example for 2.24:
*
***
*****
*******
*********
*******
*****
***
*
In: Computer Science
Need these written in Java script please
Problem 1:
Given an array A[0 ... n-1], where each element of the array represents a vote in the election. Assume that each vote is given as integers representing the ID of the chosen candidate. Write the code determining who wins the election.
Problem 2:
How do we find the number which appeared maximum number of times in an array?
In: Computer Science
PLEASE CREATE A PROGRAM IN PSEUDOCODE AND C#
Back in my Day! Kids who grew up in the late 70s didn’t have a lot of options for video games, but they did have “Choose your own Adventure” books. These books were cool and let the reader make meaningful decisions. If they chose choice “A”, they would turn to a page of the book and continue their adventure. If they chose choice “B”, they would turn to a different page and read a different adventure. Your task is to design (pseudocode) and implement (source code) for a story that has four different outcomes based on two different user inputs. See appendix for checking string equality.
Sample run 1:
It is a dark and stormy night. Do you want to take an umbrella? (Y/N): Y
Good - you have an umbrella.
You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your umbrella or run? ((F)ight/(R)un): F
You take out your umbrella and jab it into the wolf's paw! It runs away and you live another day.
Sample run 2:
It is a dark and stormy night. Do you want to take an umbrella? (Y/N): Y
Good - you have an umbrella.
You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your umbrella or run? ((F)ight/(R)un): R
You begin running so fast, the umbrella opens and you fly away like Mary Poppins. You're a little embarrassed, but you see the wolf fading off in the distance.
Sample run 3:
It is a dark and stormy night. Do you want to take an umbrella? (Y/N): N
You decide not to take an umbrella.
You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your hands or run? ((F)ight/(R)un): F
You begin fighting the wolf only to realize you had just eaten a McGrease® meal earlier. You fall dead from rigorous exercise, having had a heart attack.
Sample run 4:
It is a dark and stormy night. Do you want to take an umbrella? (Y/N): N
You decide not to take an umbrella.
You start to walk down a path and hear a scream. You realize that the person screaming is YOU because you see a wolf! Do you fight with your hands or run? ((F)ight/(R)un): R
Are you serious? You can't outrun a wolf! The wolf catches you and you are somewhat relieved because you don't have to worry about that Calculus exam…
In: Computer Science
What is the proper way to define an assembly code in in-line assembler x86 for this case:
multiplication without using mul/imul, using hexadecimal numbers for "shl" instruction.
In: Computer Science