Midterm Practical Exam (1).pdf

  • Uploaded by: Monica Rasgo
  • 0
  • 0
  • August 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Midterm Practical Exam (1).pdf as PDF for free.

More details

  • Words: 419
  • Pages: 2
MIDTERM PRACTICAL EXAM Based on the following output, construct the codes using all possible structures. Welcome to MIDTERM Practical Exam, please choose a lesson to start an exercise: A. Basic Display of Hello World B. Using Arithmetic Operation C. Using Decision Control Structures D. Using Single Array E. Using Stack and Queue F. Exit the program Enter your choice here => //A. Basic Display of Hello World This is the basic structure of displaying a String: public class hello{ public static void main (String [] args) { System.out.println(“Hello World”); }} Do you want to try again? [Y] to return to Basic Display of Hello World menu and [N] to return to the Main Menu. => //B. Using Arithmetic Operation Enter two integers: a. Sum => b. Difference => c. Product => d. Quotient => Do you want to try again? [Y] to return to Using Arithmetic Operation menu and [N] to return to the Main Menu. => //C. Using Decision Control Structures Determine an Integer whether it is ODD or EVEN A. IF Statement B. IF ELSE Statement C. IF ELSE IF Statement Enter your choice here = > Enter an Integer => The integer is an <EVEN> number. Do you want to try again? [Y] to return to Using Decision Control Structures menu and [N] to return to the Main Menu. => //D. Using Single Array Enter the Start Number: <snum> Enter the Last Number: < lnum> Enter First name: Enter Last name Display Result: _ <snum> _ “ “ “ “ _ _ /*Note: Start Number either larger or smaller than the Last Number: */ Do you want to try again? [Y] to return to Using Single Array menu and [N] to return to the Main Menu. =>

//E. Using Stack and Queue Choose a Method Stack Queue Enter your choice here = > //Stack You choose Stack Method! Enter five Names: Stack = > Stack.peek() => Stack.size() = > Stack.pop() => Stack => Is Stack Empty = > Do you want to try again? [Y] to return to Using Stack and Queue menu and [N] to return to the Main Menu. => //Queue You choose Queue Method! Enter five Names: Queue = > Queue.peek() => Queue.size() = > Queue.remove() => Queue => Is Queue Empty = > Do you want to try again? [Y] to return to Using Stack and Queue menu and [N] to return to the Main Menu. =>

---------------------------------------------------------------------------------------------------------------------------------------------------------------BONUS POINTS: -

Error Message is available

Related Documents

Practical Exam Midterm
November 2019 26
Midterm Exam
May 2020 15
Midterm Exam
November 2019 21
Practical Exam
April 2020 15
Practical Exam
November 2019 16

More Documents from ""

De Angel Argueta
August 2019 53
Animals 4
November 2019 53
Cover.docx
May 2020 28
Peces Del Desierto
November 2019 44
576.pdf
December 2019 45