Constructors are special methods included in class definitions. a. What is a constructor used for? b. How do constructors differ from other methods in a class?

Answers

Answer 1

Answer:

(a)A constructor is a special method which is used the initialize the class that means the initialize the object of a class.

(b)There is the following difference between constructor and method in a class.

1. Constructor name has the same name as the class name we do not give any other name to the constructor, on the other hand, it is possible in function to giving any name to function.

2. The constructor does not have return type such as int, void, etc on the other hand function must have a return type.

3.constructor does not return any value on the other hand function are returning the value.

Explanation:

Following are the program of constructor in c++

#include <iostream> // header file

using namespace std; // namespace

class constructor1

{

   public:

   constructor1() // default constuctor

   {

       cout<<" hello brainly:"<<endl;  

   }

void fun() // fuuction

{

cout<< "function:";

}

};

int main() // main function

{

constructor1 ob; // creating object it call default constructor

ob.fun();//  calling the function fun()

  return 0;

}

Output:hello brainly:

function:

In this program, we create a class and create a function "fun" and "default "constructor "from the main function we create the object of a class which calls the default constructor and with the help of object we call the function fun.

Answer 2

Final answer:

Constructors are special methods for initializing new objects in a class. They differ from other methods by being called automatically during object creation, having no return type, and generally sharing the class name.

Explanation:

Constructors are special methods included in class definitions whose primary role is to initialize new objects of that class. Unlike regular methods, a constructor is called automatically when an instance of the class is created. They are unique in that they don't have a return type, not even void, and they often have the same name as the class in many programming languages.

Constructors may include parameters that allow for the setting of instance variables when an object is instantiated. This ensures that the new object starts with a valid state. In languages such as Python, the constructor method is defined using the special name __init__. This method enables coders to carry out any initialization, such as setting default values for instance variables or performing operations vital to the object's use.

While other methods in the class can be invoked using the object's reference and can have any return type or none, the constructor is unique in that it doesn't need to be called directly; it's invoked when the object comes into existence and cannot be called again unless a new object is created.


Related Questions

In object-oriented development, why is it necessary to use drivers and stubs in testing?

Answers

Answer: In object-oriented approach for the development of operating system requires stub and driver as essential part for the creation of proper interaction of the object oriented components with the external system.They help in testing of the module.

Stub is the unit that acts as a piece of code which fills in the place of the missing section in the system. The functions of the system module is tested by stub .

Driver is the part that helps in citing the system modules under the testing conditions.It is the piece of code that creates the calling function simulation.

What is the output of the following program fragment:

void find(int a, int& b, int& c)
{
int temp;
c = a + b;
temp = a;
a = b;
b = 2 * temp;

}

int main()

{

int x, y, z;

x = 10;

y = 20;

z = 25;

find(x, y, z);

cout<< x <<" "<< y <<" "<< z <
return 0;

}

Output:

Answers

Answer:

Output of the given code is: 10 20 30.

Explanation:

Here in function find(int a, int& b, int& c), three parameters are passed, firstis passed by value and rest are passed by reference. When a parameter is passed by value, the any changes made by the other function doesn't reflects in the main function.And when a value is passed by reference, then any changes made by other function will reflects in the main function also.

Here find is called with (10,20,25).So in the function, c=a+b i e. c=10+20.Here b,c are passed by reference. So any change in b,c will change the value of y,z in main. temp=10,then a=b i.e a=20, and b=2*temp That is b=2*10.Here value of a=20, b=20 and c=30.Since b,c are passed by reference then it will change the value of y, z in main function but a will not change the value of x.

Hence the value of x=10, y=20 and z =30 after the function call.

In PumaMart system, why an initial offer is not necessary at the beginning of negotiation?

Answers

Answer:

 The modification factor decides each progression of property changed in the procedure of the negotiation. In the event that the progression is pretty much nothing, the client can't show signs of improvement arrangement result inside as far as possible.

