What will be the tokens in the following statement? StringTokenizer strToken = new StringTokenizer("January 1, 2008", ", ", true);

Answers

Answer 1

Answer:

The tokens are:

January

space

1

,

space

2008

Explanation:

StringTokenizer class is basically used to break a string into tokens. The string consists of numbers, letters, quotation marks commas etc,

For example if the string is "My name is ABC" then StringTokenizer will break this string to following tokens:

My

name

is

ABC

So in the above example, the string is "January 1, 2008". It contains January with a space, then 1, then a comma, then 2008

The last comma and true in the statement do not belong to the string. They are the parameters of the StringTokenizer constructor i.e.

StringTokenizer(String str, String delim, boolean flag)

So according to the above constructor str= "January 1, 2008"

String delim is ,

boolean flag = true

So  the StringTokenizer strToken = new StringTokenizer("January 1, 2008", ", ", true); statement has:

a string January 1, 2008

a delim comma with a space (, ) which is used to tokenize  the string "January 1, 2008".

boolean flag set to true which means the delim i.e. (, ) is also considered to be a token in the string. This means the comma and space are considered to be tokens in the given string January 1, 2008.

Hence the output is January space 1 comma space 2008.

Check the attached image to see the output of the following statement.

What Will Be The Tokens In The Following Statement? StringTokenizer StrToken = New StringTokenizer("January

Related Questions

Write a flowchart and C code for a program that does the following: Within main(), it asks for the user's annual income. Within main(), it calls a function called printIt() and passes the income value to printIt(). The printIt() function evaluates the income, and if the number is over 90000, it prints a congratulatory message. If the income is not over 90000, it prints a message of encouragement, like "You WILL make $50,000, if you keep going."

Answers

Answer:

I am writing a C program:

#include <stdio.h> //to use input output functions

void printIt(double annual_in){ //function printIt

   if(annual_in >90000) //check if the income is greater than 90000

   printf("Congratulations. Doing great!"); //print this message if income value is greater than 90000

   else //if annual income is less than 90000

   printf("You WILL make $50,000, if you keep going"); } //print this message if income value is less than 90000

int main() //start of main() funciton body  

{   double income; //declares a double type variable income to hold annual income value

   printf("Enter annual income: "); //prompts user to enter annual income

   scanf("%lf",&income); //reads income value from user

   printIt(income); } // calls printIt method by passing input income to that function

     

Explanation:

The program is well explained in the comments mentioned with each statement of the program. The flowchart is attached.

First flowchart flow1 has a separate main program flowchart which reads the income and calls printIt function. A second flowchart is of prinIt() method that checks the input income passed by main function and displays the corresponding messages and return.

The second flowchart flow2 is the simple flowchart that simply gives functional description of the C program as flowchart is not where giving function definitions is important. Instead of defining the function printIt separately for this C program, a high-level representation of functional aspects of this program is described in second flowchart while not getting into implementation details.

A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.

Answers

Answer:

Threat assessment

Explanation:

A threat assessment deals with the potential for weaknesses within the existing infrastructure to be exploited.

Threat Assessment is further explained as the practice of determining or ascertaining the credibility and seriousness of a potential threat, and also the probability or chases of the threat will becoming a reality.

Threat assessment is separate to the more established procedure of violence-risk assessment, which seek to forcast an individual's general capacity and tendency to respond to situations violently. Instead, threat assessment aims to interrupt people on a route to commit "predatory or instrumental violence, the type of behavior connected with targeted attacks".

Answer:

Threat assessment

Explanation:

In an IT system, threat assessment is the analysis, evaluation and prevention of actions, events and operations that can greatly affect the system. It explores the potential for weaknesses within existing infrastructure to be exploited.

The threat assessment is a very important assessment that needs to be taken in virtually all domains. Here are a few reasons why it is important in an IT system;

i. Prevention of data loss

ii. Prevention of system or network of systems downtime

In carrying out threat assessment, one might need to do the following;

i. identification and prioritization of infrastructure including the software and hardware applications in the system.

ii. identification of potential threats such as system failure, natural disaster, unwanted access.

iii. identification of vulnerabilities in the system.

iv. analysing controls by determining who has access and who doesn't.

v. analysing the impact of a threat occurrence.

vi. documentation of analysis and evaluation results.

You have a 20-bit network part and a 4-bit subnet part. How many hosts can you have per subnet?
A) 14
B) 16
C) 254
D) none of the above

Answers

Answer:

tiddies

Explanation:

sukk

"Players The files SomePlayers.txt initially contains the names of 30 football play- ers. Write a program that deletes those players from the file whose names do not begin with a vowel."

Answers

Answer:

I am writing a Python program that deletes players from the file whose names whose names do not begin with a vowel which means their names begin with a consonant instead. Since the SomePlayers.txt is not provided so i am creating this file. You can simply use this program on your own file.

fileobj= open('SomePlayers.txt', 'r')  

player_names=[name.rstrip() for name in fileobj]  

fileobj.close()  

vowels = ('a', 'e', 'i', 'o', 'u','A','E','I','O','U')

player_names=[name for name in player_names  

                     if name[0] in vowels]

fileobj.close()

print(player_names)

Explanation:

I will explain the program line by line.

