Answer:
Costs will cover a need for more customer data. The further explanation is given below.
Explanation:
It's the greatest problem for almost every company to provide the data with security. This is possible for highly trained practitioners and the technical staff to take charge of it. Complicated technologies would have been going to run together again to withstand these types of jobs.Such problems play a major part in the decision-making process affecting the law enforcement authorities to locate the suspects to strengthen the organization.To do something like this, there seem to be a lot of other good initiatives out there doing it.There have been some cases in which major corporations have chosen not to include law enforcement:
There are many more electronic corruption going on, including money robbery, asset fraud, as well as machine assaults. In such a bigger case, numerous institutions, such as large-scale ones, have gone through these circumstances to evaluate law enforcement to come to terms with cybersecurity.Write a function named file_stats that takes one string parameter (in_file) that is the name of an existing text file. The function file_stats should calculate three statistics about in_file i.e. the number of lines it contains, the number of words and the number of characters, and print the three statistics on separate lines.
For example, the following would be be correct input and output. (Hint: the number of characters may vary depending on what platform you are working.)
>>> file_stats('created_equal.txt')
lines 2
words 13
characters 72
Answer:
Here is the Python program.
characters = 0
words = 0
lines = 0
def file_stats(in_file):
global lines, words, characters
with open(in_file, 'r') as file:
for line in file:
lines = lines + 1
totalwords = line.split()
words = words + len(totalwords)
for word in totalwords:
characters= characters + len(word)
file_stats('created_equal.txt')
print("Number of lines: {0}".format(lines))
print("Number of words: {0}".format(words))
print("Number of chars: {0}".format(characters))
Explanation:
The program first initializes three variables to 0 which are: words, lines and characters.
The method file_stats() takes in_file as a parameter. in_file is the name of the existing text file.
In this method the keyword global is used to read and modify the variables words, lines and characters inside the function.
open() function is used to open the file. It has two parameters: file name and mode 'r' which represents the mode of the file to be opened. Here 'r' means the file is to be opened in read mode.
For loop is used which moves through each line in the text file and counts the number of lines by incrementing the line variable by 1, each time it reads the line.
split() function is used to split the each line string into a list. This split is stored in totalwords.
Next statement words = words + len(totalwords) is used to find the number of words in the text file. When the lines are split in to a list then the length of each split is found by the len() function and added to the words variable in order to find the number of words in the text file.
Next, in order to find the number of characters, for loop is used. The loop moves through each word in the list totalwords and split each word in the totalwords list using split() method. This makes a list of each character in every word of the text file. This calculates the number of characters in each word. Each word split is added to the character and stored in character variable.
file_stats('created_equal.txt') statement calls the file_stats() method and passes a file name of the text file created_equal.txt as an argument to this method. The last three print() statements display the number of lines, words and characters in the created_equal.txt text file.
The program along with its output is attached.
You have observed that Alexander Rocco Corporation uses Alika’s Cleaning Company for its janitorial services. The company’s floors are vacuumed and mopped each night, and the trash is collected in large bins placed outside for pickup on Tuesdays and Fridays. You decide to visit the dumpster Thursday evening after the cleaning crew leaves. Wearing surgical gloves and carrying a large plastic sheet, you place as much of the trash on the sheet as possible. Sorting through the material, you find the following items: a company phone directory; a Windows NT training kit; 23 outdated Oracle magazines; notes that appear to be programs written in HTML, containing links to a SQL Server database; 15 company memos from key employees; food wrappers; an empty bottle of expensive vodka; torn copies of several resumes; an unopened box of new business cards; and an old pair of women’s running shoes. Based on this information, write a two-page report explaining the relevance these items have. What recommendations, if any, might you give to Alexander Rocco management?
Answer:
Explanation:
Relevance of Thrown Items:
The thrown items mainly consist of the Windows NT training kit, outdated magazines and some written notes, etc. All these things can be used in the company for training the fresh talent. These things must be used for the purpose of training fresh people and the things like programs written in HTML must not be dumped like this because they consists of the raw code which can be harmful if gotten into wrong hands. Hence, the information like this must be taken care of seriously as these can be loopholes into companies down. Rest of the things like food wrappers, empty bottles, resume copies are all worthless to the company and can be thrown into the dump as soon as possible.The business cards must also be thrown if not important.Recommendation To Management:
The management must take these things seriously and must double check the company properties before throwing them into dump. There must be a committe build to check the things that are been going directly to the dump. They must have the responsibility for checking the things before going to the dump and must filter all the important things from the garbage back to the shelves of the office.Hence, these things must be taken care of so that no harm is to be done to the company.cheers i hope this helped !!
Alejandra is using a flash drive that a friend gave to her to copy some financial records from the company database so she can complete a department presentation at home. She does not realize that the flash drive is infected with a virus that enables a malicious hacker to take control of her computer. This is a potential __________ to the confidentiality of the data in the files
Answer:
maybe threat?
Explanation:
Which of the following is an example of joint problem solving?
Explanation:
There is a high degree of informality to these relationships, which are focused on information sharing, joint-problem solving and joint operations.
A hallmark of most of these processes is their informality, whether through information sharing, joint problem solving or joint operations.
Global joint problem-solving team. In addition to requesting a division of labour, the Global Task Team recommendations called upon the World Health Organization (WHO), UNICEF, the United Nations Population Fund (UNFPA), the United Nations Development Programme (UNDP), the World Bank, the UNAIDS Secretariat and the Global Fund to take the lead in and establish the joint United Nations system-Global Fund problem-solving team by July # in order to support efforts that address implementation bottlenecks at the country level
Write a class called Triangle that can be used to represent a triangle. It should include the following methods that return boolean values indicating if the particular property holds: a. isRight (a right triangle) b. isScalene (no two sides are the same length) c. isIsosceles (exactly two sides are the same length) d. isEquilateral (all three sides are the same length).
Answer:
Explanation:
import java.io.*;
class Triangle
{
private double side1, side2, side3; // the length of the sides of
// the triangle.
//---------------------------------------------------------------
// constructor
//
// input : the length of the three sides of the triangle.
//---------------------------------------------------------------
public Triangle(double side1, double side2, double side3)
{
this.side1 = side1;
this.side2 = side2;
this.side3 = side3;
}
//---------------------------------------------------------------
// isRight
//
// returns : true if and only if this triangle is a right triangle.
//---------------------------------------------------------------
boolean isRight()
{
double square1 = side1*side1;
double square2 = side2*side2;
double square3 = side3*side3;
if ((square1 == square2 + square3) ||
(square2 == square1 + square3) ||
(square3 == square1 + square2))
return true;
else
return false;
}
// isValid
// returns : true if and only if this triangle is a valid triangle.
boolean isValid()
{
if ((side1 + side2 < side3) ||
(side1 + side3 < side2) ||
(side2 + side3 < side1))
return false;
else
return true;
}
// isEquilateral
//
// returns : true if and only if all three sides of this triangle
// are of the same length.
boolean isEquilateral()
{
if (side1 == side2 && side2 == side3)
return true;
else
return false;
}
// isIsosceles
//
// returns : true if and only if exactly two sides of this triangle
// has the same length.
boolean isIsosceles()
{
if ((side1 == side2 && side2 != side3) ||
(side1 == side3 && side2 != side3) ||
(side2 == side3 && side1 != side3))
return true;
else
return false;
}
// isIsosceles
// returns : true if and only if exactly no two sides of this
// triangle has the same length.
boolean isScalene()
{
if (side1 == side2 || side2 == side3 || side1 == side3)
return false;
else
return true;
}
}
//-------------------------------------------------------------------
// class Application
//
// This class is the main class of this application. It prompts
// the user for input to construct a triangle, then prints out
// the special properties of the triangle.
//-------------------------------------------------------------------
public class Application
{
//---------------------------------------------------------------
// getInput
//
// input : stdin - BufferedReader to read input from
// msg - message to prompt the user with
// returns : a double value input by user, guranteed to be
// greater than zero.
//---------------------------------------------------------------
private static double getInput(BufferedReader stdin, String msg)
throws IOException
{
System.out.print(msg);
double input = Double.valueOf(stdin.readLine()).doubleValue();
while (input <= 0) {
System.out.println("ERROR : length of the side of triangle must " +
"be a positive number.");
System.out.print(msg);
input = Double.valueOf(stdin.readLine()).doubleValue();
}
return input;
}
//---------------------------------------------------------------
// printProperties
//
// input : triangle - a Triangle object
// print out the properties of this triangle.
//---------------------------------------------------------------
private static void printProperties(Triangle triangle)
{
// We first check if this is a valid triangle. If not
// we simply returns.
if (!triangle.isValid()) {
System.out.println("This is not a valid triangle.");
return;
}
// Check for right/equilateral/isosceles/scalene triangles
// Note that a triangle can be both right triangle and isosceles
// or both right triangle and scalene.
if (triangle.isRight())
System.out.println("This is a right triangle.");
if (triangle.isEquilateral())
System.out.println("This is an equilateral triangle.");
else if (triangle.isIsosceles())
System.out.println("This is an isosceles triangle.");
else
// we do not need to call isScalene here because a triangle
// is either equilateral/isosceles or scalene.
System.out.println("This is an scalene triangle.");
}
// main
// Get the length of the sides of a triangle from user, then
// print out the properties of the triangle.
public static void main(String args[]) throws IOException
{
BufferedReader stdin = new BufferedReader
(new InputStreamReader(System.in));
double side1 = getInput(stdin,
"What is the length of the first side of your triangle? ");
double side2 = getInput(stdin,
"What is the length of the second side of your triangle? ");
double side3 = getInput(stdin,
"What is the length of the third side of your triangle? ");
System.out.print("Pondering...\n");
printProperties(new Triangle(side1, side2, side3));
}
}
web pages with personal or biograpic information are called
Answer:
Web pages with personal or biographic information are called. a. Social Networking sites. c.
Explanation:
It's inventiveness, uncertainty futuristic ideas typically deal with science and technology.what is it?
Answer:
Engineering and Science
Explanation:
The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a victim large sums of money for assisting them in secretly moving large sums of money.
a. True
b. False
Answer:
b. False
Explanation:
The system of fraud is called 4-1-9 scam. And yes, victims are always promised large sum of money to secretly help in moving a large sum of money.
The Fast Freight Shipping Company charges the following rates for different package weights:
2 pounds or less: $1.50
over 2 pounds but not more than 6 pounds: $3.00
over 6 pounds but not more than 10 pounds: $4.00
over 10 pounds: $4.75
Write a program that asks the user to enter the weight of a package and then displays the shipping charges. The program should also do "Input Validation" that only takes positive input values and show a message "invalid input value!" otherwise.
Answer:
import java.util.Scanner;
public class ShippingCharge
{
static double wt_2=1.50;
static double wt_6=3;
static double wt_10=4;
static double wt_more=4.75;
static double charge;
static double weight;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
do
{
System.out.print("Enter the weight of the package: ");
weight = sc.nextDouble();
if(weight<=0)
System.out.println("Invalid input value!");
}while(weight<=0);
if(weight<=2)
charge=wt_2;
else if(weight<=6 && weight>2)
charge=wt_6;
else if(weight<=10 && weight>6)
charge=wt_10;
else
charge=wt_more;
System.out.println("Shipping charges for the entered weight are $"+charge);
}
}
OUTPUT
Enter the weight of the package: 0
Invalid input value!
Enter the weight of the package: 4
Shipping charges for the entered weight are $3.0
Explanation:
1. The variables to hold all the shipping charges are declared as double and initialized.
static double wt_2=1.50;
static double wt_6=3;
static double wt_10=4;
static double wt_more=4.75;
2. The variable to hold the user input is declared as double.
static double charge;
static double weight;
3. The variable to hold the final shipping charge is also declared as double.
4. Inside main(), an object of Scanner class is created. This is not declared static since declared inside a static method, main().
Scanner sc = new Scanner(System.in);
5. Inside do-while loop, user input is taken until a valid value is entered.
6. Outside the loop, the final shipping charge is computed using multiple if-else statements.
7. The final shipping charge is then displayed to the user.
8. All the code is written inside class since java is a purely object-oriented language.
9. The object of the class is not created since only a single class is involved.
10. The class having the main() method is declared public.
11. The program is saved with the same name as that of the class having the main() method.
12. The program will be saved as ShippingCharge.java.
13. All the variables are declared as static since they are declared outside main(), at the class level.
Write a loop that sets each array element to the sum of itself and the next element, except for the last element which stays the same. Be careful not to index beyond the last element. Ex:
Initial scores: 10, 20, 30, 40
Scores after the loop: 30, 50, 70, 40
The first element is 30 or 10 + 20, the second element is 50 or 20 + 30, and the third element is 70 or 30 + 40. The last element remains the same.
SAMPLE OUTPUT:
#include
int main(void) {
const int SCORES_SIZE = 4;
int bonusScores[SCORES_SIZE];
int i = 0;
bonusScores[0] = 10;
bonusScores[1] = 20;
bonusScores[2] = 30;
bonusScores[3] = 40;
/* Your solution goes here */
for (i = 0; i < SCORES_SIZE; ++i) {
printf("%d ", bonusScores[i]);
}
printf("\n");
return 0;
}
Answer:
Replace /* Your solution goes here */ with the following lines of code
for(i = 0;i<SCORES_SIZE-1;i++)
{
bonusScores[i]+=bonusScores[i+1];
}
Explanation:
The above iteration starts from the index element (element at 0) and stops at the second to the last element (last - 1).
Using an iterative variable, i
It adds the current element (element at i) with the next element; element at i + 1.
The full code becomes
#include<iostream>
using namespace std;
int main(void) {
const int SCORES_SIZE = 4;
int bonusScores[SCORES_SIZE];
int i = 0;
bonusScores[0] = 10;
bonusScores[1] = 20;
bonusScores[2] = 30;
bonusScores[3] = 40;
for(i = 0;i<SCORES_SIZE-1;i++)
{
bonusScores[i]+=bonusScores[i+1];
}
/* Your solution goes here */
for (i = 0; i < SCORES_SIZE; ++i) {
printf("%d ", bonusScores[i]);
}
printf("\n");
return 0;
}
See attachment for .cpp file
Answer:int main() {
const int SCORES_SIZE = 4;
int bonusScores[SCORES_SIZE];
int i;
for (i = 0; i < SCORES_SIZE; ++i) {
cin >> bonusScores[i];
}
for (i = 0; i < SCORES_SIZE-1; ++i){
bonusScores[i] += bonusScores[i+1];
}
for (i = 0; i < SCORES_SIZE; ++i) {
cout << bonusScores[i] << " ";
}
cout << endl;
return 0;
}
Explanation: SCORES_SIZE -1 will prevent the for loop from going past the last value in the array. bonusScores[i] += will add the value of bonusScores[i+1] to the original bonusScores[i].
for example, i = 1; 1 < SCORES_SIZE - 1 ; bonusScores[1] += bonusScores[1+1} becomes{ bonusScores[1] + bonusScores{2];
import java.util.Scanner; public class ArraySum { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); final int NUM_ELEMENTS = 8; // Number of elements int[] userVals = new int[NUM_ELEMENTS]; // User numbers int i = 0; // Loop index int sumVal = 0; // For computing sum // Prompt user to populate array System.out.println("Enter " + NUM_ELEMENTS + " integer values..."); for (i = 0; i < NUM_ELEMENTS; ++i) { System.out.print("Value: "); userVals[i] = scnr.nextInt(); } // Determine sum sumVal = 0; for (i = 0; i < NUM_ELEMENTS; ++i) { sumVal = sumVal + userVals[i]; } System.out.println("Sum: " + sumVal); return; } }
Answer:
There's nothing wrong with the question you posted except that it's not well presented or arranged.
When properly formatted, the program will be error free and it'll run properly.
The programming language used in the question is Java programming lamguage.
in java, the sign ";" signifies the end of each line and lines that begins with // represent comments. Using this understanding of end of lines and comments, the formatted code goes thus
import java.util.Scanner;
public class Arraysum {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
final int NUM_ELEMENTS = 8;
// Number of elements
int[] userVals = new int[NUM_ELEMENTS];
// User numbers
int i = 0;
// Loop index
int sumVal = 0;
// For computing sum
// Prompt user to populate array
System.out.println("Enter " + NUM_ELEMENTS + " integer values...");
for (i = 0; i < NUM_ELEMENTS; ++i) {
System.out.print("Value: ");
userVals[i] = scnr.nextInt();
}
// Determine sum
sumVal = 0;
for (i = 0; i < NUM_ELEMENTS; ++i)
{
sumVal = sumVal + userVals[i];
}
System.out.println("Sum: " + sumVal); return;
}
}
Also, see attachment for source file
The beginning of a free space bitmap looks like this after the disk partition is first formatted: 1000 0000 0000 0000 0000 0000 0000 0000 (the first block is used by the root directory). The system always searches for free blocks starting at the lowest numbered block, so after writing file A, which uses 8 blocks, the bitmap looks like this 1111 1111 1000 0000 0000 0000 0000 0000. Show the bitmap after each of the following actions: (a) File B is written, using 12 blocks (b) File C is written, using 7 blocks (c) File A is deleted (d) File B is deleted (e) File D is written, using 6 blocks (f) File E is written, using 9 blocks Show all steps.
The bitmap is 1110 0000 0001 0000 after some use. The system always looks for free blocks beginning using a contiguous allocation technique.
What is a bitmap?After some use, the new bitmap is 1110 0000 0001 0000. The system employs a contiguous allocation mechanism and starts searching for free blocks at the position.
(a) File B is made up of five blocks, 1111 1111 1111 0000.
b) The batch number 1000 0001 1111 0000 deletes File A.
c) Eight blocks are used for writing in file C.
1111 1111 1111 1100
File B is deleted (d). 1111 1110 0000 1100
Free-space bitmaps are one method used by some file systems to keep track of allocated sectors. Even though the most fundamental implementation of free-space bitmaps is incredibly wasteful, some modern file systems use complex or hybrid versions of them.
Therefore, after some use, the bitmap is 1110 0000 0001 0000. The contiguous allocation strategy is always used by the system to look for free blocks to start with.
To learn more about bitmap, refer to the link:
https://brainly.com/question/26230407
#SPJ2
For the PSoC chip what is the minimum voltage level in volts that can be considered to logic one?
Answer:
Asian man the man is one 1⃣ in a and the perimeters are not only
Assume passwords are selected from four character combinations of 26 lower case alphabetic characters. Assume an adversary is able to attempt passwords at a rate of 1 per second. Assuming feedback to the adversary flagging an error as each incorrect character is entered, what is the expected time to discover the correct password
Answer:
Given:
Passwords are selected from 4 characters.
Character combinations are 26 lower case alphabetic characters.
Passwords attempts by adversary is at rate of 1 second.
To find:
Expected time to discover the correct password
Explanation:
Solution:
4 character combinations of 26 alphabetic characters at the rate of one attempt at every 1 second = 26 * 4 = 104
So 104 seconds is the time to discover the correct password. However this is the worst case scenario when adversary has to go through every possible combination. An average time or expected time to discover the correct password is:
13 * 4 = 52
You can also write it as 104 / 2 = 52 to discover the correct password. This is when at least half of the password attempts seem to be correct.
What password did the boss gave to the man?
Answer:
1947
Explanation:
because i dont know
Answer:
where is the password?
Explanation:
Describe and list advantages and disadvantages of each of the following backup types:
full, differential, incremental, selective, CPD, and cloud.
Answer:
Full back up
It creates complete copy of the source of data. This feature made it to the best back up with good speed of recovery of the data and simplicity.However, because it is needed for backing up of a lot of data, it is time consuming process,Besides it also disturbs the routine application of the technologist infrastructure. In addition large capacity storage is needed for the storage of the large volume of back up with each new creation.
Incremental back up: back up work at high speed thus saves time, Little storage capacity is needed. This type of back up can be run as many time as wished.
However, the restoration of data takes time, due to the time spent for restoration of initial back up and the incremental.
Differential Back up has very fast back up operation, because it only requires two pieces of back up.This is however slower compare to the Incremental.
The selective back up enable selection of certain type of file or folders for back up.
it can only be used to back up folders only when important data are needed only.Thus the storage capacity is low.
CPD eliminates back up window and reduces the recovery point objective.However, it has issue of compatibility with the resources to back up.,it is also expensive because its solutions are disk based.
Cloud based is affordable and save cost,It is easier to access. it is efficient,it can be access remotely for convenience.
However, Internet sources and some bandwidth must be available for access., always depends on third party providers,There is also problems encountered when switching providers.
Explanation:
Seth would like to make sure as many interested customers as possible are seeing his business’s website displayed in their search results. What are a few things he could pay attention to in order to achieve this?
Answer:
Hi! Make sure that the website has a few things. Proper Keywords, the pages have the proper tags, a form on the website, contact information, CIty State, Etc., Then a phone number. Social media icons that link properly to the social media pages.
Explanation:
The following are reasons why many organizations are trying to reduce and right-size their information foot-print by using data governance techniques like data cleansing and de-duplication:
A. None of the above
B. reduce risk of systems failures due to overloading
C. improve data quality and reduce redundancies, reduce increased and staggering storage management costs,
D. Both A and B
Answer:
C. improve data quality and reduce redundancies, reduce increased and staggering storage management costs
Explanation:
Excess data retention can lead to retention of redundant and irrelevant data, which can reduce data handling and processing efficiency, while at the same time increasing the cost of data storage and management. This can be curbed be reducing data to the right size by using data governance techniques like data cleansing and de-duplication
8) Which of the following statements is FALSE?
1) You will likely need to use a combination of both popular and scholarly resources in your research
2) The CRAAP test can be used to help evaluate all of your sources
3) Academic journal articles are always unbiased in their analysis
4) Popular resources tend to be easier to read than scholarly articles
Answer:
3) Academic journal articles are always unbiased in their analysis.
Explanation:
The Academic journals are not always unbiased. There can be some authors which may write in some situation and bias the articles. It is important to analyse source and reliability of the article before relying on it. An unbiased author will try to capture picture fairly. The unbiased author presents the facts as it is and does not manipulates the truth.
Maya wrote a program and forgot to put the steps in the correct order. Which step does Maya need to review? Pattern following Planning Segmenting Sequencing
Answer:
Sequencing
Explanation:
Answer:
SEQUENCING
Explanation:
Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements using rand() to print two random integers between (and including) 0 and 9. End with a newline. Ex: 5 7 Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activity. Also, after calling srand() once, do not call srand() again. (Notes)
GIVEN:
#include
#include // Enables use of rand()
#include // Enables use of time()
int main(void) {
int seedVal = 0;
/* Your solution goes here */
return 0;
}
2). Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
101
133
Note: For this activity, using one statement may yield different output (due to the compiler calling rand() in a different order). Use two statements for this activity. Also, srand() has already been called; do not call srand() again.
GIVEN:
#include
#include // Enables use of rand()
#include // Enables use of time()
int main(void) {
int seedVal = 0;
seedVal = 4;
srand(seedVal);
/* Your solution goes here */
return 0;
}
Answer:
1. The solution to question 1 is as follows;
srand(seedVal);
cout<<rand()%10<<endl;
cout<<rand()%10<<endl;
2. The solution to question 2 is as follows
cout<<100+rand()%50 <<endl;
cout<<100+rand()%50 <<endl;
Explanation:
The general syntax to generate random number between interval is
Random Number = Lower Limit + rand() % (Upper Limit - Lower Limit + 1)
In 1;
The solution starts by calling srand(seedVal);
The next two statements is explained as follows
To print two random integers between intervals of 0 and 9 using rand()"
Here, the lower limit = 0
the upper limit = 9
By substituting these values in the formula above; the random number will be generated as thus;
Random Number = 0 + rand() % (9 - 0 + 1)
Random Number = 0 + rand() % (10)
Random Number = rand() % (10)
So, the instruction to generate the two random variables is rand() % (10)
2.
Similar to 1 above
To print two random integers between intervals of 100 and 149 using rand()"
Here, the lower limit = 100
upper limit = 149
By substituting these values in the formula above; the random number will be generated as thus;
Random Number = 100 + rand() % (149 - 100 + 1)
Random Number = 100 + rand() % (50)
So, the instruction to generate the two random variables is 100 + rand() % (50)
If you were required to give a speech identifying the risks of using computers and digital devices, which group of items would you include?
Camera and Mic
These 2 things are the most likely things to get you in trouble. Unless you have a 100% protected device, and honestly even if you do, cover up the camera and close your mic. This will definitely save you later.
Write a Java program that reads from the user four grades between 0 and 100. The program the, on separate ines, prints out the entered grades followed by the highest grade, lowest grade, and averages of all four grades. Make sure to properly label your output. Use escape characters to line up the outputs after the labels.
Answer:
import java.util.*;
public class Grade {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double[] grades = new double[4];
for (int i=0; i<4; i++){
System.out.print("Enter a grade: ");
grades[i] = input.nextDouble();
}
double lowest = grades[0];
double highest = grades[0];
double total = 0;
for (int i=0; i<4; i++){
System.out.println("Grade " + (i+1) + " is: " + grades[i]);
if(grades[i] >= highest)
highest = grades[i];
if(grades[i] <= lowest)
lowest = grades[i];
total += grades[i];
}
double average = total/4;
System.out.println("The highest grade is: " + highest);
System.out.println("The lowest grade is: " + lowest);
System.out.println("The average is: " + average);
}
}
Explanation:
Ask the user for the grades and put them in the grades array using a for loop
Create another for loop. Inside the loop, print the grades. Find highest and lowest grades in the grades array using if-structure. Also, add each grade to the total.
When the loop is done, calculate the average, divide the total by 4.
Print the highest grade, lowest grade and average.
A(n) _____ element, as described by the World Wide Web Consortium (W3C), is an element that "represents a section of a page that consists of content that is tangentially related to the content around that element, and which could be considered separate from that content."
Answer:
B. Aside element
Explanation:
The options for this question are missing, the options are:
A. article element
B. aside element
C. section element
D. content element
An aside element is defined as a section of a page that has content that is tangentially related to the content around the element. In other words, the aside element represents content that is indirectly related to the main content of the page. Therefore, we can say that the correct answer to this question is B. Aside element.
Given the array [13, 1, 3, 2, 8, 21, 5, 1] suppose we choose the pivot to be 1 the second element in the array. Which of the following would be valid partitions?
A. 1 [1, 2, 3, 5, 8, 13, 21]
B. 1 [13, 1, 3, 2, 8, 21, 5]
C. 1 [13, 3, 2, 8, 21, 5, 1]
D. [1] 1 [13, 3, 2, 8, 21, 5]
E. [13] 1 [3, 2, 8, 21, 5, 1]
F. [13, 1, 3, 2, 8, 21, 5] 1 2/4
Answer:
D. [1] 1 [13, 3, 2, 8, 21, 5]
Explanation:
Using a quicksort with 1 as the pivot point, elements less than 1 will be sorted to the left of 1 and the other elements are greater than one will be sorted to the right of 1. The order doesn't matter. So we sort [1] to the left of 1 and [13, 3, 2, 8, 21, 5] to the right of 1. So, D. [1] 1 [13, 3, 2, 8, 21, 5] is the valid partition.
Advanced Sounds is engaging in a full upgrade of its Windows Server 2003 network to Windows Server 2008. The upgrade includes using Windows Server 2008 Active Directory. Advanced Sounds has pioneered many technological innovations and is very concerned about keeping its network and computer systems secure. Advanced Sounds Information Technology (IT) Department hires you to help them implement Windows Server 2008 Active Directory. Assume the following:
All email servers have been consolidated back in the New York City Complex.
Most all the other applications running on Windows Servers are distributed at all sixteen locations.
Each location at minimum has a file server, a print server and a local application server.
All locations have adequate Wide Area network connections with available capacity; 10 Mbps links
The New York location has enough network capacity to serve all 16 locations.
There are 500 people at the New Your City complex.
There are 200 people at the Quebec City location and 200 at the Montreal location.
There are 40-50 people at each outlet store.
Advanced Sounds IT Department has formed a small installation planning committee consisting of the IT server operations manager, two system programmers, the current Active Directory administrator, and you. After the first meeting they have asked you to prepare a small report to address the following questions:
A. What information is required as input to the initial installation involving Active Directory? a=
B. How many Active directory servers do you propose?
C. Where will the Active directory server(s) be located?
Answer:
cs
Explanation:
Answers must be correct. Or else it will be flagged. All of these sub parts need to be answered with step by step process showing all work and reasoning.
DISCRETE STRUCTURES:
1.a. Truth value of a propositional statement For this exercise, it is easier not to use truth tables.
1. Suppose that A → ((BAC)-D) is false. What are the truth values of A, B, C, and D?
2. Suppose that (A-B) v (CA (DAE)) → F) is false.
What are the truth values of A, B, C, D, E, and F?
1.b. Logical equivalence Prove the equivalences below without using truth tables. Instead, use the rules of logical equivalence given in class. Justify your reasoning.
1.c. Inference Formalize the following argument and show that it is valid.
If Jose took the jewellery or Mrs. Krasov lied, then a crime was committed. Mr. Krasov was not in town. If a crime was committed, then Mr. Krasov was in town. Therefore Jose did not take the jewellery
Note: The complete part of question 1b is attached as a file
Answer:
1ai) A = true, B = true, C = true, D = false
Check the attached files for the answers of the remaining parts
Explanation:
The detailed solutions of all the sections of the question are contained in the attached files
. The total processing speed of microprocessors (based on clock rate and number of circuits) is doubling roughly every year. Today, a symmetric session key needs to be 100 bits long to be considered strong. How long will a symmetric session key have to be in 30 years to be considered strong?
Answer:
130 bits
Explanation:
If the length of a key = N bits
Total number of key combinations = [tex]\frac{2^{N} }{2}[/tex]
For a key length of 100, the total number of key combinations will be [tex]\frac{2^{100} }{2} = 2^{99}[/tex] combinations. This is a whole lot and it almost seems impossible to be hacked.
The addition of one bit to the length of the symmetric key in 1 year is sufficient to make the key strong, because even at double its speed, the processor can still not crack the number of combinations that will be formed.
Therefore, if a bit is added to the key length per year, after 30 years, the length of the symmetric session key will be 130 bits.
Write the class "Tests". Ensure that it stores a student’s first name, last name, all five test scores, the average of those 5 tests’ scores and their final letter grade. (Use an array to store all test scores.)
Answer:
The following assumption will be made for this assignment;
If average score is greater than 75, the letter grade is AIf average score is between 66 and 75, the letter grade is BIf average score is between 56 and 65, the letter grade is CIf average score is between 46 and 55, the letter grade is DIf average score is between 40 and 45, the letter grade is EIf average score is lesser than 40, the letter grade is FThe program is written in Java and it uses comments to explain difficult lines. The program is as follows
import java.util.*;
public class Tests
{
public static void main(String [] args)
{
//Declare variables
Scanner input = new Scanner(System.in);
String firstname, lastname;
//Prompt user for name
System.out.print("Enter Lastname: ");
lastname = input.next();
System.out.print("Enter Firstname: ");
firstname = input.next();
char grade;
//Declare Array
int[] Scores = new int[5];
//Initialize total scores to 0
int total = 0;
//Decalare Average
double average;
//Prompt user for scores
for(int i =0;i<5;i++)
{
System.out.print("Enter Score "+(i+1)+": ");
Scores[i] = input.nextInt();
//Calculate Total Scores
total+=Scores[i];
}
//Calculate Average
average = total/5.0;
//Get Letter Grade
if(average>75)
{
grade = 'A';
}
else if(average>65)
{
grade = 'B';
}
else if(average>55)
{
grade = 'C';
}
else if(average>45)
{
grade = 'D';
}
else if(average>40)
{
grade = 'E';
}
else
{
grade = 'F';
}
//Print Student Results
System.out.print("Fullname: "+lastname+", "+firstname);
System.out.print('\n');
System.out.print("Total Scores: "+total);
System.out.print('\n');
System.out.print("Average Scores: "+average);
System.out.print('\n');
System.out.print("Grade: "+grade);
}
}
See Attachment for .java file
What are the best data structures to create the following items? And why?
1. Designing a Card Game with 52 cards.
2. Online shopping cart (Amazon, eBay, Walmart, Cosco, Safeway, ...)
3. Online waiting list (De Anza College class waiting list, ...)
4. Online Tickets (Flight tickets, concert tickets, ...)
Answer:
The best structures to create the following items are
ARRAYHASHMAPS QUEUE SORTED LINK LISTSExplanation:
The best structures to create the following items are:
Array : for the storage of cards in a card game the best data structure to be used should be the Array data structure. this is because the size of the data ( 52 cards ) is known and using Array will help with the storing of the cards values in the Game.Hashmaps : Hashmap data structure should be implemented in online shopping cart this IS BECAUSE items can be easily added or removed from the cart therefore there is a need to map the Items ID or name to its actual database online waiting list are usually organised/arranged in a first-in-first-out order and this organization is best created using the queue data structure Sorted link lists is the best data structure used to create, store and manage online tickets. the sorted link data structure helps to manage insertions and deletions of tickets in large numbers and it also reduces the stress involved in searching through a large number of tickets by keeping the tickets in sorted lists