In the specific arrangement of the negotiation round, if the half shops dismiss the new offering that is propose by the client specialist just because, it implies it is unreasonably forceful for the e-shops. The shopper will keep up the negotiation with "littler" change factors.

In many cases, the e-shop keeper accept the given offer and then, the negotiation agent built a big factor of adjustment.

What is the financial aspect for a business as to what database software they will buy?

Answers

Answer:  Database software is bought on basis of the processing, cost, requirement etc for any particular . According to the financial perspective the database  software should have the following characteristics:-

Database software that has most accurate and main feature according to the business requirement is selected for buying and the others with extra features are not considered as more feature cost more amount  which is not needed.Database software which is still in progress to be built is pre-booked and money is invested on it because the price of the required software might increase after getting completed.Scalable database software should be bought so that it can extend according to need at low cost.

 

A potential problem related to the physical installation of the Iris Scanner in regards to the usage of the iris pattern within a biometric system is:

a.Concern that the laser beam may cause eye damage.

b.The iris pattern changes as a person grows older.

c.There is a relatively high rate of false accepts.

d.The optical unit must be positioned so that the sun does not shine into the aperture.

Answers

Answer: d)The optical unit must be positioned so that the sun does not shine into the aperture.

Explanation: Iris scanner is the capturing and scanning of the unique iris pattern that is present in small colored circle in the human eye.This techniques works through the invisible infrared light which captures the distinctive pattern.This is usually not visible from the naked eyes.

While scanning the iris through infrared light for image creation, sunlight can interrupt the aperture if it is positioned towards the direct light of sun.

Other options are incorrect because laser beam usually does not damage the eye in most cases,change in pattern in iris is rarely change over time and it has good rate of acceptance.Thus the correct option is option(d).

Dynamically allocatе mеmory for a DNA objеct and storе its addrеss in a variablе namеd dnaPtr

Answers

Answer:

 DNA obj =new DNA;//obj object created dynamically.

   DNA *dnaPtr=&obj.//dnaPtr to store the address of the object.

Explanation:

The above written statements are in C++.The DNA object is created dynamically and it is done in C++ by using new keyword which allocates the heap memory for the object.

Then a dnaPtr is created of type DNA so that it can store the address of the DNA objects.

.What is systemd? How is it used?

Answers

Answer:

 The systems is the type of the linux initialization system approach that basically include on demand features and used in tracking process in the linux control system as service manager.

The systemd also run or compile in terms of the user context and manage the additional system resources. The systemd file are basically used in the timer unit section to enable the individual unit in the particular timer section.

It basically provide various tools and the utilities that help in the various system tasks.    

Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print: 7 9 11 10 10 11 9 7 Hint: Use two for loops. Second loop starts with i = courseGrades.length - 1. (Notes) Note: These activities may test code with different test values. This activity will perform two tests, both with a 4-element array. See "How to Use zyBooks". Also note: If the submitted code tries to access an invalid array element, such as courseGrades[9] for a 4-element array, the test may generate strange results. Or the test may crash and report "Program end never reached", in which case the system doesn't print the test case that caused the reported message.

Answers

Answer:

Following are the loop in c language

t = sizeof(courseGrades)/sizeof(courseGrades[0]);  // determine the size of array

   for(int i=0;i<t;++i) // iterating loop

   {

printf("%d ",courseGrades[i]);  // print the array in forward direction with space  

   }

   for(int i=t-1;i>=0;--i)// iterating loop

   {

printf("%d ",courseGrades[i]); // print the array in backward direction with space

  }

Explanation:

In this firstly we find a size of the courseGrades array in variable "t" after that we created a loop for print  the courseGrades array in forward direction with space.

finally we created a loop  for printing  the courseGrades array in backwards direction.

Following are the program in c language :

#include <stdio.h> // header file

int main() // main function