First SomePlayers.txt is opened in r mode which is read mode using open() method. fileobj is the name of the file object created to access or manipulate the SomePlayers.txt file. Next a for loop is used to move through each string in the text file and rstrip() method is used to remove white spaces from the text file and stores the names in player_names. Next the file is closed using close() method. Next vowels holds the list of characters which are vowels including both the upper and lower case vowels.

player_names=[name for name in player_names  

                     if name[0] in vowels]

This is the main line of the code. The for loop traverses through every name string in the text file SomePlayers.txt which was first stored in player_names when rstrip() method was used. Now the IF condition checks the first character of each name string. [0] is the index position of the first character of each players name. So the if condition checks if the first character of the name is a vowel or not. in keyword is used here to check if the vowel is included in the first character of every name in the file. This will separate all the names that begins with a vowel and stores in the list player_names. At the end the print statement print(player_names) displays all the names included in the player_names which begin with a vowel hence removing all those names do not begin with a vowel.

How many times will the while loop that follows be executed? var months = 5; var i = 1; while (i < months) { futureValue = futureValue * (1 + monthlyInterestRate); i = i+1; }
a. 5
b. 4
c. 6
d. 0

Answers

Answer:

I believe it is A

Explanation:

Write a Java program to get the values stored in a four-by-five array of integers and store those values in a one-dimensional array referred by the name sorted1Darray . This array will have all the numbers in increasing order (remember the bubble sort!!) !

Answers

Answer:

done

Explanation:

int a[][] = new int[4][4];

Random r = new Random();

 

for(int i=0;i<4;i++)

for(int j=0;j<4;j++)

{

a[i][j]=r.nextInt()%100;

}

 

int sorted1Darray[] = new int [16];

int k=0;

 

for(int i=0;i<4;i++)

for(int j=0;j<4;j++)

sorted1Darray[k++]=a[i][j];

 

//now sorting using bubble sort

for(int i=0;i<16;i++)

for(int j=0;j<16;j++)

if(sorted1Darray[i]<sorted1Darray[j])

{

int t= sorted1Darray[i];

sorted1Darray[i]=sorted1Darray[j];

sorted1Darray[j]=t;

}

System.out.println("Sorted array:");

for(int i=0;i<16;i++)

System.out.print(sorted1Darray[i]+" ");

System.out.println();

A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted S1, opens every locker. Then the second student, S2, begins with the second locker, denoted L2, and closes every other locker (i.e. every even numbered locker). Student S3 begins with the third locker and changes every third locker (closes it if it was open, and opens it if it was closed). Student S4 begins with locker L4 and changes every fourth locker. Student
S5 starts with L5 and changes every fifth locker, and so on, until student S100 changes L100.
After all the students have passed through the building and changed the lockers, which lockers areopen? Write a program to find your answer.
(Hint: Use an array of 100 boolean elements. each of which indicates whether a locker is open (true) or closed (false). Initially, all lockers are closed.)

Answers

Answer:

Following are the code to this question:

public class Locker //defining a class Locker

{

public static void main(String[] ax)//defining main method  

{

boolean[] locker = new boolean[101]; //defining boolean array locker that's size is 100.

int j,s1,k1,x;

x=locker.length;

for (j=1;j<x; j++)//defining loop to assigns value false in locker array

{

locker[j] = false;// assign value false

}

for (j=1;j<x; j++)//defining loop loop to assign value true in array  

{

locker[j] = true;//assign value true

}

for(s1=2; s1<x; s1++)//defining loop to count locker from 2nd place

{

for(k1=s1; k1<x; k1=k1+s1)// defining inner loop to assign value  

{

if(locker[k1]==false) //defining if block for check false value  

{

   locker[k1] = true;// if condition is true it assign value true

}

else //defining else block

{

   locker[k1] = false;//assign value false in locker array

}

}

}

for(s1=1; s1<x; s1++)//defining loop to print locker value

{

if (locker[s1] == true) //defining if block that check Locker array value is equal to true

{

System.out.println("Locker " + s1 + " Open");//print Locker value with message  

}  

}

}

}

Output:

Locker 1 Open

Locker 4 Open

Locker 9 Open

Locker 16 Open

Locker 25 Open

Locker 36 Open

Locker 49 Open

Locker 64 Open

Locker 81 Open

Locker 100 Open

Explanation:

In the above code, a class "Locker" is declared, inside the class main method is declared, in which a boolean array "locker" is declared that's size is 100, in the next line fouth integer variable " j,s1,k1, and x" is declared, in which variable x is used to hold the boolean array length value, and other variable used in the loop.

In the next step, two for loop is declared, in the first loop assign value "false" in locker array and in seconde loop it assigns the value "true".In the next step, multiple for loop it uses if block uses to check locker value equal to false then assign value true otherwise assign value false. At the last another loop is declared, that uses if block to check locker value is equal to true and print its value with the message.

k- Add the code to define a variable of type 'double', with the name 'cuboidVolume'. Calculate the volume of the cuboid and set this variable value.

Answers

Answer:

Here is the JAVA program to calculate volume of cuboid:

import java.util.Scanner; // Scanner class is used to take input from user

