GUJARAT TECHNOLOGICAL UNIVERSITY
Diploma Engineering – SEMESTER – 4 (NEW) – EXAMINATION – Summer-2023
Subject Code: 4340701 Date: 13-07-2023
Subject Name: Advanced Object Oriented Programming
Time: 10:30 AM to 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Use of programmable & communication aids are strictly prohibited.
5. Use of non-programmable scientific calculator is permitted.
6. English version is authentic.
Marks
Q.1 (a) Explain JVM. 03
પ્રશ્ન.1 (અ) JVM વિષે સમજાિો. ૦૩
(b) List out different types of operators in Java. Explain Logical and 04
Bitwise Operators in detail.
(બ) JAVA મ ાં વિવિધ પ્રક રન ઓપરેટરોની ય દી બન િો. લોવિકલ અને ૦૪
બીટિ ઇઝ ઓપરેટરોને વિગતિ ર સમજાિો.
(c) Write a program that reads an integer between 0 and 1000 and adds all 07
the digits in integer. For example if an integer is 931 then sum is 13.
(ક) JAVA મ ાં પ્રોગ્ર મ લખો િે 0 અને 1000 ની િચ્ચે પૂર્ ાંક િ ાંચે અને પૂર્ ાંકમ ાં ૦૭
તમ મ અાંકો ઉમેર.ે ઉદ હરર્ તરીકે િો પૂર્ ાંક 931 છે તો સરિ ળો 13 છે .
OR
(c) Write a java program to implement Fibonacci series using Loop control 07
statement.
(ક) લૂપ કાં ટરોલ સ્ટે ટમેન્ટનો ઉપયોગ કરીને વિબોન કી શ્રેર્ીને નો પ્રોગ્ર મ જાિ મ ાં ૦૭
લખો.
Q.2 (a) Write any four difference between procedure oriented and object 03
oriented programming language.
પ્રશ્ન.2 (અ) પ્રોવસિર ઓવરએન્ટે ડ અને ઓબ્િેક્ટ ઓવરએન્ટે ડ પ્રોગ્ર વમાંગ લેંગ્િેિ િચ્ચે ૦૩
કોઈ પર્ ચ ર તિ િત લખો
(b) Define method overloading. Explain with suitable example. 04
(બ) મેથડ ઓિરલોવડાં ગ પદ્ધવત વ્ય ખ્ય વયત કરો. યોગ્ય ઉદ હરર્ સ થે સમજાિો. ૦૪
(c) Write a java program to demonstrate use of “String” class methods : 07
chatAt(), contains(), format(), length(), split()
(ક) "String " Class ની મેથડનો ઉપયોગ દર્ ાિિ મ ટે જાિ પ્રોગ્ર મ લખો: ૦૭
chatAt(),contains(), format(), length(), split().
OR
Q.2 (a) What is wrapper class ? Explain use of any one wrapper class. 03
પ્રશ્ન.2 (અ) Wrapper ક્લ સ ર્ાં છે ? કોઈપર્ એક Wrapper ક્લ સનો ઉપયોગ સમજાિો. ૦૩
(b) Write a program in Java demonstrate the use of “this” keyword. 04
(બ) JAVA મ ાં "this" કી-િડા નો ઉપયોગ ઉદ હરર્ સ થે સમજાિો. ૦૪
(c) Write Java program using copy constructor to find area of rectangle. 07
(ક) લાંબચોરસનાં ક્ષેત્રિળ ર્ોધિ મ ટે કોપી કન્સ્ટર ક્ટરનો ઉપયોગ કરીને Java ૦૭
1