SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
No. of Printed Pages : 2                  SET - 1
     BACHELOR IN COMPUTER APPLICATIONS (BCA)
                      Term-End Practical Examination
                                                                                     04575
                                        June, 2011
     CS-72P : C++ AND OBJECT ORIENTED PROGRAMMING
Time allowed : 2 hours                                                   Maximum Marks : 100
                                                                            (Weightage : 15%)

General Instructions :
(i) There are two compulsory questions in this paper of 40 marks each. Rest 20 marks
      are for viva - voce.
(ii) You must write appropriate main ( ) function and test your programs.
(iii) Write/print the programs, input and results on your answer-script.
(iv) Make and state suitable assumptions, if any.

1.   Design and implement a class "Longtime" using C + + . The class "Longtime" represents      40
     the time as hours, minutes and seconds using 24 hour - time format. The class should
     have a constructor that initialises time to 12:00:00. The class has two member functions
     as follows :-
     (a) "Difference Time" which overloads the - (minus) operator to find the difference
            of time stored in two different Longtime objects ; and
     (b) "Print Time" that prints the time as a.m. or p.m. for example, if a Longtime object
            has the time stored as 15:15:30, then this print time function will
            output : 03:15:30 p.m.

2.   Consider the following class hierarchy along with the suggested data members for the       40
     classes
                                                    Data members :
                                                    - Dept ID
                           Department               - Dept Name
                                                    -HOD
                                                    - Location



      Production                                 Marketing
     •Expertise                                • Zone in India
     • Product
CS-72P/S1                                       1                                          P.T.O.
A production department produces products in a specified product line in which the
   department has expertise.
   Design and implement the classes in the hierarchy using C + + . You may add more
   data members in the classes, if needed. You should include at least one constructor in
   each class. All the classes should have a member function "print_department_info( )"
   which prints all the data of an object of that class. You should demonstrate the
   polymorphism using the print_department_info( ) function along with appropriate
   main ( ) function.




CS-72P/S1                                    2                                              6,000

Contenu connexe

Similaire à Cs 72 (p)s1

Lecture 3.2.4 C pointer to Structure.pptx
Lecture 3.2.4 C pointer to Structure.pptxLecture 3.2.4 C pointer to Structure.pptx
Lecture 3.2.4 C pointer to Structure.pptxravi2692kumar
 
Advanced Production Debugging
Advanced Production DebuggingAdvanced Production Debugging
Advanced Production DebuggingTakipi
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docxhoney725342
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)Jay Patel
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_moduleAPU
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_moduleAPU
 
Strayer cis-499-week-2-project-deliverable-1
Strayer cis-499-week-2-project-deliverable-1Strayer cis-499-week-2-project-deliverable-1
Strayer cis-499-week-2-project-deliverable-1infinityend3
 
Bca 5050 visual programming – practical
Bca 5050   visual programming – practicalBca 5050   visual programming – practical
Bca 5050 visual programming – practicalsmumbahelp
 
LatestCOCOMO model presentation for college students .pptx
LatestCOCOMO model presentation for college students .pptxLatestCOCOMO model presentation for college students .pptx
LatestCOCOMO model presentation for college students .pptxaditiibaghla16
 
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020rodburns
 

Similaire à Cs 72 (p)s1 (20)

C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
Lecture 3.2.4 C pointer to Structure.pptx
Lecture 3.2.4 C pointer to Structure.pptxLecture 3.2.4 C pointer to Structure.pptx
Lecture 3.2.4 C pointer to Structure.pptx
 
Advanced Production Debugging
Advanced Production DebuggingAdvanced Production Debugging
Advanced Production Debugging
 
Object Oriented Programming using C++ - Part 1
Object Oriented Programming using C++ - Part 1Object Oriented Programming using C++ - Part 1
Object Oriented Programming using C++ - Part 1
 
Biodata_VishweshBehere
Biodata_VishweshBehereBiodata_VishweshBehere
Biodata_VishweshBehere
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docx
 
E7
E7E7
E7
 
Oops 2018
Oops 2018Oops 2018
Oops 2018
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
Dlf2
Dlf2Dlf2
Dlf2
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_module
 
01 introduction to_module
01 introduction to_module01 introduction to_module
01 introduction to_module
 
Strayer cis-499-week-2-project-deliverable-1
Strayer cis-499-week-2-project-deliverable-1Strayer cis-499-week-2-project-deliverable-1
Strayer cis-499-week-2-project-deliverable-1
 
T2
T2T2
T2
 
Bca 5050 visual programming – practical
Bca 5050   visual programming – practicalBca 5050   visual programming – practical
Bca 5050 visual programming – practical
 
LatestCOCOMO model presentation for college students .pptx
LatestCOCOMO model presentation for college students .pptxLatestCOCOMO model presentation for college students .pptx
LatestCOCOMO model presentation for college students .pptx
 
Pratk kambe rac
Pratk kambe racPratk kambe rac
Pratk kambe rac
 
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
 
Meet Technology
Meet TechnologyMeet Technology
Meet Technology
 

Plus de Web Developer (20)

Eco 2
Eco 2Eco 2
Eco 2
 
Cs 612
Cs 612Cs 612
Cs 612
 
Cs 611 (p)s4
Cs 611 (p)s4Cs 611 (p)s4
Cs 611 (p)s4
 
Cs 611 (p)s3
Cs 611 (p)s3Cs 611 (p)s3
Cs 611 (p)s3
 
Cs 611 (p)s2
Cs 611 (p)s2Cs 611 (p)s2
Cs 611 (p)s2
 
Cs 611 (p)s1
Cs 611 (p)s1Cs 611 (p)s1
Cs 611 (p)s1
 
Cs 611
Cs 611Cs 611
Cs 611
 
Cs 610
Cs 610Cs 610
Cs 610
 
Cs 601
Cs 601Cs 601
Cs 601
 
Cs 74 (p)s8
Cs 74 (p)s8Cs 74 (p)s8
Cs 74 (p)s8
 
Cs 75
Cs 75Cs 75
Cs 75
 
Cs 74 (p)s7
Cs 74 (p)s7Cs 74 (p)s7
Cs 74 (p)s7
 
Cs 74 (p)s6
Cs 74 (p)s6Cs 74 (p)s6
Cs 74 (p)s6
 
Cs 74 (p)s5
Cs 74 (p)s5Cs 74 (p)s5
Cs 74 (p)s5
 
Cs 74 (p)s4
Cs 74 (p)s4Cs 74 (p)s4
Cs 74 (p)s4
 
Cs 74 (p)s3
Cs 74 (p)s3Cs 74 (p)s3
Cs 74 (p)s3
 
Cs 74 (p)s2
Cs 74 (p)s2Cs 74 (p)s2
Cs 74 (p)s2
 
Cs 74 (p)s1
Cs 74 (p)s1Cs 74 (p)s1
Cs 74 (p)s1
 
Cs 74
Cs 74Cs 74
Cs 74
 
Cs 73
Cs 73Cs 73
Cs 73
 

Cs 72 (p)s1

  • 1. No. of Printed Pages : 2 SET - 1 BACHELOR IN COMPUTER APPLICATIONS (BCA) Term-End Practical Examination 04575 June, 2011 CS-72P : C++ AND OBJECT ORIENTED PROGRAMMING Time allowed : 2 hours Maximum Marks : 100 (Weightage : 15%) General Instructions : (i) There are two compulsory questions in this paper of 40 marks each. Rest 20 marks are for viva - voce. (ii) You must write appropriate main ( ) function and test your programs. (iii) Write/print the programs, input and results on your answer-script. (iv) Make and state suitable assumptions, if any. 1. Design and implement a class "Longtime" using C + + . The class "Longtime" represents 40 the time as hours, minutes and seconds using 24 hour - time format. The class should have a constructor that initialises time to 12:00:00. The class has two member functions as follows :- (a) "Difference Time" which overloads the - (minus) operator to find the difference of time stored in two different Longtime objects ; and (b) "Print Time" that prints the time as a.m. or p.m. for example, if a Longtime object has the time stored as 15:15:30, then this print time function will output : 03:15:30 p.m. 2. Consider the following class hierarchy along with the suggested data members for the 40 classes Data members : - Dept ID Department - Dept Name -HOD - Location Production Marketing •Expertise • Zone in India • Product CS-72P/S1 1 P.T.O.
  • 2. A production department produces products in a specified product line in which the department has expertise. Design and implement the classes in the hierarchy using C + + . You may add more data members in the classes, if needed. You should include at least one constructor in each class. All the classes should have a member function "print_department_info( )" which prints all the data of an object of that class. You should demonstrate the polymorphism using the print_department_info( ) function along with appropriate main ( ) function. CS-72P/S1 2 6,000