Page 316 - Computer_Science_F5
P. 316

number form to the name as it is      (i)  Example of the snapshot from the
                   displayed from the given snapshot.       leap year, 2012 is shown in Figure
               (b) Use function to read the year and        4.77.
                   month entered by the user and                                                   Chapter Four: Object oriented programming with C++
                   translate them into days.
          FOR ONLINE READING ONLY
               (c) Use if…then statement to help a
                   system to know the number of days
                   for each month, where:-
                   (i)  January, March, May, July,
                       August, October and December
                       has 31 days                                    Figure 4.77:
                  (ii)  April, June, September and       (ii) Example of the snapshot from the
                       November has 30 days.                ordinary year, 1991 as shown in
                  (iii)  February has 29 days for           Figure 4.69.
                       leap year and 28 days for an
                       ordinary year.
               (d) Use isLeapYear( ) built-in function
                   to help a system identify the leap
                   year(with 366 days) made by 29
                   February.

               (e) Make your program displays
                   months’ calendar for all years dated               Figure 4.78:
                   after 1800.





                            Project: Designing and implementing a simple library
                                         management system


               Design and implement a simple library management system by creating a console-
               based application that manages a library’s collection of books. The system should
               allow users to add, delete, search, and display books. The system should also
               demonstrate the use of classes, inheritance, polymorphism, encapsulation, and
               data abstraction. In your project you may use resources like Computer with C++
               development environment (Such as Code::Blocks, Visual Studio, or any IDE that
               supports C++). Also, you may use Text editor for writing code (if not using an
               IDE). After you accomplish, submit the functional library management system
               with detailed documentation.



                                                    307
               Student’s Book  Form Five



     Computer Science Form 5.indd   307                                                     23/07/2024   12:34
   311   312   313   314   315   316   317   318   319   320   321