Explore BrainMass

Basic Programming: Designing Programs, Class Diagram, Pseudocode, and Designing Applications

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

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
IF Average >= 80 or Average <=89 THEN
Output = "Nice work"
Output = "Your average is: ", Average
Output = "You will better next time!"

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
p = p + 1

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."

© BrainMass Inc. brainmass.com October 25, 2018, 5:59 am ad1c9bdddf

Solution Summary

This posting contains the solution to the given problems.

See Also This Related BrainMass Solution

Systems Analysis is devised.

Systems analysis is the second phase in the systems development life cycle. In the prior phase, systems planning, you prepared a feasibility study and proposed a broad solution to problems you identified. In the systems analysis phase you will develop a model of your proposed system. This phase applies modeling techniques such as requirements modeling, data and process modeling, and object modeling. The goal of this step is to build a solid foundation for the design phase of the project.

For this project, you will prepare a System Requirements document using MS Word. The document should include the following:

A business letter introducing the contents of this document and summarizing any changes made from the feasibility study
A description of the resources required for the project and how they will be utilized
A visual representation of the system including its constituent components (you should use a drawing program and embed the graphic into your document or use MS Word's drawing capabilities)
A discussion of the analysis performed and the conclusions reached
A summary of the system requirements for the project, including cost estimates

View Full Posting Details