Explore BrainMass


Pseudocode is a description of a program's implementation set out as code without needing to adhere to any formal syntax of a language. It is often used for a programmer's own benefit to plan what they are going to do and make sure their ideas seem doable, but is also highly useful for explaining a piece of code or your intentions to others, or teaching. 

This example of a median filter algorithm allows you to follow the idea without needing to understand the specifics [Image credit Angela0130 ]


Pseudocode can be as detailed as laying out each step in an algorithm in words and involving basic, compact mathematical notation (such as matrix or set notation for mathematically-based algorithms), or as high-level as sorts the items, selects the highest priority one, processes it - there is no set syntax. The formality of it will depend upon the intended audience, as will certain stylistic choices - for example, among Java programmers you might note that an array should be declared by writing foo = {1,2,3} whereas Python programmers may more naturally write foo = [1, 2, 3]. Similarly, staunch C programmers may still end their lines with semi-colons, though pseudocode cannot be expected to run as written. Good pseudocode is written to avoid details that are unnecessary for human understanding in order to make it as accessible as possible.

Pseudocode has a further use as serving as the 'dummy code' for a project. Programmers can type it directly from their plan into a comment in their chosen language so they know all the parts of the program that are left to code fully. From pseudocode such as this, the next step is often skeleton code which does not have all the features the end product will have, but allows other parts of the program in development to compile. An advantage of psedocode, as it is not in any formal language, is that it can be used as a framework to implement the idea in any suitable language without having to change any punctuation or phrasing.

Graphical alternatives to pseudocode that serve the same purposes include flowcharts and unified modelling language charts.

Pseudocode for a Real Life Process

Please assist with the following question so that I may complete my assignment. I have the bulk of it done already but I am lost on how to write what I need in pseudocode. Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. These are th

Programming: UML Diagrams

Provide the UML would be for the the program below: import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.DecimalFormat; /** This program demonstrates a solution to the Dorm and Meal Plan Calculator programming challenge. */ public class DormAndMealPlanCalc extends JFrame {

Flowchart and Pseudocode

Please answer the following questions regarding the attached flowchart: What does this flowchart do? What variables are used this module? What are their data types? What is the significance of the () after PrintLoop? What does this indicate? What looping structure is being used? What pseudocode would match this flowchart?

A Brief Explanation of Pseudo-Code

public class WordSearch { private static ArrayList<String> board = new ArrayList<String>(); private static Scanner scanner; public static void readBoard() { String line; while (true) { line = scanner.nextLine(); if (line.equals("")) break; board.add(line.replaceAll(" ","").toUpperCase())

Tax Time: Java Program

You have been asked by a tax return preparer to create a program which will help him calculate taxes. This preparer will at most have 100 clients. For each client, he has to keep track of the client's first name, last name, gross income, and number of children. Use parallel arrays to store this information for him. A taxpayer's

Develop an IPO Chart, Flowchart, and Pseudocode for an application that it will prompt a user for their hourly pay rate, their hours worked, and whether they are single, married, divorced, or widowed.

You will need to develop the IPO Chart, flowchart, and pseudocode for an application that it will prompt a user for their hourly pay rate, their hours worked, and whether they are single, married, divorced, or widowed. It will then calculate their gross and net pay. If they work more than 40 hours, overtime is calculated at 1 ½

algothithm for calculating totals at a restaurant

Your goal is to solve the following simple logic exercise. You have been contracted by a local restaurant to design an algorithm determining the total meal charges. The algorithm should ask the user for the total food purchase and the tip percent. Then, the algorithm will calculate the amount of a tip, a 7% sales tax, and the to

Writing pseudocodes

Write pseudocode to represent the logic of a program that allows the user to enter values for the width and length of a room's floor in feet. The program outputs the area of the floor in square feet. Start Input number Answer=width*feet Answer=length*feet Output square feet Stop Write pseudocode t

Create a flowchart and pseudocode.

Shemrock Inc. is a brake pad manufacturing company. This company uses raw materials, such as carbon powder, iron, ash, and resin. It wants to develop an inventory management system that will have the following features: The system should store the current inventory levels for different raw materials in a file. If carbon

Analyze Pseudocode

The following are a few examples of pseudocode: >> Example 1 start read Customer_Order_Record if Quantity > 100 then Discount = 20 else if Quantity > 12 then Discount = 10 endif endif Total = Price* Quantity Total = Total - (Discount* Tot

Employee Production Worker Program

Design an Employee class that has fields for the following pieces of information: * Employee Name * Employee Number Also design a class named ProductionWorker that extends the Employee class. The ProductionWorker class should have fields to hold the following information: * Shift Number (an integer, such as 1, 2, or 3)

Designing Basic BMI Calculator

Design a modularized Body Mass Index (BMI) Program which will calculate the BMI of a team player. The formula to calculate the BMI is as follows: BMI = Weight * 703/Height2 Your program design should contain the following: - A method to obtain the weight of a player - A method to obtain the height of a player - A met

Flowchart and Pseudocode for Grade Average Program

Design a grade average program that will produce the numerical grade average of test scores input by a user. The program design should address the following issues: - Use an Array as the data structure to store the input grades. - Use a Looping structure to initialize the elements of this array to clear out system garbage.

Visual logic flow chart for pseudocode

Create visual logic flow chart from the following pseudocode. Begin Program: //Initialize program variables Initialize Regular_Price = 3.00; Initialize Premium_Price = 3.20; Initialize Fed_Gas_Tax_Regular_Rate = .10; Initialize Fed_Gas_Tax_Premium_Rate = .10; Initialize Gas_n_Go_Charge = 1.00; Initialize Full_Service

Design a solution algorithm that will read the electricity usage file and produce an electricity usage report showing the customer number, customer name, electricity usage and the amount owing.

An electricity supply authority records on an electricity usage file the amount of electricity that each customer uses. This file consists of: - a header record (first record), which provides the total kilowatt hours used during the month by all customers - a number of detail records, each containing the customer number, cus

Pseudo Code Programming

The assignment is an assignment in which you, a software developer has won a contract to develop a program that will calculate a customer's charges and total bill at the gasoline pump, taking into account the following: o The per-gallon price for gas is determined by whether the customer purchases leaded or unleaded gasoli

Calculating Retirement Savings

A Chartered Financial Analyst wants a program that will produce a report to show her clients the benefits of saving for retirement. The report should show 4 predicted account values for each client (each on a separate page). The report will assume the client will invest $10,000 a year for 10, 20, 30 or 40 years. The report wi

Object-Oriented Data and Processes Pseudocode

Identify a task you perform regularly, such as mowing the lawn, or driving a car. - Write a short, structured design (pseudocode only) that accomplishes this task. - Think about this task in an object-oriented way, and identify the objects involved in the task. - Identify how you can encapsulate the data and processes you ide

Writing Pseudocode Statements With Different Variables

1. Suppose myCar is the name of a class variable that references an object, and go is the name of a method. (The go method does not take any arguments.) Write a pseudocode statement that uses the myCar variable to call the method. 2. In pseudocode, write the first line fo the definition for a Poodle class. The class should ex

A C program to convert Celsius to Fahrenheit

Program (code.c) & (codev2.c) to convert Fahrenheit to Celsius. Simplistic, DOS based so that I may digest and learn. Program 1: Ask the user to input a Fahrenheit temperature, as a decimal number. Make clear what the user should enter, for example, "enter a whole number" or "please use the format xxx.xx.". Get the temperat

Java code translated into pseudo-code

Public class testOperators { public static void main(String[] args) { int x; int y = 12 double z = 13.0; x = 14 System.out.println("x + y + z = " + (x + y +z)); x += y; y--; z++; z *= x; System.out.println("x + y + z = " + (x + y + z)); } }

Object oriented data and processes

I need assistance so I can write an object-oriented design for a system that keeps tracks of CD and DVD collection. I need the classes, associated data, and operations for the classes. Also, the pseudocode for each of the classes.

Compute the Unit Price for Products Sold Using Pseudocode

The following problem can be solved by a program that performs three basic tasks: Input Data, Process Data, and Output Results. Use a pseudocode to design a suitable program for solving it. The manager of the Super Supermarket would like to be able to compute the unit price for products sold there. To do this, the program sho

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

Shell Script to Convert Students Marks to Grades

Also I am trying to append my newly created PS1 Command Prompt to a file how do I do that? Please also Provide the step by step instructions so that I too can try and do these exercises. Project 6-4 In this project, you will convert pseudo code that uses a decision structure into a shell script. The script then will accep