Answer:
See explaination
Explanation:
#include <iostream>
#include <string>
#include <stdio.h>
#include <cst dlib>
using namespace st d;
int main(int argc, char *argv[])
{
int airplane[13][6];
char airchar[13][6];
string ticket;
int row[2];
char seat;
//--------------------------------------------
for(int i = 0; i < 13; i++)
{
for(int j = 0; j < 6; j++)
{
airchar[i][j] = '*';
airplane[i][j] = 0;
}
}
//--------------------------------------------
for(;;)
{
cout<<"Rows 1 and 2 are first class (F C)"<<endl;
cout<<"Rows 3 through 7 are business class (B C)"<<endl;
cout<<"Rows 8 through 13 are economy class (E C)"<<endl;
cout<<endl;
cout<<"* - Available"<<endl;
cout<<"X - Occupied"<<endl;
cout<<endl;
cout<<" \t A\t B\t C\t D\t E\t F"<<endl;
cout<<"Row 1\t"<<airchar[0][0]<<"\t"<<airchar[0][1]<<"\t"
<<airchar[0][2]<<"\t"<<airchar[0][3]<<"\t"<<airchar[0][4]<<"\t"
<<airchar[0][5]<<endl;
cout<<"Row 2\t"<<airchar[1][0]<<"\t"<<airchar[1][1]<<"\t"
<<airchar[1][2]<<"\t"<<airchar[1][3]<<"\t"<<airchar[1][4]<<"\t"
<<airchar[1][5]<<endl;
cout<<"Row 3\t"<<airchar[2][0]<<"\t"<<airchar[2][1]<<"\t"
<<airchar[2][2]<<"\t"<<airchar[2][3]<<"\t"<<airchar[2][4]<<"\t"
<<airchar[2][5]<<endl;
cout<<"Row 4\t"<<airchar[3][0]<<"\t"<<airchar[3][1]<<"\t"
<<airchar[3][2]<<"\t"<<airchar[3][3]<<"\t"<<airchar[3][4]<<"\t"
<<airchar[3][5]<<endl;
cout<<"Row 5\t"<<airchar[4][0]<<"\t"<<airchar[4][1]<<"\t"
<<airchar[4][2]<<"\t"<<airchar[4][3]<<"\t"<<airchar[4][4]<<"\t"
<<airchar[4][5]<<endl;
cout<<"Row 6\t"<<airchar[5][0]<<"\t"<<airchar[5][1]<<"\t"
<<airchar[5][2]<<"\t"<<airchar[5][3]<<"\t"<<airchar[5][4]<<"\t"
<<airchar[5][5]<<endl;
cout<<"Row 7\t"<<airchar[6][0]<<"\t"<<airchar[6][1]<<"\t"
<<airchar[6][2]<<"\t"<<airchar[6][3]<<"\t"<<airchar[6][4]<<"\t"
<<airchar[6][5]<<endl;
cout<<"Row 8\t"<<airchar[7][0]<<"\t"<<airchar[7][1]<<"\t"
<<airchar[7][2]<<"\t"<<airchar[7][3]<<"\t"<<airchar[7][4]<<"\t"
<<airchar[7][5]<<endl;
cout<<"Row 9\t"<<airchar[8][0]<<"\t"<<airchar[8][1]<<"\t"
<<airchar[8][2]<<"\t"<<airchar[8][3]<<"\t"<<airchar[8][4]<<"\t"
<<airchar[8][5]<<endl;
cout<<"Row 10\t"<<airchar[9][0]<<"\t"<<airchar[9][1]<<"\t"
<<airchar[9][2]<<"\t"<<airchar[9][3]<<"\t"<<airchar[9][4]<<"\t"
<<airchar[9][5]<<endl;
cout<<"Row 11\t"<<airchar[10][0]<<"\t"<<airchar[10][1]<<"\t"
<<airchar[10][2]<<"\t"<<airchar[10][3]<<"\t"<<airchar[10][4]<<"\t"
<<airchar[10][5]<<endl;
cout<<"Row 12\t"<<airchar[11][0]<<"\t"<<airchar[11][1]<<"\t"
<<airchar[11][2]<<"\t"<<airchar[11][3]<<"\t"<<airchar[11][4]<<"\t"
<<airchar[11][5]<<endl;
cout<<"Row 13\t"<<airchar[12][0]<<"\t"<<airchar[12][1]<<"\t"
<<airchar[12][2]<<"\t"<<airchar[12][3]<<"\t"<<airchar[12][4]<<"\t"
<<airchar[12][5]<<endl;
cout<<endl;
cout<<"Enter Ticket type (F C, B C, or E C): ";
cin>>ticket;
cout<<"Desired Row: ";
cin>>row[0];
cout<<"Desired seat (A,B,C,D,E or F): ";
cin>>seat;
switch(seat)
{
case 'A':
case 'a':
row[0] = row[0] - 1;
row[1] = 1;
row[1] = row[1] - 1;
break;
case 'B':
case 'b':
row[0] = row[0] - 1;
row[1] = 2;
row[1] = row[1] - 1;
break;
case 'C':
case 'c':
row[0] = row[0] - 1;
row[1] = 3;
row[1] = row[1] - 1;
break;
case 'D':
case 'd':
row[0] = row[0] - 1;
row[1] = 4;
row[1] = row[1] - 1;
break;
case 'E':
case 'e':
row[0] = row[0] - 1;
row[1] = 5;
row[1] = row[1] - 1;
break;
case 'F':
case 'f':
row[0] = row[0] - 1;
row[1] = 6;
row[1] = row[1] - 1;
break;
}
if(ticket == "F C")
{
if(row[0]+1 == 1 || row[0]+1 == 2)
{
if(airplane[row[0]][row[1]] == 0)
{
airplane[row[0]][row[1]] = 1;
airchar[row[0]][row[1]] = 'X';
}
else if(airplane[row[0]][row[1]] == 1)
{
cout<<"Message: Seat "<<row[0] + 1<<seat<<" is already occupied"<<endl;
system("Pause");
}
}
else
{
cout<<"Wrong Class"<<endl;
system("Pause");
system("cls");
continue;
}
}
else if(ticket == "B C")
{
if(row[0]+1 == 3 || row[0]+1 == 4 || row[0]+1 == 5
|| row[0]+1 == 6|| row[0]+1 == 7)
{
if(airplane[row[0]][row[1]] == 0)
{
airplane[row[0]][row[1]] = 1;
airchar[row[0]][row[1]] = 'X';
}
else if(airplane[row[0]][row[1]] == 1)
{
cout<<"Message: Seat "<<row[0] + 1<<seat<<" is already occupied"<<endl;
system("Pause");
}
}
else
{
cout<<"Wrong Class"<<endl;
system("Pause");
system("cls");
continue;
}
}
else if(ticket == "E C")
{
if(row[0]+1 == 8 || row[0]+1 == 9 || row[0]+1 == 10
|| row[0]+1 == 11|| row[0]+1 == 12|| row[0]+1 == 13)
{
if(airplane[row[0]][row[1]] == 0)
{
airplane[row[0]][row[1]] = 1;
airchar[row[0]][row[1]] = 'X';
}
else if(airplane[row[0]][row[1]] == 1)
{
cout<<"Message: Seat "<<row[0] + 1<<seat<<" is already occupied"<<endl;
system("Pause");
}
}
else
{
cout<<"Wrong Class"<<endl;
system("Pause");
system("cls");
continue;
}
}
row[0] = 0;
row[1] = 0;
system("cls");
}
return 0;
}
Requirements analysis phase
Decision analysis phase
None of the above
Answer: Problem analysis phase
Explanation: Problem phase analysis is the mechanism that helps in studying the problems and issue that occur in the application and system of any business organization.It helps in identification of the reason and consequences of the detected problems.The requirements of user and resources to accomplish business system is also analyzed.
Other options are incorrect because scope definition phase is used for identification of the boundaries of any project regarding opportunities and issue in business .
Requirement analysis phase is used for gathering the need of the user and the condition requirement to fulfill a project. Decision phase analysis is done to bring out the best possible solution for any project. Thus, the correct option is problem analysis phase.
Answer: Scope resolution operator(::)
Explanation: A member function and the constructor can be called within the function easily but for the execution of the these components outside the class , a special operator is required to call the functions. The scope resolution operator(::) preceding with the name of class is thus used for defining of the function outside class.This operator maintains the cope of the function and constructor outside the class.
b. It allows an administrator to analyze a computer and compare its configuration settings with a baseline.
c. It can apply a baseline to force current computer settings to match the settings defined in the baseline.
d. It uses security templates to store the settings that make up baselines.
Answer: a. It evaluates the current security state of computers in accordance with Microsoft security recommendations
Explanation:
The Security Configuration and Analysis tool allows the configuration of local computers through the application of the settings in a security template to the local policy.
This allows an administrator to analyze a computer and compare its configuration settings with a baseline. The Security Configuration and Analysis (SCA) tool also uses security templates to store the settings that make up baselines.
Therefore, based on the options given, the correct option is A as the SCA tool doesn't evaluate the current security state of computers in accordance with Microsoft security recommendations.
Answer:
A bool can hold only true or false values.
A char can hold maximum 65535 characters.
An int can hold maximum positive value of 2,147,483,647.
A float can hold maximum positive value of 3.4 x 10^{38}.
Explanation:
Primitive data types in Java language can be categorized into boolean and numeric data types.
Numeric can be divided further into floating point and integral type. Floating data type includes float and double values while and integral data type which consists of char, int, short, long and byte data types.
Every data type has a range of values it can hold, i.e., every data type has a minimum and maximum predefined value which it is allowed to hold. The intermediate values fall in the range of that particular data type.
Any value outside the range of that particular data type will not compile and an error message will be displayed.
The data types commonly used in programming are boolean, char, int and float.
A boolean variable can have only two values, true or false.
A char variable can hold from 0 to 65535 characters. Maximum, 65535 characters are allowed in a character variable. At the minimum, a char variable will have no characters or it will be a null char variable, having no value.
An int variable has the range from minimum -2^{31} to maximum 2^{31} – 1. Hence, the maximum positive value an int variable can hold is (2^{31}) – 1.
A float variable can hold minimum value of 1.4 x 10^{-45} and maximum positive value of 3.4 x 10^{38}.
The above description relates to the data types and their respective range of values in Java language.
The values for boolean variable remain the same across all programming languages.
The range of values for char, int and float data types are different in other languages.
The decimal number which is equivalent to binary number 11111011 is 251.
Binary numbers are base-2 numbers, which means they are composed of only two digits: 0 and 1.
Each digit in a binarynumber represents a power of 2, starting from the rightmost digit.
The rightmost digit represents 2⁰ (which is 1), the next digit represents 2¹(which is 2), the next represents 2² (which is 4), and so on.
Given the binary number 11111011:
1 × 2⁷ + 1 × 2⁶ + 1 × 2⁵ + 1 × 2⁴ + 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
Simplifying each term:
128 + 64 + 32 + 16 + 8 + 0 + 2 + 1
= 251
Hence, 251 is the decimalnumber which is equivalent to binary number 11111011.
To learn more on Binary numbers click here:
#SPJ3
Answer:
251
Explanation:
Answer:
SELECT TECHNAME, EMPNUM, YEAR FROM EMPLOYEE ORDER BY YEAR DESC
Explanation:
The table definition is not given;
However, I'll make the following assumptions
Table Name:
Employee
Columns:
Technician name will be represented with Techname
Employee number will be represented with Empnum
Year Hired will be represented with Year
Having said that; the sql code is as follows:
SELECT TECHNAME, EMPNUM, YEAR FROM EMPLOYEE ORDER BY YEAR DESC
The newest year hired will be the largest of the years;
Take for instance:
An employee hired in 2020 is new compared to an employee hired in 2019
This implies that the year has to be sorted in descending order to maintain the from newest to oldest.