Show them in the reverse order of their entry

Assignment Help Computer Engineering
Reference no: EM1334843

Question 1
What is the screen output of the following code segment? Explain 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: EM1334843

Questions Cloud

When business decisions are guided purely by : When business decisions are guided purely by self or financial-interests, the company and leaders usually end up in trouble with the ethics committee and/or legal arena," a valid point.  do you still see this as an issue within Corporate America?
Fixed manufacturing overhead cost applying to products : This fixed manufacturing overhead cost would be applied to the company's remaining products.
Explain sony playstation 3 case study : Explain Sony PlayStation 3 Case Study and What are the key success factors in the video gaming industry today
Explain how will reduced smokers affect the gdp : Explain how will reduced smokers affect the GDP in the long and short run. What does increased revenue from cigarette taxes do to the deficit and budget.
Show them in the reverse order of their entry : What is the screen output of the code segment? Explain the reasoning behind your reply.
Trade-offs to the strategy : For years, Ferrari has been known as the manufacturer of expensive luxury automobiles.  As Ferrari considers this trading-down strategy, what branding strategy would you recommend? What are the trade-offs to consider with your strategy?
Implications of changing workforce demographics : Prepare a "continuity plan" that includes the following workforce assessment and What are the implications of changing workforce demographics including the aging workforce
Illustrate marketing- pricing- distribution on these firms : Illustrate what marketing, pricing, distribution or other competitive advantages can firms exploit. What limits or constraints are on these firms.
Explain finding the critical path and project duration : Explain Finding the Critical Path and Project Duration and Determine the probability that the project will be finished in 80 days or less

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to create two sql scripts

Then make two SQL scripts. The first should be a DDL code for your tables, data, and PL/SQL package. The second should be an SQL script to show the testing of the execution of the package.

  Build a class hugeinteger which uses a 40-element array

make a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods input, output, add and subtract.

  Illustrate the constraint graph

Illustrate the constraint graph

  Make a c++ program containing a class fraction

construct a C++ program containing a class Fraction. The class data should have two variables numerator and denominator, both of type integer, to represent the fraction numerator/denominator.

  What is oriented programming and object-oriented design

Find out resources on Visual Basic. Select your favorite three and explain what they have to offer. Also discuss the differences between Object-Oriented Programming (OOP) and Object-Oriented Design (OOD).

  Advantages and disadvantages of moving this functionality

Many of the functions of an adapter could be performed in software that runs on the node's CPU.

  Create and extened class named suite

make a class named HotelRoom that includes an interger field for the room number and a double field for the nightly rental rate. Include get methods for these fields and constructor that requires an interger argument representing the room number.

  Engineer using an automated monitoring system

auto mechanic with an automatic diagnostic system.a train engineer using an automated monitoring system.

  How to calculate and display the total retail value

A mail order house sells five different products whose retail prices are: product 1 - $150, product 2 - $250, product 3 - $500, product 4 - $300, and product 5 - $350.

  Classify the use and location of firewalls

Classify the use and location of Firewalls Categorize the use and location of IPS or IDS where necessary.

  Defining the class counter

Write down the definition of the class counter consisting of: An instance variable named counter of type int. A constructor which takes one int argument and allocates its value to the counter.

  Imagine , a computer has 2^16 bytes of main memory

imagine , a computer has 2^16 bytes of main memory. There is a direct-mapped cache of 1K lines with a line size of 4 bytes.

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