Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Parallel Arrays, functions statements for pseudocode Posted by bilzora on 4 Mar 2012 at 4:35 PM
How do I count loops . Maybe I'm using the wrong terms. How do I trace loops? It is Pseudocode not Java. I know it is hard for subject matter experts to 'dumb' down for someone like me but I do need help. I've tried several tutorials still in trouble. Thanks for your help.

a. Show the pseudocode declarations needed to declare two arrays - one an array which contains the names of the family members, and the other an array which contains the savings (i.e. money) held by each family member. The arrays are parallel arrays because the savings shown in the second array for a certain array position are the savings for the family member whose name appears in the same position in the first array.

This is what I put:

Declare Names (10) as Strings
Declare Savings, Total as Float
Declare K as integer[/i]

b. Write a function, which is called from the main module - this function will determine and return the total savings.

I went by an example that was in the book but would like to shorten this. Dont know if its right.

Declare totalSavings as float
Declare K as Int
Set K = 0
Set totalSavings = femaleSiblings(Savings)
Function femaleSavings(Savings) as float
Set femaleSavings = 0
For (K = 0, K<10, K++)
Write “Enter amount of member savings” + (K + 1)
Input Savings[K]
Set femaleSavings= femaleSavings + Savings[K]
End For
End Function
Write + totalSavings

c. Write a function also called from the main module - this function will determine and return the array index containing the largest savings. Your main program should then print the name of the person who holds those savings, as well as the amount.


This is far as I got. Am I on the right track.

Definitely don't know this

Next I need to analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array. Each of these items (sequential code, at least one selection statement, at least one loop, at least one function call, at least one array and associated processing of the array) is required, and must be present in code.
Also design a program that will allow a user to input a list of family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. You may assume that there are no more than 100 living relatives in your family.

Project Deliverables:

•The first delivery is the project plan which provides your problem statements, problem analysis, and how it will comply with the project specifications.

•The final delivery will be a completed project design along with your code comments and comprehensive test plan.

I know a test plan is just redoing the code with different variables but first I must master the code to do the test
Report
Re: Parallel Arrays, functions statements for pseudocode Posted by jamescarl on 8 Mar 2012 at 5:38 AM
In computer science and numerical computation, pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading. Pseudocode typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.
Report
Re: Parallel Arrays, functions statements for pseudocode Posted by jamescarl on 8 Mar 2012 at 5:44 AM
cool man... great job.
[url=http://www.gamechanger.nl/co-creatie/]Co-creatie[/url] is een interactief, creatief en sociaal
proces waarbij een organisatie waarde creëert door
multidisciplinair
Report
Re: Parallel Arrays, functions statements for pseudocode Posted by tonysometimes on 8 Mar 2012 at 7:37 AM
A controversial group discussion topic is a speech topic that has many controversies, pros and cons. Keep in mind that all current group discussion topics are not my opinion, but just a sample list of speech topics!
Focuses on small to medium size business create,
deploy and optimize their sites for businesses.
<a href="http://www.seospokane.net">SEO Spokane</a>



 

Recent Jobs