Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Boolean w6 using Relational and Logical Operators to Evaluate Logical (Boolean) Expression Evaluate the logical (Boolean) expressions in the following exercises and circle the correct answer after you evaluation. For char and String types, use the Unicode collating sequence.

Expression

Result (Circle correct answer)

1.      int num1 = 3,  num2 = 2;

(num1  >  num2)

T          F

2.    double hours = 12.8;

(hours  >  40.2)

T          F

3.    int  funny =  7;

(funny  !  =  1)

T          F

4.    char  letter  =  ' A ';

('a' < letter )

T          F

5.    int  count =  1;

count  < = 4;

T          F

6.    double  y =  -2 . 3;

y  > =  0.0;

T          F

Expressions Use the following values: X = false,  y = false,  z = true

Result (Circle all possible answers)

1.    !  (  x | | y)  | |  z

T     F     short - circuit

2.    x  &&  z  &&  y

T     F     short - circuit

3.    !  x   |  |  (y   |  |  !  z)

T     F     short - circuit

4.    x   | |   (z   &&  (y   | |   x)  )

T     F     short - circuit

5.    true  | |  !  z  &&  y

T     F     short - circuit

6.    !  (x  | |  y)  | |  x

T     F     short - circuit

7.    z   &&   x   &&   y

T     F     short - circuit

8.    !   x   | |   (y   | |   !   z)

T     F     short - circuit

9.    x   | |   (y   &&   (x   | |   z)  )

T     F     short - circuit

10.    false   | |   !   x   &&   y

T     F     short - circuit

 

Expression Use the  following values:

X = false,  y = false,  z = true

T     F    

(Circle all possible answers)

Result (Circle all possible answers)

1.    String  name1 = "Aaron" ;

String  name2 = "aaron" ;

name1. compareTo(name2)= = 0

T           F 

2.    String name1 = "Aaron" ;

String name2 = "Aardvark" ;

namel. compareTo(name2) > 0

T          F

3.    Boolean flag = true;

int a = 2,  b = 5,  c = 10;

(a  *  b  <  =  c  &&  !  flag)

T          F

4.    String  name1  =  "Aaron" ;

String  word  =  "A" ;

name1 .compareTo(word)  <  0

T          F

5.    int  x = 2;

double   y   =   1 . 1;

(x  -  y)  = =  0 . 9

T          F

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91426105
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in DBMS

Question create an erd for the following scenarioa small

Question: Create an ERD for the following scenario. A small company ABC wants a database to keep track of internal company information. Â Given the following information create an ERD. The ABC Company has several departm ...

Suppose that we have a table of house prices and a table of

Suppose that we have a table of house prices and a table of zip codes: • hprices(hid (PK),address,bedrooms,price,zipcode) • zipcodes(zipcode (PK),state) Write a SQL query that finds the average, maximum, and minimum pric ...

Analytic reportpurpose the purpose of this task is to

Analytic Report: Purpose: The purpose of this task is to provide students with practical experience in working in teams to write a Data Analytical report to provide useful insights, pattern and trends in the chosen/given ...

Questionsuppose a prolog database exists that gives

Question: Suppose a Prolog database exists that gives information about states and capital cities. Some cities are big, others small. Some states are eastern, others are western. a. Write a query to find all the small ca ...

Students will select a situation or problem from their

Students will select a situation or problem from their company as a course project that can be solved using a database system. Using MS Access, or MS SQL Server Express, students will create a relational database model o ...

A taking an unnormalised list describe how you would

(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the process of developing a RDBMS for a natio ...

In sql developercreate a table userpermissions provide

IN SQL DEVELOPER Create a table UserPermissions (provide create and insert statements code) Document UserName Policy SYSTEM Menu JDOW W2 USAM Permissions SYSTEM W2 JDOW Form 1040 USAM Policy JDOW W2 SYSTEM Write a PL/SQL ...

Question create the physical data model for the logical

Question: Create the physical data model for the logical data model that you submitted in IP3. This should include all of the data definition language SQL. Your submission should include all DDL needed to: Create the tab ...

A schools office of the registrar maintains data about the

A School's office of the registrar maintains data about the following entities: a) courses (including course number, title, credits, syllabus and prerequisites), b) course offerings (including course number, year, semest ...

Sqlwrite a select statement that returns one column from

SQL Write a SELECT statement that returns one column from the Vendor table named Full Name. Create this column from the VendorContactFName and VendorContactLName columns. Format it as follows: last name, comma, first nam ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As