Answer:
red
Explanation:
public class CarTest {
public static void main(String[] argvs) {
//below line will create an object of CarTest class Object
CarTest carTest = new CarTest();
//This will call runDemo method
carTest.runDemo();
}
public void runDemo() {
//Below line will create an object of Car class with color blue and 4 wheel
Car c = new Car("blue", 4);
//Bellow Line will change the color from blue to red, see the logic writteen in chnageColor method definition
changeColor(c, "red");
//Below line will print the color as red
System.out.println(c.getColor());
}
public void changeColor(Car car, String newColor) {
//This line will set the color as passed color in the car object
car.setColor(newColor);
}
}
The ___ of a signal is the range of frequencies that it contains.
a) spectrum b) effective bandwidth c) wavelenghth d) absolute bandwidth
When you instantiate an object from a class, ____ is reserved for each instance field in the class.
a.
a field name
b.
a constructor
c.
a signature
d.
memory
Answer:
The correct answer is d.Memory
Explanation:
The meaning of instantiating an object is to be able to create an instance of the object by using an object-oriented programming (OOP) language. In Java to instantiate an object from a class is to create a specific class and Memory is reserved for each instance field in the class.
what is Software Process Improvement?
Answer:
Software Process Improvement (SPI) methodology is defined as a sequence of tasks, tools, and techniques to plan and implement improvement activities to achieve specific goals such as increasing development speed, achieving higher product quality or reducing costs.
Software Process Improvement (SPI) is the practice of enhancing software development processes to improve quality and efficiency. It often utilizes methods like Six Sigma's DMAIC framework. The goal is to create consistent, high-quality software products.
What is Software Process Improvement?
Software Process Improvement (SPI) is the practice of analyzing and enhancing the software development processes within an organization to improve the quality, efficiency, and overall performance of software delivery.
By identifying inefficiencies and variations in current processes, companies can implement more effective methodologies that lead to higher quality products. One common method used in SPI is Six Sigma, which employs the DMAIC (Define, Measure, Analyze, Improve, Control) framework.To implement Software Process Improvement, follow these steps:
Define: Identify the processes that need improvement and establish goals.Measure: Collect data on current processes to understand existing performance levels.Analyze: Examine the data to identify sources of inefficiencies or defects.Improve: Develop and implement strategies to rectify identified issues.Control: Monitor the improved processes to ensure sustainability and continuous improvement.Quality improvement techniques, such as process mapping and the PDCA (Plan, Do, Check, Act) cycle, can also support SPI efforts. Through these methods, organizations aim to achieve more consistent, reliable, and high-quality software products
. To allow access to network resources is the function of______________________
a. Application layer
b. Physical layer
c. Network layer
d. logical link layer
I think Network layer is the answer.
A computer on a company network was infected with a zero-day exploit after an employee accidently opened an email that contained malicious content. The employee recognized the email as malicious and was attempting to delete it, but accidently opened it. Which of the following should be done to prevent this scenario from occurring again in the future? A. Install host-based firewalls on all computers that have an email client installed B. Set the email program default to open messages in plain text C. Install end-point protection on all computers that access web email D. Create new email spam filters to delete all messages from that sender
Answer:
A. Install host-based firewalls on all computers that have an email client installed
Explanation:
Since the employee accidentally opened the email that contained malicious content and the computer on the company network got infected, it needs to install host-based firewalls on all computers that have an email client installed on the system. A host-based firewall is a type of firewall installed on individual client or server which controls the incoming and outgoing networking data and identifies whether to allow it or not. The host-based firewall can easily identify and block suspected exploits like viruses, worms or trojan horses.
By installing host-based firewalls on all computers that have an email client installed secures the entire network of computers.
Answer:
The answer is C.
Explanation:
To prevent such thing from happening in the future, the employee/company should Install end-point protection on all computers that access web email
What are the advantages of using the internet as theinfrastructure for electronic commerce and electronicbusiness?
Answer and Explanation:
E-commerce and e-business is a major business of the present time using the internet. It is basically defined as the online selling of goods or making any business online. Internet is the basic requirement for the e-commerce or e-business as
it helps in providing the internet connectivity so that the e-business can be displayed online and users can buy goods or interact with seller regarding the business. Due to internet service users get to know about the online business and thus the business attains economic growth and benefit.Queue is the LIFO structure.
o True
o False
Answer:
The answer is False.
Explanation:
By definition LIFO structure is defined by: Last In, First Out.
By definition FIFO structure is defined by: First In, First Out.
A queue has the basics operations push() and pop() where:
push(element) stores the element at the end of the queue.element = pop() retrieves the element at the beginning of the queue.For example:
If you insert the elements doing the push(e) and q.pop(e) operation:
Queue q;
Element e;
q.push(2); // q ={2};
q.push(5); // q ={2 , 5};
q.push(6); // q = {2, 5, 6};
q.pop(e); // q ={5, 6}; e = 2;
q.push(12); q ={5, 6, 12};
q.pop(e); // q ={6, 12}; e = 5;
Note: A stack is a LIFO structure.
Describeat least three applications where re-writeable optical laser diskwould be preferred over hard disks for storage
Answer:
Applications where re-writeable optical laser disk would be preferred over hard disks for storage are:
While storing the data in large amount, the optical disk are more preferred as, for storing the videos, photographs and various types of the images.This optical laser disk are used for transferring the information or data from one computer to another so we can easily modify or re-write the data at any time as, this disk are more convenient than hard disk.The optical laser disk are also helpful for distributing the software to the customers or users by using its large storing capacity features, as compared to hard disks.
Answer:
The following are listed applications or requirements where the re-writable (optical) laser drive is preferred over storage hard drives.
Explanation:
A laser disk is often used to transmit data between one device to the next such that at any moment we could conveniently edit or re-write the details even though this drive is much more versatile than that of the disk.When processing the details in vast numbers, the optical disk is used to store certain photos, snapshots, and different file formats.As compared to hard disks, the optic disk has always been useful in delivering the applications to consumers or clients with its broad storage space functionality.How is ( a || b ) && c || ( a || b ) && ( ! c ) equal to ( a || b ) without simplification?
Answer: You can see the truth table in the image.
Explanation:We can do this question by using truth table.
As we can see in the truth table that there is no effect on the output of the expression by c if a and b both are false then the output is false and if any of them is True or both of them are True then the result is True.
IRQ 0 interrupt have _______________ priority
? low
? medium
? highest
? lowest
Answer:
Highest
Explanation:
A interrupt request / IRQ is in which instructions are sent to Cpu and uses an interrupt handler to run distinct program . Hardware interrupts are used to manage occurrences such as obtaining modem or network card information, important presses, or mouse motions.
Interrupt request 0. – it is a system timer (can not be altered) Interrupt request 1 – keyboard controller (can not be changed) Interrupt request 2 – cascaded IRQ 8–15 signals (any device configured to use IRQ 2 will genuinely use IRQ 9) Interrupt request 3 – serial port 2 controller Interrupt request 4 – serial port 1 controller Interrupt request 5 –parallel port 2 and 3 Interrupt request 6 - floppy disk controller Interrupt request 7 –parallel port 1. If a printer is not present, it is used for printers or for any parallel port. It can also possibly be shared with a secondary sound card with cautious port management.As interrupt number increases priority level decreases, Priority level 0 is the highest priority level .
What is a regular expression that would match any digit 1-999?
Answer:
[1-9][0-9]{0,2}
Explanation:
The numbers to be matched consist of three digits with the following requirements:
- Digit 1 can take the values 1-9
- Digit 2 can take the values 0-9
- Digit 3 can take the values 0-9
- Digits 2 and 3 are optional, that is the number may consist of 1,2 or 3 digits in all.
Taking these into account, the overall regular expression can be represented as follows:
[1-9][0-9]{0,2}
Imagine that 10 int values are labeled byposition: 1, 2, 3, etc. Write a program that reads 10integers and tracks how many of them have the same value as theirposition. That is, ifthe first number read is 1, or the third number is 3, that countsas a match, and the output would be the number of matches (from 0to 10). Use a singleif statement and a loop.
Answer:
#include<iostream>
using namespace std;
//main function
int main(){
//initialization
int count_Number=1,a1,match_Numbers=0;
//loop run 10 times
do{
cout<<"Enter the number: ";
//read the value enter by user
cin>>a1;
//check for match
if(a1==count_Number){
match_Numbers++;
}
count_Number++;
}while(count_Number <= 10);
//display the output
cout<<"The number of matches is: "<<match_Numbers<<endl;
return 0;
}
Explanation:
Include the library iostream for using the input/output instruction.
create the main function and declare the variables.
take the do-while loop which has a special property, the statement in the do-while execute first and then check the condition.
In the do-while, print the message by using the cout instruction and then store the value enter by the user into the variable.
then, check the value enter by the user is match the position or not. If the condition true, then count the matches and also update the position count.
this process continues until the position count is less than or equal 10. if condition false the loop terminates and then, display the output on the screen.
For a set of integers stored in an array,calculate the sum of the positive numbers and the sum of the negative numbers. The program should store these numbers in memory variables: positiveSum and negativeSum. Numbers should be read from the array one at a time with a zero value (0) being used to signal the end of data (the zero value is acting as a "sentinel" value).
Answer: The c++ program to implement the given conditions is shown below.
#include <iostream>
using namespace std;
int main()
{
// used as index of array in the loop for calculating the sum
int i=0;
// array contains both negative and positive integers
// 0 is used as the sentinel value
int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};
int positiveSum=0, negativeSum=0;
do
{
if(arr[i]<0)
negativeSum = negativeSum + arr[i];
if(arr[i]>0)
positiveSum = positiveSum + arr[i];
// after every element is added, index of array represented by i is incremented
i++;
}while(arr[i]!=0);
// loop continues till end of array is reached
cout<<"Sum of positive integers "<<positiveSum<<" and sum of negative integers "<<negativeSum<<endl;
return 0;
}
OUTPUT
Sum of positive integers 136 and sum of negative integers -120
Explanation: This program declares and initializes an integer array without user input. As mentioned in the question, 0 is taken as the sentinel value which shows the end of data in the array.
int arr[12]={-9,-8,-3,-12,-78,-10,23,45,67,1,0};
All the variables are declared with data type int, not float. Since, integers can yield integer result only.
The do-while loop is used to calculate the sum of both positive and negative integers using int variable i. The variable i is initialized to 0.
This loop will run till it encounters the sentinel value 0 as shown.
while(arr[i]!=0);
Hence, all the integers in the array are read one at a time and sum is calculated irrespective of the element is positive or negative.
if(arr[i]<0)
negativeSum = negativeSum + arr[i];
if(arr[i]>0)
positiveSum = positiveSum + arr[i];
After the element is added, variable i is incremented and loop is continued.
The do-while loop tests positive and negative integers based on the fact whether their value is greater than or less than 0.
The program can be tested using different size and different values of positive and negative integers in the array.
Explain the security mechanisms available for a database and how the data will be protected.
Answer: Views, unauthorized access, encryption are some of the security mechanisms.
Explanation:
The database of any application or software contains all the important data, therefore it is utmost necessary to protect the data from falling into dangerous hands. Most databases use authentication measures in form of passwords or bio metrics to avail access. Besides these users can use views to see the data but cannot change anything into the database. Some databases also use encryption systems to encrypt the passwords for better safety. There are some databases which grants user with two types of privileges such as system and object privileges, whereby with system privileges one can change the system environment variables.
What is the most consistent item regardless of the software used in BI?
Answer Explanation:
Business intelligence is defined as the strategies and technologies used by companies for the data analysis of business information it tell us also about predictive views of business operation.
THE MOST CONSISTENT ITEMS REGARDLESS OF SOFTWARE USED IN BI ARE :
data analyst has the most responsibility of BI he is the most important part of BIIt is the interconnected process of inspection changing and modelingdata analysis is hugely aided by data mining Which ofthe following calls on human feelings, basing the argument onaudience needs or sympathies?
a- Emotional appeals
b- Logicalappeals
c- Irrational appeals
d- Unreasonableappeals
Answer: a) Emotional appeal
Explanation: Calls on feeling of human is referred as the emotion of the humans ,thus it is said to be an emotional appeal. Other appeals in the options are for the call on technical,logical or unexpected error reason and does not relate to the human audience needs or sympathies .But emotional appeal deals with these need on being called. So, option (a) is the correct option .
Which of these are valid declarations for the main method?
?? public void main();
?? public static void main(String args[]);
?? static public void main(String);
?? public static int main(String args[]);
Answer:
The answer is option 2. public static void main(String args[]);
Explanation:
The answer is public static void main(String args[]); let's understand this line:-
public:-It is an access specifier that means whichever entity is public it will be accessible everywhere.static:-It means that there is only one copy of the method.void:-Void means that the method does not have any returning any value.main:-It is the name of the method.String args[]:-It is an array of strings which and it stores java command line arguments.User can use another name if the user want to.True / False
Generally, a floating-point add instruction takes more clock cycles then a corresponding integer add instruction.
Answer:
True
Explanation:
A typical contemporary CPU knows two primary information classes: integer and floating point.
Floating point arithmetic instructions take more clock cycles than integer instructions.
Integer point generally takes 1 or 2 clock cycles for executing add instruction whereas floating point takes 3 or 4 instructions for executing add instruction.
What are the different types of firewalls? Which one is best?
The n modifier after the tilde forces the index variable to expand only to the ______
Answer: filename and extension.
Explanation:
Suppose we have %~nxa, where we have two modifiers n and x, and a single variable a.
So, the n modifier after the tilde forces the index variable to expand only to the filename(by the n modifier) and the extension(by the x modifier).
It produces the filename and extension instead of the full path.
Indicate which of the following substances contain an atom that does or does not follow the octet rule.
A. AlCl3
B. PCl3
C. PCl5
D. SiCl4
AlCl3 does not follow the octet rule because it has only six electrons in its valence shell after bonding. PCl5 also doesn't follow the octet rule as phosphorus extends beyond the octet by forming five covalent bonds using the d-orbitals.
To determine which substances contain an atom that does not follow the octet rule, we can evaluate the compounds listed: AlCl3, PCl3, PCl5, and SiCl4.
AlCl3 (Aluminum chloride): Aluminum has three valence electrons and forms three covalent bonds with chlorine atoms. However, it does not follow the octet rule because it only has six electrons in its valence shell after bonding.PCl3 (Phosphorus trichloride): Phosphorus has five valence electrons and forms three covalent bonds with chlorine atoms, leaving it with a full octet.PCl5 (Phosphorus pentachloride): Phosphorus can expand its valence shell beyond the octet rule, using the d-orbitals, to form five covalent bonds with chlorine atoms.SiCl4 (Silicon tetrachloride): Silicon has four valence electrons and forms four bonds with chlorine atoms, achieving a full octet.Based on this information, AlCl3 and PCl5 are examples where the central atom does not follow the octet rule. In the case of AlCl3, aluminum is electron-deficient with three bonds, whereas in PCl5, phosphorus exceeds the octet rule by forming five bonds.
An array can store integers and doubles together.true or false
Answer:
False
Explanation:
An array stores a sequence of values that are all of the same type
"What is the running time of HEAPSORT on an array A of length n thatis already sorted in increasing order?
Answer:
The answer to this question is O(NlogN).
Explanation:
The time complexity of Heap Sort on an array A is O(NLogN) even if the array is already sorted in increasing order.Since the Heap Sort is implemented by creating the heap from the array and then heapifying and then repeatedly swapping first and last element and deleting the last element.The process will be done for the whole array.So the running time complexity is O(NLogN).
Which of the following is not anadvantage of simulation?
Ability to treatcomplex situations
Ability to deriveoptimal solutions
Ability to askwhat-if questions
Ability toexperiment with different scenarios
Ability tocompress time
Answer: Ability to derive optimal solutions
Explanation:
One of the main disadvantages of simulation is ability to derive optimal solutions. As, the solution does not required to have a closed form and procedure does not require any weighting and the hard constraint. Stimulation outcome are not optimal to induced specific response because of the lack of quantitative models.
A void function can return any value. TRUE FALSE
Answer:
False
Explanation:
False
A void function does not return anything
Final answer:
A void function cannot return any value, and the claim that it can is false. It performs operations without returning a value. In some languages like Python, a void function implicitly returns 'None', indicating the absence of a value.
Explanation:
The statement that a void function can return any value is FALSE. A void function is a type of function that does not return any value. The keyword void indicates that the function is expected to perform an action without the need to return a value. When a void function is executed, it might perform operations such as displaying content on the screen or modifying a global state, but it cannot return a value to the caller.
Although a void function does not return a value itself, in languages like Python, it may implicitly return a special value called None, which is treated as the absence of a value. This should not be confused with functions that return other types of values, such as Booleans, Integers, Floating point numbers, Strings, Arrays, Objects, or Resources.
Which of the following expression is equivalent to (x >1)?
x >= 1
!(x <= 1)
!(x = 1)
!(x < 1)
None of the above
Please explain so that I can learn from you.
Answer:
!(x <= 1)
Explanation:
The operator '!' comes in the logical operator category and it names is not Operator.
It used with the Boolean value if the Boolean value is TRUE then NOT operator gives output FALSE.
if the Boolean value is FALSE then NOT operator gives output TRUE.
so, consider the expression (x >1).
It means x is greater than 1.
Now, think about when the condition will be false.
So, the condition will be If x is less than or equal to 1.
the option 1 is x >= 1. So, it greater than equal to 1. This is not the correct option
!(x <= 1) it means x is less than equal to 1 and include the NOT operator then it becomes X is greater than 1 (x > 1). So, This is the one possible answer.
!(x = 1): it means x can be greater than or less than 1. so, this is not correct.
!(x < 1): it means x can be greater than or equal to 1. This is also not correct because it includes the equal part as well.
What is Belady in computer language ?
Answer: Belady’s anomaly is a process in which by increase in the number of page frames there is a increase in the number of page faults for memory access pattern.
Explanation: Belady's anomaly was if there is a increment in the number of page frames then it will result in the increment of page faults as well in computer terms. The process was seen usually on the following replacement algorithm:-
FIFO(first-in first-out) Random page replacementDescribe encryption at gateways in thePresentation layer of the OSI Reference Model
Answer:
In the presentation layer of the OSI reference model provides a variety of coding and functions that can be applied in application layer data. Information send by the application layer are ensured by these functions. As, presentation layer is the important layer in the OSI reference model because it is responsible for important services like data compression, data conversion, decryption and encryption.
Encryption at gateway is defined as, when the important data is first encrypted using protocol and then it is transferred in the network. And gateway re-director operates in the presentation layer.
What is the value of x after the following statements execute? int x, y, z; y 12; z 3; X= (y*(z+y-10); A. 36 B. 144 C.60 D. None of these
Answer:
60
Explanation:
According to the operator precedence, the bracket comes in the top. So, the program solve expression in the bracket first.
In the code, the value of Y is 12 and z is 3
substitute the value in the formula.
X = (12*(3 + 12 - 10)).
So, the program calculate the value (3 + 12 - 10) first which gives 5.
After that program evaluate (12 * 5) which gives 60.
Therefore, the answer is 60.
T F Overuse of global variables can lead to problems.
Answer:
True
Explanation:
Global Variables
Variables which are declared outside any function. Any function can use these variables,they are automatically initialized to zero(0).They are generally declared before main() function.
Problems
We can modify the global variable in any function as any function can access it. So it is hard to figure out which functions read and write these variables. Various problems are-
No Access Control Concurrency issuesMemory allocation issues