Answer:
d. fullName="Harris, Ray"
Explanation:
// here we define two variables firstName="Ray" and lastName= "Harris"
var firstName = "Ray", lastName = "Harris";
// then we create another variable fullName and assign it the value stored in variabl lastName that is "Harris"
var fullName = lastName;
// then we added a coma and space. At this point fullName= Harris,
fullName += ", ";
// then we added firstName to the variable fullName. At this point fullName=Harris, Roy
fullName += firstName;
Note: the += operator means that add the variable on the left by an amount on the right
a+= b; or a = a + b; both mean same
Answer:
The answer is below
Explanation:
1. Lack of password enforcement
2. Outdated third party applications: this includes outdated software such as Apache, PHP, MySQL, OpenSSL, and VNC
3. General lack of patch management for the OS
4. General lack of system hardening:
5. Lack of backups
Ways to hardened the Linux/Unix based computer system is do the following:
1. Perform minimal Installation: this involves, installing softwares that are necessary, and limiting the number of admin users on the computer system.
2. Carry out Code Auditing: this is a means of preventing security issues, by withing more secure softwares to prevent variable declarations, or otherwise unexpected logic.
3. Ensure there is a Traffic filter firewall: this will helps to attacks from external users or hackers. Install, Web Applicatio firewall, which helps to filter out traffic.
4. Carry out Softwares updates: a software update can help prevent or guide against security leaks in a software
5. Install security updates only: this is done by filtering out the security-related programs and only upgrade packages which are referred to in the custom file.
def __init__(self,size,idNum,color ):
self.size = size
self.location = 10
self.color = color
self.idNum = idNum
def changeLocation(self,newLocation):
self.location = newLocation
manipulator
initiator
method
constructor
Answer:
The answer is a method
Explanation:
Answer:
class and self
Explanation:
class Bike:
def __init__(self, str, float):
self.color = str
self.price = float
wireless technology
television signals
telegraph cables
Answer:
Explanation:
Telephone lines
var N; // Text
N := 1;
document.writeln( N );
document.writeln( “ by “);
document.writeln( “N + 3”);
document.writeln( “ by “ );
document.writeln( N + 5);
Answer:
var N; // Text
N = 1;
document.write( N );
document.write(" by ");
document.write(N + 3);
document.write(" by ");
document.write(N + 8);
Explanation:
var N; // Text
N = 1;
document.write( N );
document.write(" by ");
document.write(N + 3);
document.write(" by ");
document.write(N + 8);
Answer:
The solution is provided in the explanation section.
Detailed explanation is provided using comments within the code
Explanation:
import java.util.*;
public class Main {
//The Bubble sort method
public static void bb_Sort(int[] arr) {
int n = 10; //Length of array
int temp = 0; // create a temporal variable
for(int i=0; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
// The bubble sort algorithm swaps elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
}
public static void main(String[] args) {
//declaring the array of integers
int [] array = new int[10];
//Prompt user to add elements into the array
Scanner in = new Scanner(System.in);
//Use for loop to receive all 10 elements
for(int i = 0; i<array.length; i++){
System.out.println("Enter the next array Element");
array[i] = in.nextInt();
}
//Print the array elements before bubble sort
System.out.println("The Array before bubble sort");
System.out.println(Arrays.toString(array));
//Call bubble sort method
bb_Sort(array);
System.out.println("Array After Bubble Sort");
System.out.println(Arrays.toString(array));
}
}
Answer:
Following are the program in c++ language
#include<iostream> // header file
using namespace std; // namespace
int main()
{
int n1,i; // variable declaration
cout<<"Enter Number: ";
cin>>n1; // input number
for(i=n1;i>1;i=i-2) // check the condition
{
n1 = n1-2; // decrement the value of number by -2
}
if(n1==0) // check if it is 0
cout<<"number is EVEN"<<"\n"; // print even
else
cout<<"number is ODD"<<"\n"; // print odd
return 0;
}
Output:
Enter Number: 45
number is ODD
Again run the program
Enter Number:10
number is EVEN
Explanation:
In this program, we input the number by a user in variable n1. After that, we iterate the for loop and initialize the value of a variable" i" in for loop and check the condition.
In each iteration, the variable n1 is decrement by 2 and store it n1.
Finally, check if n1==0 then it print number is EVEN otherwise it print number is ODD.