+ Reply to Thread
Results 1 to 2 of 2

Thread: operating system accessment help

  1. #1
    funjoke88 is offline Newbie
    Join Date
    Jul 2009
    Posts
    22
    Rep Power
    0

    operating system accessment help

    Write a script with an infinite loop that provides the following options:
    1. Enter items and print bill
    2. Reprint
    bill
    3. Backup bill directory
    4. Exit
    Details:
    1. Enter items and print bill
    Use an infinite loop to enter the following data:
    item
    number (serve as identifier)
    quantity
    Item numbers, items and prices are given as below:
    105 Ring file RM 5.00
    106 Paper box RM 6.00
    107 Writing pad RM 7.00
    108 A4 paper (70gm) RM 8.00
    109 A4 paper (80gm) RM 9.00
    For each item number entered, calculate the subtotal and store in file in the following format:
    Item no. Item Quantity Price Subtotal
    : : : : :
    : : : : :
    Total:
    Use 200905 as the file name for the first bill and increment the number for new bill. Create a
    directory called
    bills to store all the files. Check the existence of the directory, if it does not
    exist, create it, otherwise, remove the existing directory and create a new one.
    NOTE:
    Use
    999 as item number to terminate the loop and then print the bill to the screen (i.e. display
    the content of the most recently created file, the bill).
    2. Reprint
    bill
    First of all, display all the file names in
    bills directory, then read file name from user and
    display the content to the screen.
    3. Backup bill directory
    Backup the
    bills directory to a user specified destination (use appropriate name to avoid the
    exisiting directory in the destination being overwritten), then remove the original
    bills

    directory.
    Optional requirement:
    The name of the
    bills directory can be preceded by current day, month and year. For
    example,
    05Aug09_bills.

    Hint:
    command date +%d%b%y will print the day, month and year, example: 05Aug09

    Design the operation flow logically and use your creativity. Your script should perform any
    checking (e.g value, file existence, etc.), if you think it is necessary to minimise errors in the
    execution of your script.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,492
    Blog Entries
    75
    Rep Power
    143

    Re: operating system accessment help

    I'm not clear on whether you have a question, or just wanted to issue a general challenge.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Operating System Library
    By brade8000 in forum C and C++
    Replies: 15
    Last Post: 03-13-2010, 04:53 PM
  2. Operating System Structure
    By brade8000 in forum C and C++
    Replies: 6
    Last Post: 03-11-2010, 12:23 AM
  3. ant operating system
    By badgod in forum Technology Ramble
    Replies: 1
    Last Post: 05-11-2008, 09:02 AM
  4. Operating System
    By prnoct90 in forum General Programming
    Replies: 6
    Last Post: 11-01-2007, 08:56 PM
  5. Which Operating System is better ????
    By Patrick in forum Computer Software/OS
    Replies: 1
    Last Post: 10-07-2007, 07:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts