Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

What should Sheila have done to avoid interviews like this one?

Answered: 1 week ago