Determine the screen output of code segment

Assignment Help Software Engineering
Reference no: EM1379966

Question 1
Determine the screen output of the following code segment? Describe the reasoning behind your answer.
Test1 = 70
Test2 = 98
Test3 = 84
NumberOfTests = 3
Average = (Test1 + Test2 + Test3) / NumberOfTests
IF Average >= 90 THEN
Output = "Great job"
Output = "Your average is: ", Average
ELSE
IF Average >= 80 or Average <=89 THEN
Output = "Nice work"
Output = "Your average is: ", Average
ELSE
Output = "You will better next time!"
ENDIF

Question 2
What screen output does the following code segment produce?
p = 2
q = 4
while p < q
Output = "Adios"
r = 1
while r < q
output = "Adios"
r = r + 1
endwhile
p = p + 1
endwhile

Question 3
Design a program that allows a user to enter 10 numbers, then displays them in the reverse order of their entry. You
must use an Array as your data structure.

Question 4
Design a class named CustomerRecord that holds a customer number, name, and address. Include methods to set
the values for each data field and output the values for each data field. Create the class diagram and write the
pseudocode that defines the class.

Question 5
Design an application in which you declare an array of five numbers and store five values in the array. Write a try block in which you loop to display each successive element of the array, increasing a subscript by one on each pass through the loop. Assume you are working with a language that automatically creates an ArrayIndexOutOfBoundsException when a subscript is not correct for an array. Create a catch block that catches the exception if it is generated and displays the message, "Now you've gone too far."

Reference no: EM1379966

Questions Cloud

Vhdl coding : The main mission of this project is to design and build a tap changer which is going to be fitted to power transformers for regulation of the output voltage to required levels for the Micro Grid. The tap changer system will consist of 9 changers with..
Creating a modularized body mass index program : Create a modularized Body Mass Index (BMI) Program which will compute the BMI of a team player.
Restaurant of marketing strategy of manhattan ks : If you were inquired to develop one restaurant of marketing strategy of Manhattan KS you just want to come up with about five information wants (explain what do people in Riley County spend per week on dining out?
What does it express us about capitalism : Is Wal-Mart's rapid increase to retail dominance a positive or a negative development for our society? What does it express us about capitalism, globalization and the plight of workers?
Determine the screen output of code segment : Determine the screen output of the following code segment? Explain your answer.
Jarret owns city of savannah promises with an adjusted basis : Jarret owns city of Savannah promises with an adjusted basis of $100000. During the year he receives interest payments of $3000. Jarret partially financed the purchase of the bonds by borrowing $80000 at 5% interest
Research about dining facilities at the grand hyatt seattle : As a meeting planner you want choices for meals. Please research about dining facilities at the Grand Hyatt Seattle. You need to know what sites will be interesting to your attendees
Create an employee class : Create an Employee class that has fields for the given pieces of data, Also create a class named ProductionWorker that extends the Employee class.
One manufacturer of dictating machines recruits : One manufacturer of dictating machines recruits merely experienced people and doesn't recruit among graduating college students. A competitor recruits extensively amongst colleges in its search for salespeople

Reviews

Write a Review

Software Engineering Questions & Answers

  Fixing errors for java code

The code compiles properly and runs, but result is not what you expected; output is similar to the following, Describe what the problem is how to fix it.

  How software architecture department can support production

Explain how Software Architecture Department can support production, inventory, sales, and marketing to assure Zilack can meet its business objectives.

  Analyzing code snippet

Analyze the code snippet and describe why it will work or why not it will not. Code required to make this a complete program intentionally left out.

  Key drawbacks of the numbered code

Think about the flashlight-messaging (ABC=123); Determine the key drawbacks of the Numbered Code?

  Arithmetic calculator application

Create an application that permits the user to enter a series of numbers and manipulate them. The application should provide users with the option of adding or multiplying numbers.

  Diffie hellman key agreement

Assume that users Alice and Bob carry out the Diffie-Hellman key agreement protocol with p = 50147 and g = 5. Assume that Alice chooses x = 1367 and Bob chooses y = 3789.

  Sketch diagram displaying how message-application-layer

Sketch a diagram displaying how message gets from Alice's host to Bob's host. Ensure to list series of application-layer protocols which are used to move message between two hosts.

  Evaluate efficacy of systems and process integration

You have been hired by the senior management team of a publishing house to evaluate the efficacy of systems and process integration with the organization's book distributor.

  Construct a data dictionary and draw a hierarchy chart

Construct a data dictionary, and draw a hierarchy chart and flowchart or pseudocode for a program to produce a report for the principal of a school.Output.

  Draw decision table and draw decision tree

Write structured english for clyde's narrative of the reimbursment policies. Write structure English, draw decision table and draw decision tree.

  Create a computer program

Create a class named Consumer Record that holds a consumer number, name, and address. Include technique to set the values for each data field and output the values for each data field.

  Creating an idef1x e-r diagram

The scenario is that the Public Affairs Office at Highline University gets requests for speakers on particular topics. To be able to respond to such request, that office wishes to create a database.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd