Explore BrainMass

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.

    © BrainMass Inc. brainmass.com March 31, 2023, 4:44 am ad1c9bdddf

    BrainMass Solutions Available for Instant Download

    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

    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())

    Pseudo code Problem

    There is an error in this pseudocode, can you help me find it? Constant Real GRAVITY = 9.81 Display "Rates of acceleration of an object in free fall:" Display "Earth: ", GRAVITY, " meters per second every second." Set GRAVITY = 1.63 Display "Moon: ", GRAVITY, " meters per second every second."

    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

    Writing Pseudocodes

    I am practicing writing pseudocodes and am having issues on the following. Can I get assistance in writing these? Allow user to enter a value for one edge of a cube. The program calculates the surface area of one side of the cube, the surface area of the cube, and its volume. The program outputs all the results. Allow

    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

    Design an Algorithm

    Design an algorithm for the following problem (should work for any input) and identify the input and output operations: Read and print the three values and the value difference between lowest and highest values.

    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

    Analyzing a grading problem and writing pseudo code

    Write a grading program that helps to determine your letter grade based on your exam score. For example, when you put in exam score of 80, the program will determine you get a B. Please note the following: 1) Your letter will be determined by only one exam score. 2) The program will keep on prompting you to put more scores

    Simple Pseudocode to Calculate Produce Sale

    1. Let us say you are a farmer and you participate in Farmers Market every Sunday. You bring 5 favorite vegetables or fruits for sale. You are going to use a program for checking out customers. You can choose your favorite 5 vegetables/fruits as your items. 2. Assume that all items are priced per-pound. As soon as the program

    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

    Software Development Project

    I would like some help in this assignment, just so I can get an idea as to what approach I should take in completing this; Thanks. 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 i

    Shell script for Knoppix

    Convert the pseudocode given below into an executable shell script for Knoppix, following the same order. Pseudo-code: · Change to the /tmp directory. · Change to your home directory. · Display the previous working directory using a shell variable. · Display your home directory using a shell variable. · Display yo

    Developing the Logic for a Program

    Scenario/Summary Develop the logic for a program that gives you the following menu options: (1) Child Movie Ticket 3.00 (2) Twilight Movie Ticket 4.00 (3) Adult Movie Ticket 6.25 (4) Senior Movie Ticket 4.00 (5) End order You should be allowed to keep ordering from the menu until you press 5 f

    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