{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSI1100_F04_Exam

# CSI1100_F04_Exam - CSI 1100 1500 Final Examination Page 1...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
CSI 1100 / 1500 Final Examination Page 2 of 13 Question 1A) (4 marks) In this question, use only the following ( pseudocode ) Boolean expressions: comparison operators: <, >, =, ±² ±² and Boolean connectors: NOT, AND, OR arithmetic operators: +, -, *, /, and MOD (modulo) variable names and constants. Use parentheses where necessary. Do not use Java syntax! Environment Canada will report a humidex value as part of a weather forecast if the temperature (T) is greater than or equal to 30 degrees, if the temperature is greater than or equal to 25 degrees and the humidity (H) is greater than 35%, or the temperature is greater than or equal to 20 degrees and the humidity is greater than or equal to 65%. Write a Boolean expression that is true if Environment Canada will report a humidex value, and false otherwise. Answer: Question 1B) (4 marks) Consider the following Java program : MyClass[] obj; int index; obj = new MyClass[2]; index = 15; while( index > 2 ) { obj[index % 2] = new MyClass( ); index = index / 2; } // Line X i) How many instances of MyClass are created during the execution of this program? (2 marks) Answer: ii) How many instances of MyClass are still accessible at Line X? (2 marks) Answer:
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern