PDA

View Full Version : a Req about Pseudocode



shuichi_akai
11-12-2005, 23:27
mình có một đề bài về hệ thống quản lý thư viện, với yêu cầu viết mã giả - pseudocode để xử lý thông tin, thực sự thì mình không rành lắm nên nhờ các bạn chỉ giúp vài hướng giải quyết.



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:


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.
Write a pseudocode for the requisition of books that are unavailable in the stock.
Write a procedure that calculates the amount of fine to be paid by a member in case of delay.
Write pseudocode for the book return system that calls the procedure for calculating thefine to be paid by the member.
Draw a flowchart showing the entire system of book return used by Global Library.
Prepare test data for the algorithms and their results.
Prepare a System Manual comprising of the problem statement, all the flowcharts and pseudocode, some test data, and their results.

StarGhost
30-12-2005, 02:41
http://www.webopedia.com/TERM/P/pseudocode.html
Đối với "multiple registrations at one instance", thực ra thì tui cũng ko hiểu lắm, kể cả là e-registration thì cũng không thể chính xác cùng lúc được. Theo tui hiểu thì có thể là nhiều registration forms được send đi trong một khoảng thời gian. Thế thì cách đơn giản nhất là đánh số ID cho từng form, lưu vào mảng.

Những cái khác cũng tương đối đơn giản.

Cái này chẳng có gì đáng được gọi là algorithm, bạn cứ làm theo từng bước là ra, trừ khi bạn chưa làm quen thuật toán.

Thân.