Question: QUESTION 32 Assume three String variables named student1, student2, and student3 that have been initialized with students last names. A Stringvariable first has also been

QUESTION 32

Assume three String variables named student1, student2, and student3 that have been initialized with students last names. A Stringvariable first has also been declared.

Complete the code fragment that will result in first containing the student last name that is first alphabetically.

first = student1; if(student2.compareTo(first) > 0) { } if(student3.compareTo( > 0) { }

10 points

QUESTION 33

Assume that symbol is a char variable has been declared and already given a value. Write an expression whose value is true if and only if symbol is alphanumeric, that is either a letter or a decimal digit.

(symbol choose answer<<===>>=&&|| 'A' choose answer<<===>>=&&|| symbol choose answer<<===>>=&&|| 'Z') choose answer<<===>>=&&|| (symbol choose answer<<===>>=&&|| 'a' choose answer<<===>>=&&|| symbol choose answer<<===>>=&&|| 'z') || (symbol choose answer<<===>>=&&||'0' choose answer<<===>>=&&|| symbol choose answer<<===>>=&&|| '9')

10 points

QUESTION 34

Which expression(s) are an exact match to the regular expression p*pkk*kk*?

Choose Yes or No for each string of characters

ppp

choose answeryesno

kkkkk

choose answeryesno

pk

choose answeryesno

pkk

choose answeryesno

ppkk

choose answeryesno

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!