Design an FIR filter using the fixed window-based method. Use the following high pass filter requirements:
δp = 0.2 dB
δs = − 30 dB
fs = 3000 Hz
f p = 5000 Hz
The sampling frequency is 10000 Hz
Select the optimal fixed window type for the calculations. Present the number of coefficients and the coefficient values of the impulse response of the specified filter
In: Computer Science
Fix the following codes in JAVA so they can work :
public class GeometricObject {
private String color = "white";
private boolean filled;
private java.util.Date dateCreated;
public GeometricObject1() {
dateCreated = new java.util.Date();
}
public GeometricObject1(String Color, boolean filled) {
dateCreated = new java.util.Date();
this.color = color;
this.filled = filled;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public boolean isFilled() {
return filled;
}
public void setFilled(boolean filled) {
this.filled = filled;
}
public java.util.Date getDateCreated() {
return dateCreated;
}
public String toString() {
return "created on " + dateCreated + "\ncolor: " + color +
" and filled: " + filled;
}
}
public class Rectangle extends GeometricObject {
private double width;
private double height;
public Rectangle1() {
}
public Rectangle(double width, double height) {
this.width = width;
this.height = height;
}
public Rectangle(double width, double height, String color,
boolean filled) {
this.width = width;
this.height = height;
setColor(color);
setFilled(filled);
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public double getArea() {
return width * height;
}
public double getPerimeter() {
return 2 * (width + height);
}
}
public class TestCircleRectangle {
public static void main(String[] args) {
Circle4 circle = new Circle4(1);
System.out.println("A circle " + circle.toString());
System.out.println("The radius is " + circle.getRadius());
System.out.println("The area is " + circle.getArea());
System.out.println("The diameter is " +
circle.getDiameter());
Rectangle1 rectangle = new Rectangle(2, 4);
System.out.println("\nA rectangle " + rectangle.toString());
System.out.println("The area is " + rectangle.getArea());
System.out.println("The perimeter is " +
rectangle.getPerimeter());
}
}
public class Rectangle extends GeometricObject {
private double width;
private double height;
public Rectangle1() {
}
public Rectangle(double width, double height) {
this.width = width;
this.height = height;
}
public Rectangle(double width, double height, String color,
boolean filled) {
this.width = width;
this.height = height;
setColor(color);
setFilled(filled);
}
public double getWidth() {
return width;
}
public void setWidth(double width) {
this.width = width;
}
public double getHeight() {
return height;
}
public void setHeight(double height) {
this.height = height;
}
public double getArea() {
return width * height;
}
public double getPerimeter() {
return 2 * (width + height);
}
}
public class TestCircleRectangle {
public static void main(String[] args) {
Circle4 circle = new Circle4(1);
System.out.println("A circle " + circle.toString());
System.out.println("The radius is " + circle.getRadius());
System.out.println("The area is " + circle.getArea());
System.out.println("The diameter is " +
circle.getDiameter());
Rectangle1 rectangle = new Rectangle(2, 4);
System.out.println("\nA rectangle " + rectangle.toString());
System.out.println("The area is " + rectangle.getArea());
System.out.println("The perimeter is " +
rectangle.getPerimeter());
}
}
public class Circle4 extends GeometricObject {
private double radius;
public Circle4() {
}
public Circle4(double radius) {
super();
this.radius = radius;
}
public Circle4(double radius, String color, boolean filled) {
super(color, filled);
this.radius = radius;
//setColor(color);
//setFilled(filled);
}
public double getRadius() {
return radius;
}
public void setRadius(double radius) {
this.radius = radius;
}
public double getArea() {
return radius * radius * Math.PI;
}
public double getDiameter() {
return 2 * radius;
}
public double getPerimeter() {
return 2 * radius * Math.PI;
}
public void printCircle() {
System.out.println(toString() + "The circle is created " +
getDateCreated() +
" and the radius is " + radius);
}
public String toString() {
return "Circle WWWW " + getColor() + super.toString();
}
}
In: Computer Science
Pick three security concerns of database system and explain how you would address them.
In: Computer Science
1. Please convert the following decimal numbers to 8-bit binary sign magnitude and to 8-bit 2’s complement. Please show your work if there are multiple steps. Sign Magnitude 2’s complement a. +67 b. +40 c. -28 d. -40
In: Computer Science
Set the random number Pythonlist to variable x and write the code according to the items below.
(1)Write a code to find the second largest element among List x Element.
(ex.x=[4,4,2,1]->2,x=[5,4,3,1]-4)4)
(2)Write a code to find elements that appear only once in a while.
(ex.x=[4,4,2,1]->[2,1],x=[5,4,3,1]=>[5,4,3,1])
(3)Write a code that generates a list of the frequency of elements for each element of Listx.
(ex.x=[4,4,2,1]->y=[2,2,2,1,1],x=[5,4,3,1]->y=[1,1,1,1])
(4)Write a code to find the value that comes to the center of the list in descending order among the listx members. (*If the number of lists is even, suggest the average value of the two values that come to the center.)
(ex.x=[4,4,2,1]->3=(4+2)/2,x=[5,4,2,1,0]->2)
I am currently using Python and I am a beginner of Python. Tell me the detailed code for the questions (1), (2), (3) and (4).
In: Computer Science
To address database failure (if the system crashes), what type of redundancy would you recommend to address this?
In: Computer Science
if (M <= N + 3 && (C == ‘N’ || C == ‘n’))
C = ‘0’;
else
C = ‘1’;
Assume that M and N are 32-bit signed integer variables, and C is an 8-bit ASCII character variable. All variables are stored in memory, and all general-purpose registers are available for use.
In: Computer Science
how to write a function that clears every pixel and sets it to the Red color. similarly, we have to open the image including height and width and use while loop that accesses each pixel in Python
In: Computer Science
In: Computer Science
C++ Heap Tree: Make a program called "priority_queue" that has the following operations using a heap and simulating a prioritized row of integers with higher priority value.
It has to include the following on the code:
push
Description: Add data to prioritized row
Entry: An integer, which you want to add to the prioritized row
Exit: Nothing
Precondition: n is an integer
Postcondition: The prioritized row contains new data.
pop -
Description: Remove the data with the highest priority from the prioritized row
Entry: Nothing
Exit: Nothing
Precondition: That the prioritized row contains at least 1
data.
Postcondition: The prioritized row is left without the data with
the highest priority
top
Description: Returns the value of the data that is with the highest priority in the prioritized row.
Entry: Nothing
Output: The data that has the highest priority within the
prioritized row
Precondition: That the prioritized row contains at least 1
data.
Postcondition: Nothing
empty
Description: Returns a boolean value saying if the prioritized row is empty or has data.
Entry:Nothing
Output: A boolean value that tells whether the prioritized row is
empty or has data.
Precondition: Nothing.
Postcondition: Nothing
size
Description: Returns the amount of data that the prioritized row has
Entry :Nothing
Output :An integer value representing the amount of data in the
prioritized row
Precondition: Nothing.
Postcondition: Nothing
It has to include the next class header(obligatory):
#ifndef MYHEAP_H
#define MYHEAP_H
class MyHeap{
private:
int* values; //where the HEAP values are going to be saved
int size; //Represents how many values the Heap has stored
public:
MyHeap(); //Initialize the attributes. The values attribute initializes it as an empty array size 7
void push(int
n); // Insert a value in the heap. Only when the new value does not
fit in the array
// grow the array to size 2 * n + 1. (Dynamic expansion of the
array)
// That is, if you already have the arrangement with 7 values and
you want to insert another value (The 8th)
// then the array is grown to size 15, the first 7 values of the
original array are copied
// and the 8th value is inserted.
void pop(); //A value is removed from the heap. It is never necessary to decrease the size of the array.
int top(); //Return who is the next element to exit but without deleting it
bool isEmpty(); //returns true if the heap is empty otherwise returns false
int length(); //returns how many elements the heap is storing
};
#endif
In: Computer Science
In this lab, I want you to take in a numeric grade as an integer and then print a letter grade per the table below:
90 or above is an A
80 or above is a B
70 or above is a C
60 or above is a D
Below a 60 is an F
You must use a branching statement that prints the appropriate letter grade based on the user input2. Please comment your code
In: Computer Science
After the Coronavirus affected the whole world, the grading system of Schrute University, like many universities, has changed. At Schrute University, unlike other universities, the letter grades students can receive are restricted to A, B, C, D, F, U (Unsatisfactory), and S (Satisfactory). After the final letter grades for undergraduate courses At Schrute University are determined, students are allowed to select one of the options as follows:
Under no circumstances, the student cannot choose a higher or lower grade than the letter grade he/she has received (such as choosing B while receiving C or vice-versa).
, you will implement a C++ program that calculates the course grade of a Schrute University
After the inputs are received, the program will allow the student to get the grade he/she wants but if the grade he/she wants to get is valid within the framework of the above-given conditions. Otherwise, the program terminates the program by stating the reason why the student could not get the desired grade as an error message.
You may implement your algorithm all in the main function, i.e. you are not expected to write any user-defined functions, but of course, you can write some, if you prefer to do so.
The prompts of the input statements to be used have to be exactly the same as the prompts of the "Sample Runs".
At the beginning of your program, the user will be prompted to enter his/her name as the first input. The name of the user should be displayed whenever appropriate in the prompts and the output text. Please see the "Sample Runs" section for some examples.
After the user enters his/her name, (s)he will be asked to provide his/her processed course name. The name of the course should be displayed whenever appropriate in the prompts and the output text. Please see the "Sample Runs" section for some examples.
After the user enters his/her course name, (s)he will be asked if the student has already taken the course they want to process. The user's answer to this question can be "YES" or "NO" only. If there is an answer other than these, the program will give the necessary error message and close the program. Please see the "Sample Runs" section for some examples.
If the student's answer is YES, the program will ask for the grade the student has received from the course currently processed and the student will choose from those grades (A, B, C, D, F). After that, if the student has chosen one of the passing grades (A, B, C, D), the program will ask if the student wants to convert that grade to S. If the student got an F, the program will ask if the student wants to change the grade to U. In both cases, if the student gives an invalid answer other than (A, B, C, D, F) or response other than (YES, NO), the program will display the required error message and terminate the program. Please see the "Sample Runs" section for some examples.
If a student has received “U” the previous semester and got one of (A, B, C, D) in the current semester, students cannot choose other than “S” or current letter grade. In other cases, the program should output the following message:
“Invalid grade selection. If you have received U before, you may choose “S” or current letter grade.”
If a student has received an “S” previous semester and, got an “F” current semester, If a student chooses other than “F”, then the program should output:
“Invalid grade selection, If you have received S before and fail this semester, you get F.”
If a student has received an “F” previous semester and, got an “F” current semester, If a student chooses other than “F”, the program should output :
“Invalid grade selection, If you have received F before and fail this semester, you get F.”
Again, under no circumstances, the student cannot choose a higher or lower grade than the letter grade he/she has received (such as choosing B while receiving C or vice-versa). Also, students unable to choose U if he/she got a grade among
(A, B, C, D) and unable to choose S if he/she got an F. If the student violates any of these situations, the program should give the following output:
“Invalid grade selection. You cannot choose a higher or lower grade than you deserve.”
If the student enters a letter grade that is different than (A, B, C, D, F, S, or U), your program should give the following output:
“Invalid grade selection. Goodbye…”
Finally, if the grade the student wants to get is valid within the framework of the above-mentioned rules, the program should give the following output:
“Dwight, your final grade for CS201 is C. Goodbye…”
Sample Run 1
Welcome to the Fall 2020-2021 Semester grading system. What is your name? John
Hello John! Please enter the name of the course to be processed: CS201
Hello John! If you take the CS201 for the first time, enter YES otherwise NO: ok
Press any key to continue . . .
Sample Run 2
Welcome to the Fall 2020-2021 Semester grading system. What is your name? jane
Hello jane! Please enter the name of the course to be processed: Cs201
Hello jane! If you take the Cs201 for the first time, enter YES otherwise NO: no
Press any key to continue . . .
Sample Run 3
Welcome to the Fall 2020-2021 Semester grading system. What is your name? jane
Hello jane! Please enter the name of the course to be processed: Cs204
Hello jane! If you take the Cs204 for the first time, enter YES otherwise NO: YES
What is your grade from (A,B,C,D,F)? E
Invalid grade selection. Goodbye...
Press any key to continue . . .
Sample Run 4
Welcome to the Fall 2020-2021 Semester grading system. What is your name? Jane
Hello Jane! Please enter the name of the course to be processed: Cs204
Hello Jane! If you take the Cs204 for the first time, enter YES otherwise NO: YES
What is your grade from (A,B,C,D,F)? A
Do you want to switch your grade from A to S (YES or NO)? no
Invalid grade selection. Goodbye...
Press any key to continue . . .
Sample Run 5
Welcome to the Fall 2020-2021 Semester grading system. What is your name? Dila
Hello Dila! Please enter the name of the course to be processed: Cs201
Hello Dila! If you take the Cs201 for the first time, enter YES otherwise NO: YES
What is your grade from (A,B,C,D,F)? B
Do you want to switch your grade from B to S (YES or NO)? YES
Dila, your final grade for Cs201 is S. Goodbye...
Press any key to continue . . .
Sample Run 6
Welcome to the Fall 2020-2021 Semester grading system. What is your name? Dila
Hello Dila! Please enter the name of the course to be processed: Cs201
Hello Dila! If you take the Cs201 for the first time, enter YES otherwise NO: YES
What is your grade from (A,B,C,D,F)? F
Do you want to switch your grade from F to U (YES or NO)? YES
Dila, your final grade for Cs201 is U. Goodbye...
Press any key to continue . . .
Sample Run 7
Welcome to the Fall 2020-2021 Semester grading system. What is your name? Furkan
Hello Furkan! Please enter the name of the course to be processed: Cs404
Hello Furkan! If you take the Cs404 for the first time, enter YES otherwise NO: NO
Please enter your previous grade from (A,B,C,D,F,S,U): C
Please enter your current grade from (A,B,C,D,F): G
Invalid grade selection. Goodbye...
Press any key to continue . . .
Sample Run 8
Welcome to the Fall 2020-2021 Semester grading system. What is your name? FURKAN
Hello FURKAN! Please enter the name of the course to be processed: CS201
Hello FURKAN! If you take the CS201 for the first time, enter YES otherwise NO: NO
Please enter your previous grade from (A,B,C,D,F,S,U): A
Please enter your current grade from (A,B,C,D,F): C
Please enter the grade you want to choose from (A,B,C,D,F,S,U): C
FURKAN, your final grade for CS201 is C. Goodbye...
Press any key to continue . . .
Sample Run 9
Welcome to the Fall 2020-2021 Semester grading system. What is your name? FURKAN
Hello FURKAN! Please enter the name of the course to be processed: CS201
Hello FURKAN! If you take the CS201 for the first time, enter YES otherwise NO: NO
Please enter your previous grade from (A,B,C,D,F,S,U): A
Please enter your current grade from (A,B,C,D,F): C
Please enter the grade you want to choose from (A,B,C,D,F,S,U): S
FURKAN, your final grade for CS201 is S. Goodbye...
Press any key to continue . . .
Sample Run 10
Welcome to the Fall 2020-2021 Semester grading system. What is your name? FURKAN
Hello FURKAN! Please enter the name of the course to be processed: CS201
Hello FURKAN! If you take the CS201 for the first time, enter YES otherwise NO: NO
Please enter your previous grade from (A,B,C,D,F,S,U): A
Please enter your current grade from (A,B,C,D,F): C
Please enter the grade you want to choose from (A,B,C,D,F,S,U): U
Invalid grade selection. You cannot choose a higher or lower grade than you deserve.
Press any key to continue . . .
In: Computer Science
Considering the scenario of a business organization, explain in detail how the organization could apply four different types of measures to ensure that employees can prevent unauthorized access to the internal organizational network؟
In: Computer Science
2. Many statistical tests for outliers were developed in an environment in which a few hundred observations was a large data set. With this question, we discuss the limitations of such approaches.
(a) For a set of 1,000,000 values, how many outliers we would have according to the test that says a value is an outlier if it is more than three standard deviations from the average? (Assume a normal distribution.)
(b) Does the approach that states an outlier is an object of unusually low probability need to be adjusted when dealing with large data sets? If so, how?
In: Computer Science
Suppose your method does not return a value. Which of the following is true?
Group of answer choices:
A - You write no word for the return type.
B - Your return type should be void.
C - You write none as the return type.
D - You write public as the return type.
In: Computer Science