Techwizonline's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
New Members
Active Posts:
12 (0.02 per day)
Joined:
26-October 11
Profile Views:
481
Last Active:
User is offline Mar 31 2012 03:40 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Techwizonline has not set their status

Posts I've Made

  1. In Topic: Pseudo-my loop does not stop when entering XXX for name

    Posted 22 Jan 2012

    View Postishkabible, on 22 January 2012 - 01:46 PM, said:

    how are we supposed to know what the issue is if we don't have documentation on the interpreter? at the very least we would need the source code or something.

    Thanks for your input, but the interprter Im using was design by my professor for our programming logic and design class. It rides hand in hand with vb.net. Also here is the problem I was working on.

    8. Draw the hierarchy chart and design the logic for a program
    for the owner of Bits and Pieces Manufacturing Company,
    who needs to calculate an employee’s projected salary
    following a raise. Th e input is the name of the employee,
    the employee’s current weekly salary, and the percentage
    increase expressed as a decimal (for example, 0.04 for
    a 4 percent raise). Design the program so that it runs
    continuously for any number of employees using three
    modules. Th e housekeeping module prompts the user for
    the percent raise that will be applied to every employee,
    and prompts for the fi rst employee’s name. Th e detail loop
    executes continuously until the user enters “XXX” for the
    employee’s name. Th e detail loop gets the employee’s weekly
    salary, applies the raise, produces the result, and prompts
    for the next employee name. Th e end-of-job module, which
    executes after the user enters the sentinel value for the name,
    displays a message that indicates the program is complete.

    View Postr.stiltskin, on 22 January 2012 - 01:54 PM, said:

    Since we don't have access to the documentation, we can't know what the "correct" syntax is for your while loop. However, it's reasonable to assume that if the = operator is used for assignment (as in your line 9), the same operator won't be used for comparison (as in your line 12).

    Otherwise, how does the interpreter know whether you are doing an assignment or a comparison?

    Thanks for your input, but the interprter Im using was design by my professor for our programming logic and design class. It rides hand in hand with vb.net. Also here is the problem I was working on.

    8. Draw the hierarchy chart and design the logic for a program
    for the owner of Bits and Pieces Manufacturing Company,
    who needs to calculate an employee’s projected salary
    following a raise. Th e input is the name of the employee,
    the employee’s current weekly salary, and the percentage
    increase expressed as a decimal (for example, 0.04 for
    a 4 percent raise). Design the program so that it runs
    continuously for any number of employees using three
    modules. Th e housekeeping module prompts the user for
    the percent raise that will be applied to every employee,
    and prompts for the fi rst employee’s name. Th e detail loop
    executes continuously until the user enters “XXX” for the
    employee’s name. Th e detail loop gets the employee’s weekly
    salary, applies the raise, produces the result, and prompts
    for the next employee name. Th e end-of-job module, which
    executes after the user enters the sentinel value for the name,
    displays a message that indicates the program is complete.

    View PostSalem_c, on 22 January 2012 - 10:29 AM, said:

    09 string QUIT = "XXX"

    12 while not name = QUIT

    How does it know the different between assignment and comparison?

    Thanks for your input, but the interprter Im using was design by my professor for our programming logic and design class. It rides hand in hand with vb.net. Also here is the problem I was working on.

    8. Draw the hierarchy chart and design the logic for a program
    for the owner of Bits and Pieces Manufacturing Company,
    who needs to calculate an employee’s projected salary
    following a raise. Th e input is the name of the employee,
    the employee’s current weekly salary, and the percentage
    increase expressed as a decimal (for example, 0.04 for
    a 4 percent raise). Design the program so that it runs
    continuously for any number of employees using three
    modules. Th e housekeeping module prompts the user for
    the percent raise that will be applied to every employee,
    and prompts for the fi rst employee’s name. Th e detail loop
    executes continuously until the user enters “XXX” for the
    employee’s name. Th e detail loop gets the employee’s weekly
    salary, applies the raise, produces the result, and prompts
    for the next employee name. Th e end-of-job module, which
    executes after the user enters the sentinel value for the name,
    displays a message that indicates the program is complete.
  2. In Topic: Pseudo-my loop does not stop when entering XXX for name

    Posted 22 Jan 2012

    I just kept swinging at it and I hit a home run!!! Thanks for the reponses.
    start
    
    Declarations
    	string name
    	num rate
    	num currentSalary
    	num newSalary
    	string closing = "End of entries for this program!"
    	string quitEntry = "xxx"  
    	
    	
    	housekeeping()  
    	while not (name = quitEntry)
    		detailLoop()
    	endwhile
    	endOfJob()
    stop
    
    housekeeping()
    	output "Please enter the employee's FIRST name."
    	input name
    return
    
    detailLoop()
    	output "Please enter rate increase."
    	input rate
    	output "Please enter employee's CURRENT salary."
    	input currentSalary
    	set newSalary = currentSalary * (1 + rate)
    	output name,"'s NEW SALARY is:"
    	output newSalary, "US dollars"
    	housekeeping()
    return
    
    endOfJob()
    	output closing
    return
    
  3. In Topic: Pseudo-my loop does not stop when entering XXX for name

    Posted 22 Jan 2012

    View Postishkabible, on 22 January 2012 - 11:14 AM, said:

    I'm confused; how is this C or C++? is this pseudo code? if so how are you testing it?

    Its is pseudocode. I have custom pseudocode interpreter that my professor creataed.

    View PostSalem_c, on 22 January 2012 - 10:29 AM, said:

    09 string QUIT = "XXX"

    12 while not name = QUIT

    How does it know the different between assignment and comparison?

    Im not quite sure what you are asking but QUIT has an assignment of "XXX" and my condition is set, so it stops when XXXis entered for the "name" input.
  4. In Topic: Pseudo-my loop does not stop when entering XXX for name

    Posted 22 Jan 2012

    Its is pseudocode. I have custom pseudocode interpreter that my professor creataed.
  5. In Topic: when selecting an answer, does not show correct/incorrect

    Posted 31 Oct 2011

    View PostjimmyBo, on 29 October 2011 - 09:11 PM, said:

    View Postsmohd, on 30 October 2011 - 01:59 PM, said:

    Wost code ever!! what if five selections are there? how many else if you will have?
    Why not just
    If sanswer.Equals("B") Then
       'correct
    Else
       'incorrect
    
    Or yo can put another Else If(just one to mention other cases)

    And using Select case, just:
            Select Case sAnswer
                Case Is = "A", "a", "b" ' and so on here
                    sCheck = "Incorrect"
                Case Is = "B"
                    sCheck = "Correct"
                Case Else
                    sCheck = "Your an Idiot"
            End Select
    

    You have only few cases in each case(either using if which more efficient or using Select case which is more readable)
    If you have any other problem please post your updated code to the end to see what you have done to display it

    Ouch man. Just doing my job.


    Thanks folks, I'm new to this programming--I understand the logic,but the process--little shakey and does not help that it is the instuctor's first time time to teach.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Comments

Techwizonline has no profile comments yet. Why not say hello?