1. Design a Java CartesianPoint class for a Cartesian Point which implements both cloneable and comparable interfaces
The class should have the following private member variables:
• the x value of a point: int
• the y value of a point: int
and the class should have the following public member functions:
• default constructor which initializes the point to the origin of the Cartesian coordinate system
• explicit constructor which initializes the point to a pair of given value as (u, v) • setX() function, which sets the x value to a new value v
• setY()function, which sets the y value to a new value u
• whereX() function, which returns the x value
• whereY() function, which returns the y value
• Overrided compareTo()method: use the distance to the coordinate system’s origin for comparison
• Overrided clone() method.
Please write your complete CartesianPoint class and its testing class below
1a (35 pts) Write your complete Java code for the above Java class in CartesianPoint.java file. 1b (35 pts) In a new file named testPoint.java, write your test Java class and its main method which will do the following:
✓ create two Cartesian objects(pointOne, pointTwo), both of them with the explicit constructors;
✓ then compare the two points and output the farther away one’s x and y coordinates (test of comparable interface);
✓ next create a third CartesianPoint object pointThree which is a clone of the farther away one between the above two points, and then reset its coordinates to new x and y values and output them.
In: Computer Science
Define MIPS and MFLOPS and explain how they are related and different from each other.
In: Computer Science
1.
Select the option below that indicates a DLL MAY have been hooked
maliciously.
Hooking module: CRYPTBASE.DLL
Hooking module: combase.dll
Hooking module: <unknown>
2.
The malfind module uses certain markers to identify potential
hooks. Select all the markers that apply from the list below.
A tag of VadS
Is executable
Marked as Private (has a value of 1)
Is colored red
3.
From the list below, choose what you consider to be the MOST
important statement regarding the external hard drive used for
capturing images.
It MUST contain all of the forensic analysis software
preloaded.
It MUST be USB.
It MUST be forensically clean.
All of the answers are MOST important.
4.
In response to the threats targeting your industry, select from the
the list below all the mitigation techniques that may apply.
Creating firewall rules and intrusion detection systems.
Hardening vulnerable systems by patching and changing
configurations.
Strengthening and enforcing password and access policies.
Increased monitoring of vulnerable assets.
5.
CTI provides intelligence you can use to enhance the security of
the network by decreasing dwell time. From the list, select the
appropriate aspect of intelligence.
Actionable
Timely
Relevant
All answers are correct
6.
You are designing a Network Security Monitoring program at your
company, In order to collect network traffic flow data, you need to
utilize a device to get packets to the sensor that will not disrupt
normal business usage. What are your most reasonable options?
(select all that apply)
Layer 3 Router
Network Tap
Span Port
7.
Which is the most restrictive Access Control method?
DAC
RBAC
TBAC
8.
No matter how strong your defenses are, or what proactive steps
have been taken, eventually a motivated attacker will find a way to
get in. Select the most appropriate reason for this statement.
None of the answers are correct.
Prevention eventually fails.
The segmented network architecture is too complex to manage
effectively.
9.
Flat network designs have the following security concerns:
High cost associated with implementation.
Free flow of network traffic behind the firewall.
Single point of failure associated with the single firewall.
B & C
10.
The PCAP data format is applicable to which Network Security
Monitor data type?
Alert data.
Full Packet Capture (FPC) data.
Packet String (PSTR) data.
11.
From the list below select ALL that apply to the definition of
Threat-Centric Defense.
Question options:
Focuses on detection.
Knows that threats use different tools, tactics, and
procedures.
Analyzes every attack in a vacuum.
Relies on prevention.
Assumes universal view of all threats.
Recognizes that prevention eventually fails.
Focuses on collection.
Combines intelligence from every attack.
12.
What is the primary reason Attackers use outbound C2
connections?
Outbound connections are more likely to be allowed through the firewall than inbound connections.
Malware cannot respond to inbound connections because control of compromised systems has to be initiated by the compromised system.
Attackers cannot reach compromised systems with inbound connections.
13.
The current state of security has led us to a point where
traditional detection is no longer effective. Select the main
reason for the failure from the list below.
A vulnerability-centric defense.
Detection is mostly signature-based.
Structured threats use formal Tactics, Techniques, and Procedures (TTP).
14.
According to the Sliding Scale of Cyber Security, which of the
following is the recommended model for offense?
The Diamond Model.
None. Actually implementing security is the best defense.
15.
Which of the following should be the primary guide to network
security design?
Annual revenue projections.
The level of Business Risk an organization is willing to tolerate.
Network speed requirements.
16.
In most scenarios, which type of NSM sensor is preferable because
it allows for data analysis independent of the sensor?
Half-Cycle.
None of the answers are correct.
Full-Cycle.
In: Computer Science
Please ready a program should output Inorder Tree Traversal
without recursion and without stack!, output in ALGOL W programming
only. Thumbs down for wrong answers
Make a program to perform Heap Sort, must run in Alice programming
only. Only correct answers needed should be in given language
In: Computer Science
why we need socket programming? what its application.
In: Computer Science
Using Python programming language, write a LONG piece of code that utilizes the do while function and the switch statement, please do not make It short, thank you.
In: Computer Science
For a LinkedList in Java how do I
- Add a method named replace() that takes in two parameters (the data object to replaced, followed by the one to be inserted) that will remove the first occurrence of the item to be replaced and add the second parameter to the list. The method returns a boolean - true if the item to be replaced was found, false if not
- Add an instance method named showList() (no parameters or return value) that will extract all of the values from the list and display them in order, one per line, followed by another line displaying how many values are currently in the list. If the list is empty, display the message “The list is currently empty” instead
- Overload showList() with an integer parameter which represents how many items to display on each line. The method needs to newline after the last item no matter how many items were displayed (i.e. don’t leave the cursor hanging.)
In: Computer Science
(C++ with main to test)
2.2
Task 1
You are going to implement a variant of the standard linked list,
the circular list. The
circular linked list is a variant of the standard linked list that
wraps around so that
traversals through the list will wrap around to the beginning
instead of simply reaching
the end. This will consist of implementing two classes: cLL and
item.
2.2.1
cLL
The class is described according to the simple UML diagram
below:
2cLL<T>
-head:item<T> *
-size:int
------------------------
+cLL()
+~cLL()
+isEmpty():bool
+getSize():int
+push(newItem: item<T>*):void
+pop():item<T>*
+getMaxItem():T
+getMinItem():T
+peek(): item<T> *
+printList():void
The class variables are as follows:
• head: The head pointer for the linked list.
• size: The current size of the circular linked list. It starts at
0 and grows as the list
does.
The class methods are as follows:
• cLL: The constructor. It will set the size to 0 and initialise
head as null.
• ∼cLL: The class destructor. It will iterate through the circular
linked list and
deallocate all of the memory assigned for the items.
• isEmpty: This function returns a bool. If the circular linked
list is empty, then it
will return true. Otherwise, if it has items then it will return
false.
• getSize: This returns the current size of the circular linked
list. If the list is empty
the size should be 0.
• push: This receives a new item and adds it to the circular linked
list. It is added to
the front of the list. The front being the head of the list.
• pop: This receives, and returns, the first element in the list.
The first element is
removed from the list in the process. If the list is empty, return
null. The first
element referring to the head pointer in this case.
• peek: This function returns the first element in the list but
does not remove it, first
being the head item.
• getMaxItem: This will return the value of the item in the
circular linked list which
is the maximum for the list.
• getMinItem: This will return the value of the item in the
circular linked list which
is the minimum for the list.
3• printList: This will print out the entire list from head
onwards. Importantly, each
item is listed on one line with commas delimiting each item. For
example,
1.2,1.3,1,4,5,6
Remember to add a newline at the end.
2.2.2
item
The class is described according to the simple UML diagram
below:
item <T>
-data:T
-------------------
+item(t:T)
+~item()
+next: item*
+getData():T
The class has the following variables:
• data: A template variable that stores some piece of
information.
• next: A pointer of item type to the next item in the linked
list.
The class has the following methods:
• item: This constructor receives an argument and instantiates the
data variable with
it.
• ∼item: This is the destructor for the item class. It prints out
”Item Deleted” with
no quotation marks and a new line at the end.
• getData: This returns the data element stored in the item.
You will be allowed to use the following libraries:
cstdlib,string,iostream.
In: Computer Science
Write a shell script of the following: “A Multiple Choice Question that contains 5 questions and each question carries 2 options. Choice will be given by the students. A record file is created each time the script runs to store the answers along with the total marks obtained. The record filename that has date and timing information as well as the student name.
In: Computer Science
I need this before the end of the day and in java please :)
10.12 Lab 9
In BlueJ, create a project called Lab9
A car dealership pays their salesmen a base salary every month. However, based on how many cars they sold (qtySold) they get a percentage of their salary as a bonus. To determine the percent bonus, the company uses the following chart.
qtySold | %Bonus |
---|---|
5 or less | 0% |
More than 5 but 10 or less | 5% |
More than 10 but 15 or less | 10% |
More than 15 | 15% |
Create a class called Employee as described in the following UML
Employee |
---|
- lastName: String - qtySold: int - basePay: double |
+Employee() +Employee(name: String, qtySold: int basePay: double) +setLastName(name: String):void +setQtySold(qtySold: int):void +setBasePay(basePay: double): void +getLastName(): String +getQtySold: int +getBasePay(): double +computePercentBonus(): int +calculatePay():double |
NOTE: test methods as you implement them
Create a text file using notepad. Save the text file in your Lab9 project folder and call it empData.txt. Copy the data below into the file. Save the file.
Tetzner 7 425.85 Martin 3 530.90 Smith 20 470.45 Jones 12 389.74 Glembocki 10 412.74
Create a class called Main
import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException;
System.out.printf("%-10s%8s%10s%8s%12s%n", "Name","Qty Sold","Base Pay","%Bonus","Total Pay");
When you are done, upload the Employee class and the Main class to zybooks and submit it.
Sample Output
Name Qty Sold Base Pay %Bonus Total Pay Tetzner 7 425.85 5 447.14 Martin 3 530.90 0 530.90 Smith 20 470.45 15 541.02 Jones 12 389.74 10 428.71 Glembocki 10 412.74 5 433.38 The company paid out a total of $2381.15 this week Top seller this week sold 20 cars
In: Computer Science
In: Computer Science
Phython:
Given a string x, write a program to check if its first character is the same as its last character. If yes, the code should output "True"
In: Computer Science
Ubuntu, Linux, MacOS use one of these systems.
1a. Create a C program that forks a child process that executes the
command ‘ls’.
1b. Extend the program you created in Problem 1a such that it takes
an argument. For example, the created child process should be able
to execute the command ‘ls’ with any arbitrary single argument such
as ‘ls -l’, and ‘ls -a’.
In: Computer Science
Java Hash table,
What does the separate chaining ST look like for M=3 and the following input key, hash pairs? A,0 F,0 Z,2
In: Computer Science
Make a copy of the /etc/services file in your home folder. How many times the string “tcp” appear in the file? Provide a screen shot below:
How would you add your account to the wheel group, in the /etc/group file using a one line command? Provide a screen shot below:
In: Computer Science