Explore BrainMass

Control Structures

Control structures are a primary concept in high-level programming languages. Essentially, it is a block is code. Control structures block in the code which dictates the flow of the program. In other words, a control structure is a container for a series of function calls, instructions and statements.

A simple example of a control structure is as followed: if "x" then "y" else "z". These statements will be included or excluded based on the condition of "x". This notion of "if then" makes up the majority of software applications.  

The most common control structures are "gotos", "subroutines", "for loops", "do while loops", "if then" and "try catch finally". The names of these controls can change between languages but generally these concepts are universal across all imperative programming languages.

Programmers reading code need to be able to identify these control structures. Formatting them in a structured way allows them to be identifiable and distinct from each other. The coding standard constructs the control structures by combining a series of style rules; these rules center on indentation and line breaks throughout the code. 

The Loop Control Structure in the C# Language.

This is a program that I am working on. It is supposed to simulate the roll of a pair of dice 100 times, then write the results to a file. Once the file is written, the user clicks the read file button to read the file. I have the write file/roll dice button working. I have the read file working, it displays the results in a tex

Counter-Controlled while loop

Need help trying to figure out counter controlled while loop. I need to write a counter-controlled while loop that uses the loop control variable to take on the values 0 and 10. How do I initialize the loop control variable before the program enters the loop? In the boy of the loop, I need to multiply the value of the loop co

How to setup business rules in the database layer using DCL

A growing business's owners have identified only 2 perspective end-user roles for this project. Following an interview, you have assembled the following business rules: Function Clerk Store Manager 1. View inventory item master Yes Yes 2. Add, edit, delete inventory item master No Yes 3. Add, edit, delete inventory transac

Change control

What are two suggestions for ensuring an adequate change control on projects that involve outside contracts?

Public-Sector Organizations and Organizational Structure

There is generally a preference for tall, rather than flat, organizational structures in large public sector organizations. Unfortunately, this often results in bloated and generally less efficient operations. However, is it possible that in many countries, taller organizational structures are preferred because they allow mor

Project Management

Can you help me with the following? * Who approves and reject changes to the scope of the project? * Who approves and reject resources. * Should the project manager have full authority to change control? * What type of system should be in place to manage change request and why you are choosing this technique?

Contemporary Organizations

Contemporary organizations should be supportive of widening the span of control, flattening the structure, and forming collaborative and flexible teams. Are you aware of the characteristics of your company (or a company you know well) that contradicts these attributes? In what way? What would you recommend as a method of chan

Repetitive control structures, Techniques of passing arguments

1. Discuss various counter controlled repetitive control structures. 2. The if...else is suitable for simple program but is a better construct, which is suitable for more complex problems? Do you agree with this or not? Discuss with suitable examples. 3. We can replace any code that uses a for loop with a wh

Creating a Visual Studio 2008 ASP .NET Web Site

Create a Visual Studio 2008 ASP .NET Web Site with one Web Form. The Web Form consists of two parts. The first part is typical ASP .NET containing a RadioButtonList server control, Label server control and Button server control. Add three items to the Items collection of the RadioButtonList server control. Write an event hand

Organization Standards of Software Development

Discuss how standards may be used to capture organizational wisdom about effective methods of software development. Suggest several types of knowledge that might be captured in organizational standards.

Internet Slander

Please help with the following problem involving internet slander. Provide at least 200 words in your answer. Recent news articles are talking about how the Internet is being used as a method of posting slanderous, private or simply unverified information. Often this is very harmful. How can the average person fight this? Wh

Looping and Case Statements

1. When using Case statements, what would happen if you did not "Break?" Please give an example and explain. 2. Where, in your everyday life, would you use all of the looping techniques, ? Pseudocode for looping structures ? Operators continued ? The while loop ? The do while loop ? The for loop ? break and co

Can you write a C program using the sequence structure only?

As you know, three fundamental control structure are sequence, selection and repetition. Can you write a C program using the sequence structure only? Can you avoid using selection structure? Repetition structure? What would you sacrifice in each case?

Java Payroll Program

Create a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for that week. The application should then print out the name of the employee and the weekly pay amount. In

Programming Essentials

1. Computer programmers often refer to memory addresses using ____ notation, or base 16. a. binary b. indirect c. mathematical d. hexadecimal 2. After a programmer plans the logic of a program, she will next ____. a. understand the problem b. test the program c. translate the program d. code the program 3. The pro

Draw a Class Diagram for this situation

The following situation describes a company who would like to implement an information system. The company would like to keep track of its employees, departments, and projects. Suppose that the MIS department of the company did the requirements collection and analysis phase and give you a specification report with the following

Programming Languages - M/C & T/F

1. The _______ of a variable is its ________. a. address; l-value b. value; r-value c. address; r-value d. value; l-value e. a and b f. c and d 2. When a variable's type is determined through default conventions, the type declaration is: a. omitted. b. implicit. c. explicit. d. required. 3. The goto statement is

Create a Test Plan

Testing is a critical phase of implementation. For this project, you will create a test plan for your proposed system based on your system design. The Test Plan document (in MS Word) will consist of the following: 1. A title page 2. A business letter introducing the content of the document 3. A Test Plan including the fo

Develop a program to compute the volume of a box, cylinder, and sphere.

The selection of which calculation to make should be made from a ComboBox Control. The application should include four input fields that allows a user to enter numbers with two decimal places; each input field also should indicate that the input value is measured in feet. Label the four input fields as: Length, Width, Height,

QCS to be reviewed for structure (Quality Control Sheet)

Quality Control Sheet I have started this assignment and it is also attached; I needed to design a quality control sheet to be used to check programs written for a class I am currently taking. I need someone whom is familiar with this sort of document to change anything that is out of order or perhaps that needs changing whe

Create a program that models a worm's behavior

Create a program that models the worm's behavior in the following scenario: A worm is moving toward an apple. Each time it moves the worm cuts the distance between itself and the apple by its own body length until the worm is close enough to enter the apple. The worm can enter the apple when it is within a body length of th

Control Structures

You are an accountant setting up a payroll system for a small firm. Each line of the table in Appendix G indicates an employee's salary range and corresponding base tax amount and tax percentage. Given a salary amount, the tax is calculated by adding the base tax for that salary range and the product of percentage of excess and

Computer Programming Design: 5 Questions

5 Questions in basic Computer Programming Design. I need the questions answered in full, including appropriate charting. Here are the 5 questions: 1. Simulate the execution of this algorithm, assuming the following values are read as input for the first four variables named. name Mrs. Blue Rain item shoes qty 10

Compare the Two Non-Sequential File Structure Models

Compare the two non-sequential file structure models: the random (hashed) file and the index file. What advantages does the first one have over the second and what advantages does the second have over the first? What would be your criteria for choosing one over the other for different applications?

Programming Concept: Arrays, Iterative Structures, Loop

Why are there so many iterative structures and what is the purpose of each. Think about looping and why different ones exist and why you can't have just one. What is an array and why are they important in programming languages. What is a multi dimensional arrays. What purposes can you think of for multi dimensional array

Integrated Circuits, Microprocessors, and Chip Sets

Please address: 1. The basic structure/architecture of CPUs 2. How CPUs can be designed and built using SSI, MSI, LSI, and VLSI 3. The functions served by the chips other than the microprocessor in a chipset 4. How instructions are represented and handled by the CPU 5. What aspects of physics and mathematics are important