public class CuboidVol { // class to calculate volume of cuboid

public static void main(String[] args) { // start of main() function body

Scanner input= new Scanner(System.in); //create Scanner class object

// prompts user to enter length of cuboid

System.out.println("Enter the cuboid length:");

double length=input.nextDouble(); //reads the input length value from user

// prompts user to enter width of cuboid

System.out.println("Enter the cuboid width:");

double width=input.nextDouble(); //reads the input width from user

// prompts user to enter height of cuboid

System.out.println("Enter the cuboid height:");

double height=input.nextDouble(); //reads the input height from user

/* the following formula is to calculate volume of a cuboid by multiplying its length width and height and a double type variable cuboidVolume is defined to store the value of the resultant volume to it */

double  cuboidVolume= length*width*height; //calculates cuboid volume

//displays volume of cuboid and result is displayed up to 2 decimal places

System.out.printf("Volume of the cuboid (length " + length + "/ height " + height + "/ width" +width +" is: " + "%.2f",cuboidVolume);   } }

Explanation:

The formula for the volume of a cuboid is as following:

Volume = Length × Width ×  Height

So in order to calculate the volume of cuboid three variable are required for length, width and height and one more variable cuboidVolume to hold the resultant volume of the cuboid.

The program is well explained in the comments added to each statement of the program. The program prompts the user to enter the value of height width and length of cuboid and the nextDouble() method is used to take the double type input values of height length and width. Then the program declares a double type variable cuboidVolume to hold the result of the volume of cuboid. Then the last printf statement is used to display the volume of cuboid in the format format "Volume of the cuboid (length  / height  / width ) is" and the result is displayed up to 2 decimal places.

The screenshot of the program along with its output is attached.

How to set up a simple peer-to-peer network using a star topology?

Answers

Answer:

The description including its scenario is listed throughout the explanation section below.

Explanation:

Star topology seems to be a LAN system under which all points are connected to a single cable link location, such as with a switch as well as a hub. Put it another way, Star topology is among the most commonly used network configurations.

Throughout this configuration or setup:

Each common network setups network unit, such as a firewall, switch, as well as computer. The main network computer serves as either a server as well as the peripheral system serves as just a client.

15. The primitive data types in JavaScript are:​

Answers

Answer:

The three primitive data types in JavaScript are:

1. Numbers

2. Strings of text(known as "strings")

3. Boolean Truth Values (known as "booleans")

When you are creating a certificate, which process does the certificate authority use to guarantee the authenticity of the certificate

Answers

Answer:

Verifying digital signature

Explanation:

In order to guarantee authenticity of digital messages an documents, the certificate authority will perform the verification of the digital signature. A valid digital signature indicates that data is coming from the proper server and it has not been altered in its course.

#Write a function called "angry_file_finder" that accepts a #filename as a parameter. The function should open the file, #read it, and return True if the file contains "!" on every #line. Otherwise the function should return False. # #Hint: there are lots of ways to do this. We'd suggest using #either the readline() or readlines() methods. readline() #returns the next line in the file; readlines() returns a #list of all the lines in the file. #Write your function here!

Answers

Answer:

I am writing a Python function:

def angry_file_finder(filename):  #function definition, this function takes file name as parameter

   with open(filename, "r") as read:  #open() method is used to open the file in read mode using object read

       lines = read.readlines()  #read lines return a list of all lines in the file

       for line in lines:  #loops through each line of the file

           if not '!' in line:   #if the line does not contains exclamation mark

               return False  # returns False if a line contains no !

   return True     # returns true if the line contains exclamation mark

print(angry_file_finder("file.txt")) call angry_file_finder method by passing a text file name to it

                                                     

Explanation:

The method angry_file_finder method takes a file name as parameter. Opens that file in read mode using open() method with "r". Then it reads all the lines of the file using readline() method. The for loop iterates through these lines and check if "!" is present in the lines or not. If a line in the text file contains "!" character then function returns true else returns false.

There is a better way to write this method without using readlines() method.

def angry_file_finder(filename):

   with open(filename, "r") as file:        

       for line in file:

           if '!' not in line:  

               return False

   return True      

print(angry_file_finder("file.txt"))

Above method opens the file in read mode and just uses a for loop to iterate through each line of the file to check for ! character. The if condition in the for loop checks if ! is not present in a line of the text file. If it is not present in the line then function returns False else it returns True. This is a more efficient way to find a character in a file.

24. Which of the following statements about Emergency Support Functions (ESFs) is correct?
O A. ESFs are not exclusively federal coordinating mechanism
O B. ESFs are only a state or local coordinating mechanism
O C. ESFs are exclusively a federal coordinating mechanism
O D. ESFs are exclusively a state coordinating mechanism

Answers

(ESFs) is correct: ESFs are not exclusively federal coordinating mechanism.

#Write a function called align_right. align_right should #take two parameters: a string (a_string) and an integer #(string_length), in that order. # #The function should return the same string with spaces #added to the left so that the text is "right aligned" in a #string. The number of spaces added should make the total #string length equal string_length. # #For example: align_right("CS1301", 10) would return the #string " CS1301". Four spaces are added to the left so #"CS1301" is right-aligned and the total string length is #10. # #HINT: Remember, len(a_string) will give you the number of #characters currently in a_string.

Answers

Answer:

This program is written using Python Programming Language;

Comments are not used; however, see explanation section for detailed line by line explanation

See Attachment

Program starts here

def align_right(a_string,string_length):

     if len(a_string) > string_length:

           print(a_string)

     else:

           aligned=a_string.rjust(string_length)

           print(aligned)

   

a_string = input("Enter a string: ")

string_length = int(input("Enter string length: "))

align_right(a_string,string_length)

Explanation:

Function align_right is declared using on line

def align_right(a_string,string_length):

This line checks if the length of the current string is greater than the input length

     if len(a_string) > string_length:

If the above condition is true, the input string is printed as inputted

           print(a_string)

If otherwise,

     else:

The string is right justified using the next line

           aligned=a_string.rjust(string_length)

The aligned string is printed using the next line

           print(aligned)

   

The main function starts here

This line prompts user for a string

a_string = input("Enter a string: ")

This line prompts user for total string length

string_length = int(input("Enter string length: "))

This line calls the defined function

align_right(a_string,string_length)

Distinguish among packet filtering firewalls, stateful inspection firewalls, and proxy firewalls. A thorough answer will require at least a paragraph for each type of firewall.
Acme Corporation wants to be sure employees surfing the web aren't victimized through drive-by downloads. Which type of firewall should Acme use? Explain why your answer is correct.

Answers

Answer:

packet filtering

Explanation:

We can use a packet filtering firewall, for something like this, reasons because when visiting a site these types of firewalls should block all incoming traffic and analyze each packet, before sending it to the user. So if the packet is coming from a malicious origin, we can then drop that packet and be on our day ;D

Step1: This file contains just a program shell in which you will write all the programming statements needed to complete the program described below. Here is a sample of the current contents of areas.cpp 1 // Assignment 5 is to compute the area (s) WRITE A COMMENT BRIEFLY DESCRIBING THE PROGRAM PUT YOUR NAME HERE. 2 3 4 // INCLUDE ANY NEEDED HEADER FILES HERE 5 using namespace std;l 7 int main) 9// DEFINE THE NAMED CONSTANT PI HERE AND SET ITS VALUE TO 3.14159 10 11 // DECLARE ALL NEEDED VARIABLES HERE. GIVE EACH ONE A DESCRIPTIVE 12// NAME AND AN APPROPRIATE DATA TYPE 13 14// WRITE STATEMENTS HERE TO DISPLAY THE 4 MENU CHOICES 15 16// WRITE A STATEMENT HERE TO INPUT THE USERS MENU CHOICE 17 18// WRITE STATEMENTS TO OBTAIN ANY NEEDED INPUT INFORMATION 19// AND COMPUTE AND DISPLAY THE AREA FOR EACH VALID MENU CHOICE 20 / IF AN INVALID MENU CHOICE WAS ENTERED, AN ERROR MESSAGE SHOULD 21 /BE DISPLAYED 23 return 0 24 )
Step 2: Design and implement the areas.cpp program so that it correctly meets the program specifications given below Specifications: Sample Run Program to calculate areas of objects Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices 1 -- square 2 circle 3 - right triangle 4 - quit 1square 2 -- circle 3 -- right triangle 4quit Radius of the circle: 3.0 Area 28.2743 . If the user selects choice 1, the program should find the area of a square . If the user selects choice 2, the program should . If the user selects choice 3, the program should . If the user selects choice 4, the program should . If the user selects anything else (i.e., an invalid find the area of a circle find the area of a right triangle quit without doing anything choice) an appropriate error message should be printed

Answers

Answer & Explanation:

This program is written in C++ and it combines the step 1 and step 2 to create a menu driven program

Each line makes use of comments (as explanation)

Also, see attachment for program file

Program Starts Here

//Put Your Name Here; e.g. MrRoyal

//This program calculates the area of circle, triangle and square; depending on the user selection

//The next line include necessary header file

#include<iostream>

using namespace std;

int main()

{

//The next line defines variable pi as a constant with float datatype

const float pi = 3.14159;

// The next two lines declares all variables that'll be needed in the program

string choice;

float length, base, height, radius, area;

// The next four lines gives an instruction to the user on how to make selection

cout<<"Press 1 to calculate area of a square: "<<endl;

cout<<"Press 2 to calculate area of a circle: "<<endl;

cout<<"Press 3 to calculate area of a triangle: "<<endl;

cout<<"Press 4 to quit: "<<endl;

//This  next line prompts user for input

cout<<"Your choice: ";

//This next line gets user input and uses it to determine the next point of execution

cin>>choice;

if(choice == "1")  //If user input is 1, then the choice is area of square

{

 cout<<"Length: ";  //This line prompts user for length of the square

 cin>>length;  // This line gets the length of the square

 area = length * length;  //This line calculates the area

 cout<<"Area: "<<area;  //This line prints the calculated area

}

else if(choice == "2") //If user input is 2, then the choice is area of circle

{

 cout<<"Radius: ";  //This line prompts user for radius

 cin>>radius;  //This line gets radius of the circle

 area = pi * radius * radius;  // This line calculates the area

 cout<<"Area: "<<area;  //This line prints the calculated area

}

else if(choice == "3") //If user input is 2, then the choice is area of triangle

{

 cout<<"Base: "; //This line prompts user for base

 cin>>base;  //This line gets the base

 cout<<"Height: ";  //This line prompts user for height

 cin>>height;  //This line gets the height

 area = 0.5 * base * height;  //This line calculates the area

 cout<<"Area: "<<area;  //This line prints the calculated area

}

else if(choice == "4")  //If user input is 4, then the choice is to quit

{

 //Do nothing and quit

}

else  //Any other input is invalid

{

 cout<<"Invalid Option Selected";

}

return 0;

}

opearating system protection refers to a mechanism for controling access by programs, processes, or users to both system and user resources. briefly explain what must be done by the operating system protection mechanism in order to provide the required system protection

Answers

Answer:

The operating system must by the use of policies define access to and the use of all computer resources.

Policies are usually defined during the design of the system. These are usually default in settings. Others are defined and or modified during installation of the addon and or third-party software.

Computer Security Policies are used to exact the nature and use of an organisations computers systems. IT Policies are divided into 5 classes namely:

General PoliciesServer PoliciesVPN PoliciesBack-Up PoliciesFirewall Access and Configuration Policies

Cheers!

Design a two-thread consensus protocol for a Stack class that provides two methods: push(x) and pop(). push(x) pushes a value onto the top of the stack, and pop() removes and returns the most recently pushed value.

Answers

Answer:

D. 10, 5.

Explanation:

When discussing the behavior of vulnerability assessments which choice will exploit a weakness?
a) Penetration test
b) Vulnerability scan
c) Intrusive
d) Gray box
e) Credentialed vulnerability scan
f) Non-credentialed vulnerability scan

Answers

Answer:

a) Penetration test

Explanation:

A penetration test, often referred to as a pen test, is part of important process in the development of internet facing service. It is a process of determining if vulnerabilities are actually exploitable in a particular environment.

In other words, it is a process that involves a simulated cyber attack against computer system to check for exploitable vulnerabilities or attempts to actively exploit weaknesses in an environment.

Hence, when discussing the behavior of vulnerability assessments the choice that will exploit a weakness is PENETRATION TEST.

When discussing the behavior of vulnerability assessments, the choice which will exploit a weakness is: A) Penetration test.

Cyber security can be defined as a preventive practice to systematically protect computers, software applications (programs), networks, electronic devices, servers and user data from potential attack, damage, theft or an unauthorized access, especially through the use of technologies, frameworks, integrity principles, processes, penetration test and network engineers.

A vulnerability can be defined as a weakness in an automated internal control system and security procedures, which may be exploited by an attacker (hacker) to gain unauthorized access to the data stored on a computer system or disrupt the information system.

Basically, vulnerability assessments can be used in the following ways:

Identify loopholes, risks and security threats. Prioritize and enhance an information system.Mitigate potential security threats.

A penetration test is also referred to as pen test or ethical hacking and it can be defined as a cybersecurity technique that simulates a cyber attack against a user's computer system, so as to identify, test an check for exploitable vulnerabilities in a web software, network, etc.

This ultimately implies that, a penetration test avails an end user the ability to exploit a weakness and potential security threats during vulnerability assessments.

Write a sentinel-controlled while loop that accumulates a set of integer test scores input by the user until negative 99 is entered.

Answers

Answer:

Here is the sentinel-controlled while loop:

#include <iostream> //to use input output functions

using namespace std; // to identify objects like cin cout

int main(){ // start of main() function body

int test_score; // declare an integer variable for test scores

//prompts user to enter test scores and type-99 to stop entering scores

cout << "Enter the test scores (enter -99 to stop): ";

cin >> test_score; // reads test scores from user

while (test_score != -99){ // while loop keeps executing until user enters -99

cin >> test_score; } } // keeps taking and reading test scores from user

Explanation:

while loop in the above chunk of code keeps taking input scores from user until -99 is entered. Sentinel-controlled loops keep repeating until a sentinel value is entered. This sentinel value indicates the end of the data entry such as here the sentinel value is -99 which stops the while loop from iterating and taking the test score input from user.

The complete question is that the code should then report how many scores were  entered and the average of these scores. Do not count the end sentinel -99 as a score.

So the program that takes input scores and computes the number of scores entered and average of these scores is given below.

#include <iostream>  // to use input output functions

using namespace std;  // to identify objects like cin cout

int main(){  //start of main function body

double sum = 0.0;  // declares sum variable to hold the sum of test scores

int test_score,count =0;  

/* declares test_scores variable to hold the test scores entered by user and count variable to count how many test scores input by user */

cout << "Enter the test scores (or -99 to stop: ";

//prompts user to enter test scores and type-99 to stop entering scores

cin >> test_score;  // reads test scores from user

while (test_score != -99){  // while loop keeps executing until user enters -99

count++;  /* increments count variable each time a test cores is input by user to count the number of times user entered test scores */

sum = sum + test_score;  // adds the test scores

cin >> test_score;}  // reads test scores from user

if (count == 0)  // if user enters no test score displays the following message

cout << "No score entered by the user" << endl;

else  //if user enters test scores

//displays the numbers of times test scores are entered by user

cout<<"The number of test scores entered: "<<count;

/* displays average of test scores by dividing the sum of input test scores with the total number of input test scores */

cout << "\n The average of " << count << " test scores: " <<sum / count << endl;}

The program along with its output is attached.

All of the following are examples of being computer literate, EXCEPT ________. knowing how to use the web efficiently knowing how to build and program computers knowing how to avoid hackers and viruses knowing how to maintain and troubleshoot your computer

Answers

Answer:knowing how to build and program computers.

Explanation:

In e-mail, SSL/TLS provides ________. link encryption end-to-end encryption both link encryption and end-to-end encryption neither link encryption nor end-to-end encryption

Answers

Answer:

link encryption

Explanation:

In e-mail, SSL/TLS provides link encryption.

The SSL is an acronym for Secured Socket Layer and it is one of the secured way of authenticating and encrypting data between a computer and the mail server.

In the case of a TLS, it is an acronym for Transport Layer Security and it basically is used for providing authentication and encryption of data between two communicating systems on a network.

This ultimately implies that, SSL/TLS are standard network protocols that provides data integrity and privacy to users when communicating over the internet or networking devices as they're made to encrypt user credentials and data from unauthorized access. The SSL/TLS are an application layer protocol used for the encryption of mails sent over the internet, in order to protect user information such as username and password.

A simple operating system supports only a single directory but allows it to have arbitrarily many files with arbitrarily long file names. Can something approximating a hierarchical file system be simulated? How?

Answers

Answer:

Yes

Explanation:

Yes, something approximating a hierarchical file system be simulated. This is done by assigning to each file name the name of the directory it is located in.

For example if the directory is UserStudentsLindaPublic, the name of the file can be UserStudentsLindaPublicFileY.

Also the file name can be assigned to look like the file path in the hierarchical file system. Example is /user/document/filename

4. Discuss the advantages and disadvantages of using the same system call interface for both files and devices. Why do you think operating system designers would use the same interface for both

Answers

Answer:

According to the principles of design, Repetition refers to the recurrence of elements of the design

One of the advantages of this is that it affords uniformity. Another is that it keeps the user of such a system familiar or with the interface of the operating system.

One major drawback of this principle especially as used in the question is that it creates a familiar route for hackers.

Another drawback is that creates what is called "repetition blindness". This normally occurs with perceptual identification tasks.

The  phenomenon may be  due to a failure in sensory analysis to process the same shape, figures or objects.

Cheers!

differentiate between web site and web application?

Answers

Explanation:

A website is a group of globally accessible into linked pages which have a single domain name. A web application is a software or program is is accessible using any web browser.

Answer:

Explanation:

A website shows static or dynamic data that is predominantly sent from the server to the user only, whereas a web application serves dynamic data with full two way interaction.

Modify the DemoSalesperson application so each Salesperson has a successive ID number from 111 through 120 and a sales value that ranges from $25,000 to $70,000, increasing by $5,000 for each successive Salesperson. Save the file as DemoSalesperson2.java.

Answers

Answer:

Here is the modified DemoSalesperson2

public class DemoSalesperson2{ // class DemoSalesperson2

public static void main(String[] args) { //start of main() function body

SalesPerson[] sp = new SalesPerson[10]; // creates an array of SalesPerson object named sp

int start_id =111; // assign 111 to starting id number

double start_sal=25000; //assign 25000 to starting salary means salary will start from amount 25000

 for (int i =0; i<sp.length; i++) { //loop iterates until the value of loop variable i remains less then length of the array object sp

  sp[i] =new SalesPerson(start_id+i,start_sal+5000*(i)); /*at each iteration  ID number from 111 through 120 and a sales value that ranges from $25,000 to $70,000, increasing by $5,000 for each successive is displayed using object array sp[] which calls the SalesPerson constructor to access id and sales */

 System.out.println(sp[i].getId()+"   "+sp[i].getAnnualSales() );  } } } /*uses object sp of class SalesPerson to access the methods getId which returns the id and getAnnualSales method which returns the annual sales, to display id and annual sales */

Explanation:

The question first requires a SalesPerson class with these requisites:

Class name: Salesperson.

Data fields for Salesperson: int ID number , double annual sales amount.

Methods: constructor SalesPerson() that requires values for both data fields, as well as get and set methods for each of the data fields.

So according to the complete question's requirement, I have implemented SalesPerson class:

public class SalesPerson {   // class name

//data members: integer type id variable and double type sales variable

   private int id;  

   private double sales;  

   public SalesPerson(int id_no, double annual_sales) {   //constructor that requires values for id and sales

       id = id_no;  

       sales = annual_sales;     }  

   public int getId() {   //accessor getId() method to get or access the value of id data field

       return id;     }  

   public void setId(int id_no) {   //mutator setId to set the value of id data field

       id = id_no;     }  

   public double getAnnualSales() {   //accessor getAnnualSales() method to get or access the value of sales data field

       return sales;     }  

   public void setAnnualSales(double annual_sales) { //mutator setAnnualSales to set the value of sales data field

       sales = annual_sales;     }  }

However you can use my DemoSalesperson2 application for your own SalesPerson class.

Now I will explain the working of for loop used in DemoSalesperson2

Iteration 1:

i=0

i<sp.length is true because length of sp[] is 10 so i<10

This means the body of for loop will execute.

The statement inside the body of for loop is :

 sp[i] =new SalesPerson(start_id+i,start_sal+5000*(i));

class SalesPerson constructor is used to access the data members of SalesPerson class

start_id = 111

start_sal=25000

start_id+i = 111 + 0 = 111

start_sal+5000*(i) = 25000 + 5000 (0) = 25000

The values 111 and 25000 are stored to sp[0] means at the first index of the sp array.

System.out.println(sp[i].getId()+"   "+sp[i].getAnnualSales() );  

This statement uses sp object to get access to the getId and getAnnualSales methods to print the id number and sales amount.

So the output at 1st iteration is:

111   25000.0

Iteration 1:

The value of i is incremented to 1 so now i = 1

i<sp.length is true because length of sp[] is 10 so i<10

This means the body of for loop will execute.

The statement inside the body of for loop is :

 sp[i] =new SalesPerson(start_id+i,start_sal+5000*(i));

class SalesPerson constructor is used to access the data members of SalesPerson class

start_id = 111

start_sal=25000

start_id+i = 111 + 1 = 112

start_sal+5000*(i) = 25000 + 5000 (1) = 25000 + 5000 = 30000

The values 111 and 25000 are stored to sp[1] means at the first index of the sp array.

System.out.println(sp[i].getId()+"   "+sp[i].getAnnualSales() );  

This statement uses sp object to get access to the getId and getAnnualSales methods to print the id number and sales amount.

So the output at 1st iteration is:

112   30000.0

The loop keeps iterating and the value of id is incremented by 1 and value of sales is increased by 5000 at every iteration.

This loop continues to execute until the value of i exceeds the length of sp array i.e. 10.

The values from iteration 1 to 8 following the above explanation are:

Iteration 1:

111    25000.0

Iteration 2:

112    30000.0

Iteration 3:

113    35000.0

Iteration 4:

114   40000.0  

Iteration 5:

115   45000.0  

Iteration 6:

116   50000.0                                                          

Iteration 7:

117   55000.0                                                                                                      

Iteration 8:                                                                                      

118   60000.0      

Iteration 9:                                                                                    

119   65000.0

Iteration 10:                                                                                    

120   70000.0

At iteration 11 the for loop body will not execute as value of i at 11th iteration is i = 10 and i<sp.length evaluates to false as i = sp.length because length of sp array is 10 and now the value of i is also 10. So the loop ends. Screenshot of the program and its output is attached.

If the object instance is created in a user program, then the object instance can access both the public and private members of the class using DOT notation (such as Rectangle r; r.area=10). True or False

Answers

Answer:

False

Explanation:

The private member of a class is not accessible by using the Dot notation ,however the private member are those which are not accessible inside the class they are accessible outside the class  .The public member are accessible inside the class so they are accessible by using the dot operator .