{

   int courseGrades[]={7, 9, 11, 10}; // array declaration

  int t; // variable t to store the length of the array

  t = sizeof(courseGrades)/sizeof(courseGrades[0]); // determine the size of array

   for(int i=0;i<t;++i)  // iterating loop

   {

printf("%d ",courseGrades[i]); //print the array in forward direction with space  

       

   }

   for(int i=t-1;i>=0;--i) // iterating loop

   {

printf("%d ",courseGrades[i]);//  // print the array in backward direction with space  

       

   }

  return 0;

}

Output:

7 9 11 10 10 11 9 7

Final answer:

A forward and backward traversal of an array can be achieved with two separate for loops, printing each element followed by a space and ending each loop with a newline.

Explanation:

Traversing an array both forwards and backwards is a common task in programming, often accomplished using for loops. To print all the elements in an array called courseGrades, first in the original order and then in reverse, two separate for loops can be used. Here is a sample code snippet:

int[] courseGrades = {7, 9, 11, 10};
// Forward traversal
for (int i = 0; i < courseGrades.length; i++) {
   System.out.print(courseGrades[i] + " ");
}
System.out.println();
// Backward traversal
for (int i = courseGrades.length - 1; i >= 0; i--) {
   System.out.print(courseGrades[i] + " ");
}
System.out.println();

The first for loop initializes the iterator variable i at 0 and iterates until it reaches the length of the array, while the second for loop starts from the end of the array and decrements i until it gets to 0. Both loops print each element followed by a space, concluding with a newline character after the end of each loop.

