StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Pseudocode Standards - Essay Example

Cite this document
Summary
The following essay entitled "Pseudocode Standards" deals with the item look-up station implementation. According to the text, in order to implement the item look-up station at every networked Wal-Mart outlet, information related to the items will have to be saved in the local database…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER97.1% of users find it useful
Pseudocode Standards
Read Text Preview

Extract of sample "Pseudocode Standards"

Item location stationSelection StructureIn order to implement the item look-up station at every networked Wal-Mart outlet, information related to the items as well as the associated stores will have to be saved in the local database in the form of two separate arrays of two types of objects. An ‘Item’ object would contain information such as item name, item code, category of item, quantity available in store. An array called ‘Items’ would represent all items in the local store.A second array called ‘Stores’ would be stored at each station containing the information of all the networked stores where the items are likely to be found and are to be searched in.

Every ‘Store’ object would comprise of the store id, name, its location, phone number, distance from the current station. The ‘Stores’ array at each station would already be sorted according to the lowest distance.In order to avoid invalid entry by a customer, the station would present the customer with a fixed list of categories to choose the item from. When the customer selects an item from the list, a local search is conducted within the array ‘Items’ of the local database. In case of a match and if the available quantity is greater than 0, the information is presented to the customer.

In case no match is found, the item is searched in the ‘Items’ array of the nearest remote store location i.e. on the server of the first store in the ‘Stores’ array. The search continues for all the stores in the array. Information is presented only if the item exists in a particular store.A while loop is used to traverse through all records of items and stores, while the matching conditions are checked through the if-statements.PseudocodeStep 1: Display MenuStep 2: Get Item Name from CustomerStep 3: Match Item name with Items in Local StoreStep 4: In case Item available Step 5: Print Message “Available”Step 6: Print Quantity of Item AvailableStep 7: In case Item unavailable at Local Store Step 8: Match Item Name with Items in Nearest Store Step 9: In case Item Available Step 10: Print Message “Available” Step 11: Print Name, Address and Phone of the Store Step 12: Repeat Step 8 to 11 till all Stores are searchedStep 13: Ask Customer to make another searchStep 14: In case Cusomter selects to search again Step 15: Goto Step 1Main Declare maxStores as Integer Declare maxItems as Integer Declare count as Integer Declare found as IntegerSet maxStores equal to 5Set maxItems equal to 20 Declare Private Items[maxItems] as Item Declare Private Stores[maxStores] as Store Items = IntializeArrayOfItemsFromFile() Stores = InitializeArrayOfStoresFromFile() Call Method DisplayMenu() Input ItemName Initialize count to 0 Initialize StoresCount to 0 Set found to 0 Declare choice as Character Set choice to ‘y’ While choice is not equal to ‘N’ Set choice to ‘n’While count is Less than maxItems If Items[count].

Name is equal to ItemName and Items[count].Quantity is greater than 0 Display “Item available” Display “Quantity = ” + Items[count].Quantity Set found to 1Break End If End While If found is equal to 0 While StoresCount is Less than maxStores Set StoreItems to Stores[StoresCount].ServerName + “\Items” Set maxItems to Stores[StoresCount].NumberOfItems Set count to 0 While count is Less than maxItems If StoreItems[count].Name is equal to ItemName Items[count].Quantity is greater than 0 Display “Item available” Display “Quantity = ” + Items[count].

Quantity Display “Store Address = ” + Stores[StoresCount].Name Display “Store Phone = ” + Stores[StoresCount].Phone End If End While End While End If Print “Do you want to search for another Item? Y/N” Input choice End WhileEnd ProgramSubProgramIntializeArrayOfItemsFromFile(argument: Items[] as Item, Size as maxItems, FilePath as String) Declare count as IntegerSet count to 0 Declare Name as String Declare Record as String Read File from FilePath While count is Less than maxItems Record = Read New Line Name = Record(substring 0 to 15) Items[count].

setName(parameter: Name)Code = Record(substring 16 to 22) Items[count].setCode(parameter: Code)Category = Record(substring 23 to 40) Items[count].setCategory(parameter: Category)Quantity = Record(substring 41 to 45) Items[count].setQuantity(parameter: Quantity) End While Return ItemsEnd SubProgramSubProgramIntializeArrayOfStoresFromFile(argument: Stores[] as Item, maxStores as Integer, FilePath as String) Declare count as IntegerSet count to 0 Declare Name as String Declare Record as String Read File from FilePath While count is Less than maxStores Record = Read New Line Name = Record(substring 0 to 15) Items[count].

setName(parameter: Name)Id = Record(substring 16 to 22) Items[count].setId(parameter: Id)Address = Record(substring 23 to 40) Items[count].setAddress(parameter: Address)Phone = Record(substring 23 to 30) Items[count].setPhone(parameter: Phone)ServerName = Record(substring 31 to 50) Items[count].setServerName(parameter: ServerName)NumberOfItems = Record(substring 51 to 55) Items[count].setNumberOfItems (parameter: NumberOfItems) End While Return StoresEnd SubProgramSubProgramDisplayMenu() Display List of Categories Display List of Items in Each CategoryEnd SubProgramClass Item Declare Private Name as String Declare Private Code as String Declare Private Category as String Declare Private Quantity as IntegerPublic Item() Name=”” Code=”” Category=”” Quantity = 0End ConstructorPublic Subprogram SetName (parameter: name) Name = nameEnd SubprogramPublic Subprogram SetCode (parameter: c) Code = cEnd SubprogramPublic Subprogram SetCategory (parameter: cat) Category = catEnd SubprogramPublic Subprogram SetQuantity (parameter: num) Quantity = numEnd SubprogramEnd ClassClass Store Declare Private Name as String Declare Private Id as String Declare Private Address as String Declare Private Phone as String Declare Private Distance as Float Declare Private ServerName as String Declare Private NumberOrItems as IntegerPublic Store() Name=”” Address=”” Phone = “” Distance=0 ServerName=”” NumberOfItems = 0End ConstructorPublic Subprogram SetName (parameter: name) Name = nameEnd SubprogramPublic Subprogram SetAddress (parameter: add) Address = addEnd SubprogramPublic Subprogram SetPhone (parameter: ph) Phone = phEnd SubprogramPublic Subprogram SetDistance (parameter: dist) Distance = distEnd SubprogramPublic Subprogram SetServerName (parameter: sname) ServerName = snameEnd SubprogramPublic Subprogram Set NumberOfItems (parameter: num) NumberOfItems = numEnd SubprogramEnd ClassReferencesiJava2 (2012).

What is an Array? Design, Logic, Pseudocode of An Array. Retrieved from http://www.ijava2.com/array-design-logic-pseudocode-array/Dalbey, J. (2012). Pseudocode Standards. Retrieved from http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.htmlAbout.com (2012).Structured Programming. Retrieved from http://javascript.about.com/library/blstruc3.htm

Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 words”, n.d.)
Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 words. Retrieved from https://studentshare.org/logic-programming/1602753-selection-structure-paper
(Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 Words)
Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 Words. https://studentshare.org/logic-programming/1602753-selection-structure-paper.
“Pseudocode Standards Essay Example | Topics and Well Written Essays - 500 Words”, n.d. https://studentshare.org/logic-programming/1602753-selection-structure-paper.
  • Cited: 0 times

CHECK THESE SAMPLES OF Pseudocode Standards

Array Structure Proposal

Pseudocode Standards.... Design, Logic, pseudocode of An Array.... om/array-design-logic-pseudocode-array/... In order to assist the library administrator in managing the daily tasks and the billing department in determining any outstanding payments, three types of details were required to be saved; client's data, the issuance details and the daily rates for each book....
2 Pages (500 words) Essay

Perfomance standards

To measure the effectiveness of… In this regard, the current discourse aims to identify three (3) performance standards for the position of a doorman at The Westin St.... Francis, a luxury hotel located in the Performance standards for Doorman at The Westin St.... Francis SFSU ID# al Affiliation Performance standards for Doorman at The Westin St.... To measure the effectiveness of these strategies, against standards or goals, organizations should also develop performance standards....
2 Pages (500 words) Essay

Brain-Eating Amoeba Issues

The scientific name of the brain-eating amoeba is the Naegleria fowleri.... The brain-eating amoeba in most cases finds suitable thriving conditions in soil and warm water, especially in rivers, hot… The first identification of the brain-eating amoeba occurred in Australia.... However, researchers believe that Naegleria fowleri evolved in the United States of America (Cajigal, 8)....
5 Pages (1250 words) Essay

IEEE Working Group

The working group is focused on the establishment of standards for mobile broadband access.... The IEEE 802 standard is made up of a family of networking standards that range from the Ethernet to wireless systems (Beylot & Labiod, 2013).... The standards cover all their physical specifications.... The importance of the standards in a digital era cannot be stated in an effective manner.... Furthermore, the IEEE standards have bestowed immense benefits on the consumer....
5 Pages (1250 words) Research Paper

Analysis of Calorie Management Program

All the data and information on that particular individual is then stored in the computer memory to help monitor the person's health standards in a given period.... Flowchart for the algorithm Algorithm in pseudocode for the tasks and subtasks Define variablesX, YDefine MN=M/3500O=N/16Start the programEnter the value of XEnter the value of YCompare the values of X and YIf X>Y, compute M=X-YCompute N=M/3500O=N*16Print “more calories consumed than expected”ElseCompare X and YIf X=YPrint “calories balanced”Else compare X and YIf X...
1 Pages (250 words) Coursework

Data Flow Diagrams

computer programmer uses both pseudocode and flowcharts to design programs in that they use it to design the systems flowchart.... The data flow diagrams is a modelling technique that allows use of pictures to convey how information data flows through the systems connected by pipelines of data (Thomas Hathaway, 2015)....
1 Pages (250 words) Essay

Designing a Network Protocol

The author of this paper "Designing a Network Protocol" discusses a traffic light unit (TLU) that controls the traffic flowing into a junction from approaching roads, including the design of a network protocol that controls the functionality of the TLU, the protocol requirements, and phases....
9 Pages (2250 words) Coursework

Technology Standards

The author of the paper gives a detailed information about the technology standards such as ISO, biometric standards, and ANSI which look out for the promotion of high quality and safety of products and services offered to the market for sale and consumption… A product or service produced in a third world or developing country has the same chance to access foreign markets as a product or service produced in the developed or first world countries, as long as it confers with the standards of quality and administration conferred upon each product, process, or system of production Industry players and state actors came up with a number of standardized principles against which they apply the measure of quality standards and practices....
8 Pages (2000 words) Research Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us