Following are the example is given below in C++ Language

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {     return 3.14*r*r;  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 3.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Output:

compile time error is generated

The correct program to access the private member of class is given below

#include<iostream>   // header file

using namespace std;  

class Rectangle

{    

   private:  

       double r; // private member  

   public:      

       double  area()  

       {    

r1=r;

double t2=3.14*r2*r2;

return(t2); // return the value  

       }        

};  

int main()  

{    

  Rectangle r1;// creating the object  

   r1.r = 1.5;  

 double t= r1.area(); // calling

cout<<" Area is:"<<t;  

   return 0;  

}  

Therefore the given statement is False

To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using?

Answers

Answer:

hello your question has some missing parts

To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using to access the device administration web app?

answer ; Gigabit interface

Explanation:

To configure a router/modem the type of IP interface configuration you should apply to the computer you are using to access the the devices administration web app should be Gigabit interface.

This is because Gigabit interface offers a very efficient and high band width and also a very high speed link which operates at 1000 Mbps, or 1 Gbps and it is the the standard used due to the speed it offers as it also offers improved performance over Ethernet

The user can set their own computer hostname and username. Which stage of the hardware lifecycle does this scenario belong to?

Answers

Answer:

Deployment

Explanation:

Hardware lifecycle management is geared at making optimum use of the computer hardware so as to maximize all the possible benefits. During the deployment stage of the hardware lifecycle, the user is prompted by the computer to input their own computer hostname and username. In doing this, it is important that the user takes note of possible flaws in security. Passwords are set at this stage too. The four stages in the hardware lifecycle are procurement, deployment, maintenance, and retirement. At the deployment stage, the hardware is set up and allocated to employees so that they can discharge their duties effectively.

So, for organizations, it is important that strong passwords are used to prevent security breaches in the event that an employee leaves the organization.

Answer:

Deployment

Explanation:

12. Kelly would like to know the average bonus multiplier for the employees. In cell C11, create a formula using the AVERAGE function to find the average bonus multiplier (C7:C10).

Answers

Answer:

1. Divide each bonus by regular bonus apply this to all the data

2. In cell C11 write, "Average" press tab key on the keyboard and then select the range of the cells either by typing "C7:C10" or by selecting it through the mouse.

Explanation:

The average bonus multiplier can be found by dividing each bonus with the regular bonus applying this to all the data and then putting the average formula and applying it to the cells C7:C10.  

After dividing the bonus with regular bonus, in cell C11 write, "Average" press tab key on the keyboard and then select the range of the cells either by typing "C7:C10" or by selecting it through the mouse.

Other Questions
the background details provided in the text describing buck hunting with judges' sons is an example of which literary element the nth term of a sequence is 3n + 5 write down the 5th and 6th terms of the sequencce Trying to find the missing segment to the triangle in the attached image. Any help would be appreciated. Thanks. which 2 statements regarding intuit approved quickbooks online apps are true? Select all that apply 1. It is recommended that the master administrator of the quickbooks company complete the setup. 2.You can sign up for quickbooks payments fro the dashboard in quickbooks online. 3. You can connect an existing qucibooks payments,Go payment or intiut merchant services account 4.it is a best practice for the proadvisor to complete and sign the quickbooks paymment agreement on behalf of client 5. you mus record the receive payment for each invoice paid using the pay on button. Rewrite 19/3 as a mixed number A centrifuge rotor is accelerated from rest to 20000 rpm in 30s a) what is its average angular acceleration b) through how many revolutions has the centrifuge rotor turned during it's acceleration period, assuming constant angular acceleration SeguFind a formula for the nth term in thisarithmetic sequence:a1 = 7, a2 = 4, a3 = 1, a4 = -2, ... Read the passage and study the image from Sugar Changed the World. The painstaking work had just one aim: to plant a crop that would end up taking the life of every worker who touched it. As [Olaudah] Equiano explained, the sugar slaves could hardly rest even when their day was done. Their huts, which ought to be well covered, and the place dry where they take their little repose, are often open sheds, built in damp places; so that when the poor creatures return tired from the toils of the field, they contract many disorders, from being exposed to the damp air in this uncomfortable state. Slave huts on a Caribbean island. The huts have no doors and are built on sandy, open ground with no trees nearby. These are what enslaved peoples huts looked like in the Caribbean (photo by V. C. Vulto). How does the photograph help the reader understand the text? It shows that plantation workers no longer live the way Equiano describes in the text. It shows that plantation workers are still living the way Equiano describes in the text. It shows how enslaved people were exposed to the outside elements and weather. It shows the difference between plantation owners' and enslaved peoples living conditions. The ratio of sides of 2 similar cubes is 3:4. Larger cube has a volume of 1728 cubic meters. What is the volume of the smaller cube? What is an equation in point-slope form for the line that passes through the points (4,1) and (3,4)? y+4=57(x+3) y+4=57(x+3) y4=57(x+3) y3=57(x+4) PLEASE HELP MEEEE Macintosh Inc. changed from LIFO to the FIFO inventory costing method on January 1, 2021.Inventory values at the end of each year since the Inception of the company are as follows: FIFO LIFO2019 $196,000 $178,0002020 392,000 356,000Required: Ignoring Income tax considerations. prepare the entry to report this accounting change a companys sales in year 1 were 250,000 and in year 2 were 287,500. Using Year 1 as the base year, the percetn change for year 2 ompared to the base year is: A customer, age 69, has never invested in securities. She is retired with no dependents, living on a fixed pension of $35,000 per year. She has a savings account with $160,000 and her home is fully paid. She desires to supplement her retirement income, assuming minimal risk. The BEST recommendation would be for the customer to invest $100,000 of her cash savings into a(n): One root of f(x) = x + 10x2 25x 250 is x = -10. What are all the roots of the function? Use the Remainder Theorem.x= -25 or x = 10x = -25, x = 1, or x = 10x = -10 or x = 5x = -10, x=-5, or x = 5 what was the triple entente? what 3 countries were involved? Please help me solve this question with working steps,thanks!! Include hace + time frame + que + verb to say how long ago you traveled . Include a -car, -gar, or -zar verb in the preterite or imperfect tense to describe how you planned or prepared for this trip . Include conmigo to show who traveled with you Image courtesy of Texas Office of the Governor, Economic Development and TourismDescribe at least three ways this ad has been constructed. a 5.0 charge is placed at the 0 cm mark of a meterstick and a -4.0 charge is placed at the 50 cm mark. what is the electric field at the 30 cm mark Read the following excerpt from a research paper on American novels and answer the question. The argument continues about which novel has the honor of being the first American novel. Some award the honor to Gilbert Imlay's The Emigrants, denying the novelistic writing that preceded it (Gray 453). Several novels have lost their claim to that title for one reason or another. In 1751, Charlotte Lennox used American scenes and characters in The Life of Harriot Stuart, but her literary training and home were in England (Shepherd 5). A book called The Female American: or, The Adventures of Unca Eliza Winkfield was thought to have been written by an American and published in London in 1767. In 1775, Adventures of Alonso, probably by Thomas Atwood Digges, was claimed to be by a native of Maryland. The book, however, was not published in America and deals with nothing American. An Indian story, The History of Maria Kittle, was written in 1781, but did not appear as a book until 1793 (Burke 76). Miss McRae by Hilliard d'Auberteuil in 1784 lost its claim because it was written in French by a Frenchman (Sloan 8). What is the purpose of this paragraph? to define American novels to explain why there is a problem defining the first American novel to introduce the topic of d'Auberteuil's novels to explain the classification process of American novels