What should you do if you forget your root password for MySQL?
(a) Go to get a root canal.
(b) You have to re-install MySQL with a new password.
(c) You better hope you wrote it on a Post-It, because there is no way to recover or change the password.
(d) Call the GeekSquad to help.
(e) In Linux you can run MySQL in 'safe mode' (which doesn't require a password to login) to reset your password.

Answers

Answer:

E) in linux you can run MySQL in 'safe mode' (which doesn't require a password to login) to reset your password.

Answer:

(e) In Linux you can run MySQL in 'safe mode' (which doesn't require a password to login) to reset your password.

Explanation:

Write a program that reads an integer, and then prints the sum of the even and odd integers.

Answers

Answer:

#include <iostream>  // header file

using namespace std;  // namespace

int main ()

{

int n, x1, i=0,odd_Sum = 0, even_Sum = 0;  // variable declaration

cout << "Enter the number of terms you want: ";

 cin >> n;  // user input the terms

cout << "Enter your values:" << endl;

  while (i<n)  // iterating over the loop

{

cin >> x1;  // input the value

if(x1 % 2 == 0)  // check if number is even

{

even_Sum = even_Sum+x1;  // calculate sum of even number

}

else

{

odd_Sum += x1; // calculate sum of odd number.

}

i++;

}

cout << "Sum of Even Numbers is: " << even_Sum << endl;  // display the sum of even number

cout << "Sum of Odd Numbers is: " << odd_Sum << endl;  // display the sum of odd number

return 0;

}

Output:

Enter the number of terms you want:3

Enter your values:2

1

78

Sum of Even Numbers is:80

Sum of Odd Numbers is:1

Explanation:

In this program we enter the number of terms by user .After that iterating over the loop less then the number of terms .

Taking input from user in loop and check the condition of even. If condition is true then adding the sum of even number otherwise adding the sum of odd number.

Finally print the the sum of the even number and odd integers.

.In Linux what command sequence do we enter to stop a program?

Answers

Answer:

exit command is used to stop the program.

Explanation:

exit command is used to exit the shell when it is currently running.It can take one or more arguments exit[n] and exits the shell and returns the status of n.

exit with parameters

exit [n] exits the shell and returns the status of n.

exit without parameters

exit exits the shell and returns the status of last command that is executed.

What are the 7 types of Bootstrap buttons?

Answers

Answer:

The 7 types of bootstrap buttons are as following:-

.btn-default

.btn-primary

.btn-success

.btn-info

.btn-warning

.btn-danger

.btn-link

Explanation:

These are the 7 types of different bootstrap buttons there is also one more type that is called simple button .btn  .

Default button is of white color.

Primary button is of blue color.

success button is of green color.

info button is of greenish blue color.

warning button is of orange color.

danger button is of red color.

link button is of no color.

you are engaged in affinity analysis. what does this mean?

a. grouping entities and attributes in logically organized table structures.

b. looking for data that logically attracts interest.

c. capturing all relevant information about a topic in a single interview with subject matter experts

d. searching for pattern matches

Answers

Answer:

The answer is d.seaching for pattern matches.

Explanation:

Affinity analysis is a technique of data analysis and data mining used to discover relationships among activities performed by a group of interest. It's applied to process where the group of interest records information of their activities and that can be identified. In other words, this technique is used to analyze the behavior of people to identify patterns to determine links into potential purchases.

The most common solution to supply chain uncertainties is to build inventories or __________ as insurance.
a. safety stock
b. stockouts
c. continuous replenishment
d. restocking

Answers

Answer: a)Safety stock

Explanation: Safety stock is the collection of item or goods of any particular company so that they do not face out of stock situation.This stocks helps in the situation when the sale of goods are more than expected rate and additional stock is not present to be used in the uncertain situation.

Safety stock acts as the insurance because of its extra inventory in the uncertain situation.Other options are incorrect because stock-out means the stock of items getting finished, continuous replenishment is notification about the sales on daily basis and restocking is the refilling of the items in stock upon the request when the goods get out of stock.Thus the correct option is option(a)

How can encryption be used to ensure message integrity?

Answers

Answer: Encryption technique is the method for encoding of the information or confidential data which can only be used by the authorized user. The decryption of the message is done by the key that is provided to the authorized party.

Integrity is the property which makes sure that the data is secured and non accessible by the unauthorized party.Thus, encryption makes sure that data does not gets accessed by unauthorized unit that is assuring about the data integrity.

What is the difference between a bound control and an unbound control?

Answers

Answer: The differences between the unbound and the bound control are as follows:-

An unbound control is the control which has data source in field whereas bound control field's contain the data source.The components displayed by the unbound control are pictures, data, line etc. while numbers , text etc are displayed with the help of bound control.The values in the unbound control is not obtained from field but the values in the bound control is gained from the field or expression.

__________ use a challenge response mechanism in which a server challenges a user with a number, which a user must then enter into a device to calculate the response number.

Answers

Answer: Authentication

Explanation:

 Authentication is the mechanism of the challenge response in which it basically allow the server to challenge the user with the number without revealing any password.

Then the user must enter that particular password to enter into the device for calculating the particular response number. Then it basically compute the given response by apply hash function in the server challenge that combine the users password.  

Final answer:

Two-factor authentication (2FA) tokens or one-time password (OTP) tokens use a challenge response mechanism to enhance security in multi-factor authentication systems. A server sends a challenge number to the user, who then inputs it into a device that calculates a response using a secret key and algorithm. This system provides added security beyond traditional login credentials.

Explanation:

Devices that use a challenge response mechanism where the server challenges a user with a number, and the user must then enter this number into a device to calculate a response number, are known as two-factor authentication (2FA) tokens or one-time password (OTP) tokens.

These tokens are often used in multi-factor authentication systems, providing an extra layer of security beyond just a username and password. When a user attempts to log in, the server sends a unique challenge, such as a nonce or a time-based number. The user enters this challenge into their 2FA or OTP device, which then uses a pre-shared secret key and an algorithm to generate a response. The user enters this response back into the system to authenticate.

Examples of such devices include hardware tokens, like RSA SecurID, which display a number that changes periodically and must be entered during login, and software tokens, which run on smartphones or other devices using apps like Authy.

Many business databases consist of multiple tables with ____ among them.

Relationships

Arrows

Objects

Constraints

Answers

Answer: Relationship

Explanation:

 Many organization and business consist multiple tables with the relationship when the multiple data in the table are basically associate with the multiple data in the another table.

When we create a database, then foe each entities we use separate table for every particular entities. The relationship between the multiple table is basically used to represent multiple data in the database.

There are basically different type of the relationship in the database that are:

One to one relationshipOne to many relationshipMany to many relationship  

 

Write a void function using two type int call-by-reference parameters that swaps the values in the arguments. Be sure to include testable pre and post conditions. .

Answers

Answer:

Please copy the C++ code inluded. It's better to open it with an Integrated Development Environment of your choice.

Th C++ code includes explanatory comments (after "//"). You may run it on on step by step basis.

The void function code follows:

void swapFunction(int & a, int & b) {    // receives 2 references (&) as  a and b

int c = a;                                  // saves a's value (actually first's) to local variable c

a = b;                                      // assigns b's value (actually second's) to a (actually first's)

b = c;                                      // assigns to b (actually second) from c

}

Main function:

using namespace std;                        // Assumes "std::" prefix for "cin" and "cout"    

int main() {                                // Main program unit

int first,second;                           // We must declare 2 variables to store 2 int values (data input)

cout << "First value:"; cin >> first;       // Reads first value after a little message

cout << "Second value:"; cin >> second;     // Reads second value after a little message

swapFunction(first,second);                 // Swap function call sends first's and second's references

cout << "First value:" << first << endl;    // Displays new first value

cout << "Second value:" << second << endl;  // Displays new second value

return 0;                                   // Success exit returns 0

}

Explanation: The testable code is included as main functionIt declares 2 int variables to store input dataReads the input dataCalls swapFunction to swap values storedDisplays exchanged values

in c++, what happends when i add 1 to the RAND_MAX then take rand() deivded by (RAND_MAX+1)?if my purpose is to take out a random number within 0=< and =<1?

Answers

Explanation:

rand() function is used to generate random integers between the range 0 to RAND_MAX.So if we divide the the rand() function by RAND_MAX the value returned will be 0.

You cannot do RAND_MAX + 1 the compiler will give error integer overflown.

To generate an integer with a range.You have to do like this:

srand(time(0));

int a=-1*(rand() % (0 - 5245621) +1);

cout <<a;

This piece of code will return an integer within the range 0 to -5245622.

_____ _____ deals with the definitions properties of mathematical models of computation.

Answers

Answer: Theory of computation/Computation Theory/Automata Theory

Explanation: Automata theory is also known as the theory of computation.this theory describes about the simple machines in accordance with the computation logic.It is used in computer science field as well as mathematical field.

The function of the theory is to create the understanding of problem solving techniques and function.The functioning of the dynamic system which have the non-constant behavior  is the reason for the production of this theory.

Write a program that asks the user to enter a person’s age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult.

Answers

Answer:

The c++ program for the given scenario is given below.

#include <iostream>

using namespace std;

int main() {

   int age;

   string person;

   cout << "This program prints whether the person is an infant, a child, a teenager or an adult based on the age entered by the user." << endl;

   cout << "Enter the age in completed years" << endl;

   cin >> age;

   if( age>=0 && age<=1 )

       person = "infant";

   else if( age>1 && age<13 )

       person = "child";

   else if( age>=13 && age<20 )

       person = "teenager";

   else

       person = "adult";        

   cout << "The person is " << person << " at the age of " << age << endl;

   return 0;

}

OUTPUT

This program prints whether the person is an infant, a child, a teenager or an adult based on the age entered by the user.

Enter the age in completed years

1

The person is infant at the age of 1  

Explanation:

This program prints the phase of the human life based on the age entered by the user. The program executes as follows.

1. User is prompted to enter the age in completed years. The program does not validates the user inputted age since it is not specifically mentioned in the question.

2. An integer variable, age, is declared which is initialized to the age entered by the user.

3. A string variable, person, is declared which is initialized to the phase of the person based on the entered age. The variable person is not initialized.

4. The age of the user is tested using multiple if else statements. Based on the age criteria given in the question, the variable person is assigned a value. This value represents the phase of the person which is equivalent to the age.

5. The program terminates with a return statement since the main method has the return type of integer.

Final answer:

A program was written to categorize a person's life stage based on age. It asks the user to enter the age and then utilizes conditional statements to determine if the individual is an infant, child, teenager, or adult. The program is designed in Python with simple if-else statements.

Explanation:

Program to Determine Life Stage Based on Age

To answer the student's question, we will write a simple program that asks the user to input a person's age and then determines whether that person is classified as an infant, a child, a teenager, or an adult. The program utilizes conditional statements to categorize the age into the appropriate life stage following the given guidelines.

Here's a sample structure for the program in Python:

# Ask the user to input the age
age = int(input("Enter the person's age: "))

# Determine the life stage
if age <= 1:
   print("This person is an infant.")
elif age > 1 and age < 13:
   print("This person is a child.")
elif age >= 13 and age < 20:
   print("This person is a teenager.")
else:
   print("This person is an adult.")
The output of the program will inform the user of the life stage based on the age provided.

What is your understanding of the difference between a stream cipher and a block cipher?

Answers

Answer:

In a stream cipher, the information is ciphered byte-by-byte.

In a block cipher, the information is ciphered block by block.

Explanation:

Suppose I have the following text:

Buffalo Bills New England Patriots

New York Jets Miami Dolphins

Each line is one byte, so, on the stream cipher, i am going to apply the ciphering algorithm on:

The letter B

The letter u

The letter f

Until

The letter s(of Miami Dolphins)

Now for the block cipher, i am saying that each line is a block, so the algorithm is going to be applied.

First on: Buffalo Bills New England Patriots

Then: New York Jets Miami Dolphins

Final answer:

A stream cipher processes input data bit by bit or byte by byte, generating a stream of encrypted output. A block cipher divides input data into fixed-length blocks and encrypts each block separately using a fixed encryption algorithm and a secret key.

Explanation:

A stream cipher and a block cipher are two different encryption techniques used in computer cryptography. The main difference between them lies in the way they encrypt data. A stream cipher processes the input message bit by bit or byte by byte, generating a stream of encrypted output. This stream is combined with the plaintext using a bitwise operation such as XOR to produce the ciphertext. Stream ciphers are typically used for real-time applications or when individual bits need to be encrypted and decrypted.

On the other hand, a block cipher divides the input message into fixed-length blocks, usually 64 or 128 bits, and encrypts each block separately. The blocks are encrypted using a fixed encryption algorithm and a secret key. Block ciphers are commonly used for securely encrypting large amounts of data in a fixed block size.

how would you define a relational database ?
a. data stored in a table
b. data stored in multiple tables each with a relationship to each other
c. data arranged in a table as rows and columns so data can be extracted at an intersection rather than reading the whole table from beginning to end
d. database design follows the twelve principles proffered bh Dr. Edgar F. Codd

Answers

Answer: (D) Database design follows the twelve principles proffered by Dr. Edgar F. Codd

Explanation:

 The relational database is basically based on the relational model of the data which is proposed by the Dr Edger F. codd and he mainly introduced the twelve basics principle of the database designing in the database system. He also contributed various valuable principle in the computer science.

The twelve principle are:

The first rule of the relational database is the information rule as it represented all data or informationIndependence of the integrityViewing various updating ruleLogically treatment of various NULL valueIndependence of the physical databaseDistribution in-dependencyVarious delete, insert and update rulesThe overall logical description of the database are basically stored in the database directoryThere is no subversion ruleThere is guarantee accessing ruleProper rule for data language The relational database level actions

Differentiate between morals and ethics. (2.5 Marks)

Answers

Answer:

 Ethics is the branch of the moral philosophy and basically refers to the rules that is provided by the external source. Ethics is the standard principle and value that is used by the individual decisions and actions.

Organizational ethics is very important in an organization so that they can govern the employee ethics and value towards their organization.  Honesty, fair are the main principles of the ethics.

Morals basically refers to the individual's principle regarding the wrong and right decision making.

Morals in the organization is the is the consistency of the individual manner, standard and it basically guide the basic values in the organization.

Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
it is crisp and models one specific element
has well define responsibilities
it has high cohesion
it has high coupling

Answers

Answer:it has high coupling

Explanation: Coupling is the property in the field of computer program that is defined as the functions ,data and  codes of the program are dependent on each other and cannot be changed independently if requires. Thus,high amount of coupling is not considered as good factor due to high interdependence. Loose coupling can be still permitted.

Other options are correct because name of the class should reflect the purpose and well defined responsibilities should be present, modeling of certain component and high cohesion means keeping similar functions togather is also required. So, the only bad factor is high coupling

An expression containing the operator && is true either or both of its operands are true. True/False

Answers

Answer:

True.

Explanation:

An expression containing the && and  operator is only true if both of the operands present in the expression are true otherwise it will give the result as false if either one of them is false or both of them are false.In the question it states that the expression in true either or both of it's operand are true.

Hence the answer is true.

Write an if statement that assigns to the variable biggest the Greatest value contained in variables i, j and k, Assume the three values are distinct.

Answers

Answer:

if(i > j && i > k) // check if i is greatest

{

   biggest = i;

}

else if( j> i && j > k) // check j is greatest

{

    biggest = j;

}

// else highest is k

else                // otherwise k is greatest

{

   biggest = k;

}

Explanation:

Following are the program in c++ language

#include<iostream> // header file

using namespace std; // namespace

int main() // main function

{

int i,j,k;// varaible declaration

int biggest;

cout<<" \nenter the value i,j and k:\n ";

cin>>i>>j>>k;

if(i > j && i > k) // check if i is greatest

{

   biggest = i;

}

else if( j> i && j > k) // check j is greatest

{

    biggest = j;

}

// else highest is k

else                // otherwise k is greatest

{

   biggest = k;

}

cout<<" the biggest number is :"<<biggest;

return(0);

}

Output:

enter the value i,j and k:

67

8

9

the biggest number is :67

In this  program we check the following condition:

if(i > j && i > k) then it store the value of i into biggest variable .

if( j> i && j > k) then it store the value of j into biggest variable .

otherwise the value of k is store into biggest variable .

 

Why would you use a database system instead of traditional file system

Answers

Answer:

Traditional database system is the system that contains all the data in the computer files on a computer system. The organization of the data is done in the form of files sets. In this system, large amount of data is not properly accessible due to inefficiency and also consumes lot of time.

Instead of the traditional system,database system is used, which has the collection of the data that gets stored in the database management system(DBMS).They can be managed by the operating system.

They have qualities like consuming large amount of data, any type of information, independent to work ,less time-taking development of application for etc. which is not present in traditional system.Thus database system are chosen over the traditional system.

Procedures do NOT reduce mistakes in a crisis.

True

False

Answers

Answer: False

Explanation: Procedure is the planning technique that is used for the defining the events or steps in a serial manner. The series of action requires to deal at the time of crisis is known as the crisis management procedure.

So ,if the procedure is made for the critical situation , it will contain the well managed steps along with the alertness towards handling the critical situation .The steps towards the precaution, avoidance of harm and tackling will reduce the mistakes in the crisis. Thus the statement given is false.

Other Questions
Need a metaphor sentence for butterfly Solve the equation c2 = 4. Look at these equations.11 = 5 + aa + 4 = b + 3Use both equations to work out the value of b.Pls Help Message left on voicemail: "Hi Nikki! Just landed at the airport. How about dinner this evening if you're available. Call me!" Which of the following characteristics of useful information is absent in the situation described above?A) relevantB) reliableC) completeD) timelyE) understandableF) verifiableG) accessible While you are at the store, please get: flour, eggs, and milk to make brownies. Why did Japan open its ports to European trade after centuries of isolationism?A. A flood of foreigners entered the country, demanding more trade.B. Commodore Matthew Perry demanded that Japan begin trading.C. Mt. Fuji erupted and Japan needed assistance.D. A Chinese invasion forced Japan to end its isolationism. Name the approach to psychology that focuses on how the brain receives information, forms perceptions, creates and retrieves memories, synthesizes information, and produces integrated patterns of action. Not yet answered Marked out of 2.00 What is the concentration of NH4+ in 60.0 mL of a 0.50 M solution of (NH4)3PO4? (To write your answer using scientific notation use 1.0E-1 instead of 1.0 x 10-?) Answer: Answer Zeta Anderson, futuristic super-spy for the Terran Confederation, has completed her objective of stealing intelligence from the Zorn collective. Stealthily, she slips into her space suit (with jet-pack), and slips from an airlock, headed for her stealth ship. Her jet-pack can supply her with a constant acceleration, and gravity can be neglected. When she turns on her jet-pack, how does her velocity change? Since she does not want to be going too fast (and either overshoot, or collide with her ship), how does her velocity change when she turns the jet-pack off? 20 pointsBeyond an excellent understanding of the design process, being a technical designer requires skills in what other area? Engineering Communication Art Transportation Which US cities had the greatest gap between the number of foreign-born residents and the number of native-born residents? Check all that apply.New YorkBaltimoreBostonPhiladelphiaNew Orleans 11. A graduating senior seeking a job has interviews with two companies. After the interviews, he estimates that his chance of getting an offer from the first company is 0.6. He thinks he has a 0.5 chance with the second company, and that the probability that at least one will reject him is 0.8. What is the probability that he gets at least one offer? An electron has an initial speed of 4.04 105 m/s. If it undergoes an acceleration of 3.3 1014 m/s 2 , how long will it take to reach a speed of 7.07 105 m/s? A student is running at her top speed of 5.4 m/s to catch a bus, which is stopped at the bus stop. When the student is still a distance 38.5 m from the bus, it starts to pull away, moving with a constant acceleration of 0.171 m/s2.a) For how much time and what distance does the student have to run at 5.4m/s before she overtakes the bus?b) When she reaches the bus how fast is the bus travelingc) Sketch an x-t graph for both the student and the bus. Take x=0 at the initial position of the studentd) the equations you used in part a to find the time have a second solution, corresponding to a later time for which the student and bus are again at the same place if they continue thier specified motion. Explain the significance of this second solution. How fast is the bus traveling at this pointe) If the students top speed is 3.5 m/s will she catch the bus?f) is the minumun speed the student must have to just catch up with the bus? For what time and distance must she run in that case A mail carrier parks her postal truck and delivers packages. To do so, she walks east at a speed of 0.80 m/s for 4.0 min, then north at a speed of 0.50 m/s for 5.5 min, and finally west at a speed of 1.1 m/s for 2.8 min. Define east as +x and north as +y. (a) Write unit-vector velocities for each of the legs of her journey. (b) Find unit-vector displacements for each of the legs of her journey. (c) Find her net displacement from the postal truck after her journey is complete. HELP will mark brainilestThe original price of a sound system is $1250. For one day only, the store is offering a frequent shopper discount of 35% on all merchandise. Which expressions can be used to find the discounted price of the sound system? Check all that apply.0.35($1250)$1250 + 0.35($1250)0.65($1250)$1250 0.35($1250) Costs Benefits 1. Hire more workers 1. Set own hours of operation 2. Take on more operations costs 2. Have more space and control over appearance 3. Divide time between market and shopor close stall at market 3. Serve more customers 4. Accept more financial risk 4. Make and sell more food items Ezra runs a gyro stall at the local farmers' market. He would like to expand and open his own shop downtown. He has made the chart above, listing some potential costs and benefits of expansion. What concept does this chart most clearly illustrate? Two parts of Adam referred to in Genesis 2:7 are: What is the least common multiple (LCM) of 10 and 12? Shirtbarn is having a sale where everything in the store is 40% off. How much will be saved by purchasing $224 of cloths be at the register? Ofcourse you should really be worrying about how much it will cost you!