Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

PseudoCode NEED HELP

pseudocode

  • Please log in to reply
18 replies to this topic

#1 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 27 March 2009 - 09:04 PM

need some help with this & its no home work or class work, i am just getting my self ready for next month.

Global Library is one of the largest libraries in Singapore that offers books, periodicals, journals, magazines, and educational software. It has an unmatched commitment that has built customer loyalty and long-term relationships. Currently, the staff members maintain the records of its members and their daily transactions manually. However, due to the increasing business, the management has decided to computerize the library management system.

Whenever new members joins, they need to fill up an entry-level form that provides the necessary information, such as the member identification number, the member's first name and last name, the phone number, and the addess. If the new member privides incomplete information, an error is generated and the member is not registered.

The library lends out books and journals on a rental basis only to its members. Books are issued for seven days, and journals are issued for three days. If a member does not return the book or journal within the specified time, the member has to pay a fine. If the books are returned with a delay of three days, the member needs to pay $50 and if the delay exceeds this period, a fine of $20 is charged per day.

The library maintains a catalog of all the books available in stock. There are two copies of each book. A member can make a requisition for a book that is not available in the library. The management the purchases the book and informs its member about the new arrival.

The following tasks need to be performed:


1. Write the pseudocode and draw a flowchart that depicts the registration process for new members. This process should cater to multiple registrations at one instance. All the relevant information needs to be supplied, and all the information being accepted need to be validated as described above.
2. Write a pseudocode for the requisition of books that are unavailable in the stock.
3. Write a procedure that calculates the amount of fine to be paid by a member in case of delay.
4. Write pseudocode for the book return system that calls the procedure for calculating thefine to be paid by the member.
5. Draw a flowchart showing the entire system of book return used by Global Library.
6. Prepare test data for the algorithms and their results.
7. Prepare a System Manual comprising of the problem statement, all the flowcharts and pseudocode, some test data, and their results.

  • 0

#2 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 27 March 2009 - 09:14 PM

I TRY NUMBER 1 & DONT KNO IF IT WRITE IF ITS WRONG CAN U FILL IN THE PART WHERE I GO WRONG & I DONT KNO WHERE I MUST PUT THE function & IT LOOK LIKE A LOOP AS WELL

Begin
character cName, nAddress
Numeric nIdentificationNumber, nPhoneNumber, nAge
Display "Enter Member Name"
Accept cName
Display "Enter the Address of member"
Accept cAddress
Display "Enter Identificationd Number"
Accept nIdentificationNumber
Display "Enter Phone Number"
Accept nPhoneNumber
Display "Enter age"
Accept nAge
new member must sign up entry level from completed
else
error generated AND member will not ”registered”
else
member registered AND validated
end

  • 0

#3 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 28 March 2009 - 04:41 AM

Failed requirement: First name, Last name
Recommendation: use a string for phone numbers (for handling business extensions)
Failed requirement: validation not explicitly performed.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#4 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 28 March 2009 - 06:30 PM

where must i put that, can u show me?
  • 0

#5 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 30 March 2009 - 02:44 AM

Look at your code: you have a variable for name, not one for first name and one for last name.
To check for incomplete info, simply compare each string to "".
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#6 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 30 March 2009 - 07:31 AM

u mean like this

Begin
character cfirst name and last name , nAddress

  • 0

#7 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 30 March 2009 - 07:57 AM

That looks better, yes.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#8 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 30 March 2009 - 08:03 AM

is there any thing more to add to it
  • 0

#9 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 30 March 2009 - 08:05 AM

this is my # 2

Begin
Numeric nBook
Display ‘book number”
Accept nBook
N= “available” then issued
If book requisition unavailable then oder
Display “unavailable”
Else
Display “available”
End

  • 0

#10 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 30 March 2009 - 01:31 PM

When accepting a firstname, lastname, etc. You should use a while loop or similar to make sure you aren't accepting an empty string.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#11 jason_200

jason_200

    CC Newcomer

  • Just Joined
  • PipPip
  • 12 posts

Posted 30 March 2009 - 03:59 PM

can u do it as a example for me cause i dont get it
  • 0

#12 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 30 March 2009 - 04:07 PM

character cName
while cName = ""
Display "Enter Member Name"
Accept cName
end while
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: pseudocode

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download