<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3846313688195226786</id><updated>2024-12-19T08:56:47.683+05:30</updated><category term="Basics of Computer"/><category term="Java"/><category term="MS Office"/><category term="ICSE Solved Paper"/><category term="Categories of Computer"/><category term="MS Word"/><category term="MS Excel"/><category term="Operating System"/><category term="Computer Hardware"/><category term="Networking"/><category term="Video"/><title type='text'>A2Z Computer</title><subtitle type='html'>All the computer related posts are available here. Computer Language, Computer Networking, Hardware, Software, Number System in Computer, Java</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-7491946946111183255</id><published>2022-05-21T09:48:00.006+05:30</published><updated>2023-12-05T21:33:05.318+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2014</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3wh3vA6uZLJ10WKlpP0L2A14MZM0lY0EwHBOIjjCoc-fQbD3JECvpqxJs5RTHMd9hFXuCrf4eKYJVHH0ewnnDqEL0BFC6XV83ZNaXGwD65yoMR9wARWJ5Z7XJwkxmOmn-Y0RnLD4apkShyFCeRsPkJ-5_nyFzLNtgWUS7FW6iH4SVVBKphZe8K5XzTg/s687/Capture1.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;549&quot; data-original-width=&quot;687&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3wh3vA6uZLJ10WKlpP0L2A14MZM0lY0EwHBOIjjCoc-fQbD3JECvpqxJs5RTHMd9hFXuCrf4eKYJVHH0ewnnDqEL0BFC6XV83ZNaXGwD65yoMR9wARWJ5Z7XJwkxmOmn-Y0RnLD4apkShyFCeRsPkJ-5_nyFzLNtgWUS7FW6iH4SVVBKphZe8K5XzTg/w640-h512/Capture1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;

&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf910uQT8cwh5_YuerWfqcyfQ1vLZiKF1lPriwKJUXSf2V5LeRFXll0awViS9Ekf2Y49GvFJ0MHoXIC_QfffcdhZvHx95kGc_8l9n6OLUzLF9ZTtDb0Jw1odmEAoEhIQqEWLTCUCYVGl0zg3I3fr6OdalQ_dbjdbh8w1PY-UTlwcyXToWgDxBHSkZrrQ/s671/Capture2.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;536&quot; data-original-width=&quot;671&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf910uQT8cwh5_YuerWfqcyfQ1vLZiKF1lPriwKJUXSf2V5LeRFXll0awViS9Ekf2Y49GvFJ0MHoXIC_QfffcdhZvHx95kGc_8l9n6OLUzLF9ZTtDb0Jw1odmEAoEhIQqEWLTCUCYVGl0zg3I3fr6OdalQ_dbjdbh8w1PY-UTlwcyXToWgDxBHSkZrrQ/w640-h512/Capture2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZg7aWhT6GI0C_wcX0KSQ4qW3rdn91-q3_GAgfA3ZyQwH_ZWxBTDeti-Skny0E4XFotbERRpHW1_S5baP10vESQcdgwtAnulgdTLw0T7IzSMY3fnngtlDoCOiTLS99LRG6eeOe2G4Yv35E_RNGo0Dzzg4Us7Kiv7mnrzjHGleJFF1UXydqxMUdjnO6Og/s687/Capture3.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;653&quot; data-original-width=&quot;687&quot; height=&quot;608&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZg7aWhT6GI0C_wcX0KSQ4qW3rdn91-q3_GAgfA3ZyQwH_ZWxBTDeti-Skny0E4XFotbERRpHW1_S5baP10vESQcdgwtAnulgdTLw0T7IzSMY3fnngtlDoCOiTLS99LRG6eeOe2G4Yv35E_RNGo0Dzzg4Us7Kiv7mnrzjHGleJFF1UXydqxMUdjnO6Og/w640-h608/Capture3.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcgkPohHmBsxJSi8GtXVzjaDWSfx3VoWKFTKNQQCO_L4GLqPzUfvm02sAlsGZrsYaOXWHzJAhem5jZzEZlgsCojrf1qax4xrNTBzB4ONpe9gsXW27mTH5HlzNHIbz7iiRuFASkoK_Af_sJ46-pZhJItS1sXsbbh95YPVNL3vDpmBE3CXjdPmw3su83Vg/s670/Capture4.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;435&quot; data-original-width=&quot;670&quot; height=&quot;416&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcgkPohHmBsxJSi8GtXVzjaDWSfx3VoWKFTKNQQCO_L4GLqPzUfvm02sAlsGZrsYaOXWHzJAhem5jZzEZlgsCojrf1qax4xrNTBzB4ONpe9gsXW27mTH5HlzNHIbz7iiRuFASkoK_Af_sJ46-pZhJItS1sXsbbh95YPVNL3vDpmBE3CXjdPmw3su83Vg/w640-h416/Capture4.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFKQ05pqEJW8YrvQRYSOy1i9pSGiO06HbJvlBHW8ZvVPEiYVvmEPmOgih2umLLXRJs3DUZYeXmaSMBXnNrDTVpy2-AnI8LU0DQI7Gqz1DEYH6tk0_0yOsOFsB7nzlag5u3u1dZ3E5gIWHAVbNgeUx9aVo-6sm3T4xQOC2wjbncsa4zxU5nygVXTfukBQ/s709/Capture5.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;709&quot; data-original-width=&quot;675&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFKQ05pqEJW8YrvQRYSOy1i9pSGiO06HbJvlBHW8ZvVPEiYVvmEPmOgih2umLLXRJs3DUZYeXmaSMBXnNrDTVpy2-AnI8LU0DQI7Gqz1DEYH6tk0_0yOsOFsB7nzlag5u3u1dZ3E5gIWHAVbNgeUx9aVo-6sm3T4xQOC2wjbncsa4zxU5nygVXTfukBQ/w610-h640/Capture5.PNG&quot; width=&quot;610&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/7491946946111183255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2022/05/icse-solved-paper-2014.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7491946946111183255'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7491946946111183255'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2022/05/icse-solved-paper-2014.html' title='ICSE Solved Paper, 2014'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3wh3vA6uZLJ10WKlpP0L2A14MZM0lY0EwHBOIjjCoc-fQbD3JECvpqxJs5RTHMd9hFXuCrf4eKYJVHH0ewnnDqEL0BFC6XV83ZNaXGwD65yoMR9wARWJ5Z7XJwkxmOmn-Y0RnLD4apkShyFCeRsPkJ-5_nyFzLNtgWUS7FW6iH4SVVBKphZe8K5XzTg/s72-w640-h512-c/Capture1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-2037631996364435111</id><published>2022-05-20T19:22:00.001+05:30</published><updated>2022-05-21T09:29:47.778+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2015</title><content type='html'>&lt;h3 style=&quot;text-align: center;&quot;&gt;ICSE Examination 2015 – 16 (Solution)&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: center;&quot;&gt;COMPUTER APPLICATION&amp;nbsp;&lt;br /&gt;Class – X&amp;nbsp;&lt;br /&gt;&lt;b&gt;SECTION – A (40 MARKS)&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;Attempt all questions&lt;/i&gt;&lt;/div&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 1:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;What&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;are&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;default
values&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;primitive&lt;span style=&quot;letter-spacing: 0.1pt;&quot;&gt; &lt;/span&gt;data&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;types&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;int&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;and&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;float?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;The&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;default value of int is&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;0 and the default value&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;of&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;float
is 0.0f.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Name&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;any&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;two&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;OOP’s&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;principles.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: Abstraction, Encapsulation, Inheritance, Polymorphism.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;What&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;are&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;identifiers?&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Identifiers are names
of variables, classes, packages, methods and packages in a java&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;program.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Identify&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;literals&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt;
&lt;/span&gt;listed below:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) 0.5&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) &#39;A&#39;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(iii) false&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(iv) &#39;&#39;a&#39;&#39; [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(i)&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;Floating&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.2pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;point&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;literal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(ii) Character literal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(iii) Boolean literal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(iv) String literal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Name&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;wrapper&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;class&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;of char&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;type&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;and&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;boolean&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;type. [2]&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: &lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;The wrapper class of
char type is Character and the wrapper type of boolean type is&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Boolean.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 2:&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Evaluate&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;value&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;of n if&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;value&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;p=5, q=19&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;int n = (q-p) &amp;gt; (p-q) ? (q-p) : (p-q);&lt;/b&gt;&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ans: n = 14&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Arrange the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;primitive&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;data&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;types in&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;an&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;ascending&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;order&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of
their&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;size:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(i)&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;char&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;(ii)&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;byte&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;(iii) double (iv)&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;int&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;byte =&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;byte&lt;/span&gt;&lt;/div&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 43.0pt; margin-right: 340.55pt; margin-top: 2.8pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252);&quot;&gt;char = 2 bytes&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252);&quot;&gt;int = 4 bytes&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252);&quot;&gt;double&lt;span style=&quot;letter-spacing: -.3pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.35pt;&quot;&gt; &lt;/span&gt;8&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;bytes&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;What&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;is
the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;value&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;stored&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;in variable&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;res given below:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;double res =
Math.pow(&quot;345&quot;.indexOf(&#39;5&#39;), 3);&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: 8.0&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Name two types of constructor. [2]&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Default constructor&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and parameterized&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;constructor.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e)&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;What&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;are&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;values&lt;span style=&quot;letter-spacing: 0.15pt;&quot;&gt; &lt;/span&gt;of
a and&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;b&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;after&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt;
&lt;/span&gt;function is executed, if&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;values passed are 30 and 50:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void paws(int a, int b)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; a = a + b;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; b = a - b;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; a = a - b;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&amp;nbsp; &amp;nbsp; System.out.println(a&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;&quot; ,&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;&quot; +&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;b);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: 30, 50&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 3:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;State the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;data type&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt;
&lt;/span&gt;and&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;value&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;y&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;after&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;is&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;executed
:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;char x = &#39;7&#39;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;y = Character.isLetter(x);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: &lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Data type&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;of&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.25pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;will be&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and value will be
false.&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b)&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;What&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;is&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;function&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt;
&lt;/span&gt;of catch block&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;in&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;exception handling? Where&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;does&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;it&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;appear&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;in&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;a program?&lt;/span&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: &lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;catch block catches
the specified exception type and handles the same. It appears&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -2.9pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;between try&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;and
finally&lt;span style=&quot;letter-spacing: -0.25pt;&quot;&gt; &lt;/span&gt;block.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c)&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;State&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;output&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt;
&lt;/span&gt;program&lt;span style=&quot;letter-spacing: -0.2pt;&quot;&gt; &lt;/span&gt;segment&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;is executed:&lt;/span&gt;&amp;nbsp;[2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;a = &quot;Smartphone&quot;, b = &quot;Graphic&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Art&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;String&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;h&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;a.substring(2,&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;5);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;String k = b.substring(8).toUpperCase();&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;System.out.println(h);&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt;&lt;b&gt;System.out.println(k.equalsIgnoreCase(h));&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ans: art&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;true&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d)&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;The&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;access&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;specifier&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;that&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;gives&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;most&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;accessibility
is&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.25pt;&quot;&gt; &lt;/span&gt;least&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;accessibility is _____.&lt;/span&gt;&amp;nbsp;[2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: public, private&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e)&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(i) Name the
mathematical function which is used to find sine of an angle given in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;radians.&lt;/span&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: #FCFCFC; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Name&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;a&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;string&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;function&lt;span style=&quot;letter-spacing: .1pt;&quot;&gt;
&lt;/span&gt;which removes&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;blank spaces provided&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;in&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;prefix&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;and suffix of a string.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: (i) Math.sin()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (ii) trim()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(f)&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(i)What&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;will&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;code&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;print?&lt;/span&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;int arr[] = new int [5];&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;System.out.println(arr);&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;(i)&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ii)&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;value&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;stored in arr[0]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (iii) 0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (iv)
garbage value&lt;/b&gt;&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(ii)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Name the keyword
which is used to resolve the conflict between method parameter and instance variables/fields.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(i)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(iv) garbage value&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(ii)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;keyword&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(g)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;State the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;package&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;that&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;contains
the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;class :&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;(i) BufferedReader&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;&quot;&gt;&lt;b&gt;(ii)&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;Scanner&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(i)&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;java.io&lt;/span&gt;&lt;/div&gt;

&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(ii)&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt;
&lt;/span&gt;java.util&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(h)&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Write&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;output&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;of&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;code&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;segment:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;char ch;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int x = 97;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;do{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;ch = (char) x;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;System.out.print(ch + &quot; &quot;);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;if (x&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;%&lt;span style=&quot;letter-spacing: .1pt;&quot;&gt; &lt;/span&gt;10 == 0)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;++x;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 13.0pt; margin-right: 0in; margin-top: 2.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;} while (x &amp;lt;= 100);&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;Ans: a&amp;nbsp; b&amp;nbsp; c&amp;nbsp; d&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i)&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Write&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;java&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;expression
for&lt;/span&gt;:&amp;nbsp;&lt;/b&gt;&lt;b&gt;[2]&lt;/b&gt;&lt;b&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN4rbg5PzQLZ0A5pulKm4Itfov2G1csj3tk_pNJZI8ZPm6uO8vfO-1tdiZUwpm_Hh_JSD4v87n92VyX5nzLkgnBSiQl86oMiNdtaC1ekGDeA_OoV75pxHRe-z4fsAxK4XizK4qTOdGd_hLXO9j7yffTb9hoPN96uSbyunLZfeBP2Ww3m5xTNwu-Ba8zg/s66/Capture.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;50&quot; data-original-width=&quot;66&quot; height=&quot;40&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN4rbg5PzQLZ0A5pulKm4Itfov2G1csj3tk_pNJZI8ZPm6uO8vfO-1tdiZUwpm_Hh_JSD4v87n92VyX5nzLkgnBSiQl86oMiNdtaC1ekGDeA_OoV75pxHRe-z4fsAxK4XizK4qTOdGd_hLXO9j7yffTb9hoPN96uSbyunLZfeBP2Ww3m5xTNwu-Ba8zg/w53-h40/Capture.PNG&quot; width=&quot;53&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;(double)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Math.pow(a, 2)&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;Math.pow(b, 2)) / (2 * a&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;* b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;div style=&quot;margin-top: 0.3pt; text-align: left;&quot;&gt;&lt;b&gt;(j)&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;If&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;int&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;y&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;= 10 then&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;find&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;int&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;z&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;=
(++y * (y++&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;+ 5));&amp;nbsp;&amp;nbsp;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;[2]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0.3pt; text-align: left;&quot;&gt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;Ans: 176&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SECTION – B (60 MARKS)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Attempt any four questions&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 4:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Define a class&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;ParkingLot&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;with the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt;
&lt;/span&gt;following description:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Instance variables / Data members:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;int vno&lt;/span&gt;&amp;nbsp;–&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;To&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;store&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;vehicle&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;number&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;int&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;hours&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;–&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;To&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;store&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;number&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of
hours&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;vehicle&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;is&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;parked&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;in the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;parking lot&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;double&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;bill – To store&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;bill amount&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;Member methods:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;void input()&amp;nbsp;–&amp;nbsp;To&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;input&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;and&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;store&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;vno&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;and&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;hours&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;void calculate() – To&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;compute&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;parking&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;charge&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt;
&lt;/span&gt;at&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;rate&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of Rs.3&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;for&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;first&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;hour&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;or&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;part thereof, and&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Rs.1.50&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;each additional&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;hour or part thereof.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;void display() –&amp;nbsp;To
display&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;detail&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Write&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.2pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;method&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;to&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.15pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;an&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;object of the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;call&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;above&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;methods.&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 7.0pt; margin-right: 0in; margin-top: 0in;&quot;&gt;class&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt;
&lt;/span&gt;ParkingLot&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 311.0pt; margin-top: 2.75pt;&quot;&gt;private int
vno;&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;private int hours;&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;private&lt;span style=&quot;letter-spacing: -.4pt;&quot;&gt;
&lt;/span&gt;double&lt;span style=&quot;letter-spacing: -.4pt;&quot;&gt; &lt;/span&gt;bill;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-top: .5pt;&quot;&gt;&lt;span style=&quot;font-size: 14.0pt; mso-bidi-font-size: 12.0pt;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;public&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;void input()&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;{&lt;/p&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 153.85pt; margin-top: 2.8pt;&quot;&gt;Scanner sc =
new Scanner(System.in);&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;System.out.print(&quot;Enter
vehicle number: &quot;);&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;vno&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;sc.nextInt();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 201.5pt; margin-top: 0in;&quot;&gt;System.out.print(&quot;Enter
hours: &quot;);&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;hours&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;sc.nextInt();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 0in;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style=&quot;margin-top: 0.3pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 16.5pt; mso-bidi-font-size: 12.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;void&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;calculate()&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-left: 98.55pt;&quot;&gt;bill = 3 +&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;(hours -&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;1)&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;* 1.50;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-left: 52.85pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div style=&quot;margin-top: 0.35pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;display()&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0.35pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;System.out.println(&quot;Vehicle
number: &quot; + vno);&lt;span style=&quot;letter-spacing: -2.9pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Hours:
&quot; + hours);&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Bill:&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;Rs. &quot;&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;+&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;bill);&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 140.05pt; margin-top: 3.65pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;}&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 4.5pt;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;static void main() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 193.85pt; margin-top: 2.75pt;&quot;&gt;ParkingLot ob =
new ParkingLot();&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;ob.input();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 294.95pt; margin-top: 0in;&quot;&gt;ob.calculate();&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;ob.display();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;}&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 5:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: #FCFCFC; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Write&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;two&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;separate&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;programs&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;to&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;generate the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;following&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;patterns&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;using&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;iteration(loop) statements: [15]&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;*&amp;nbsp;&lt;/div&gt;&lt;div&gt;* #&amp;nbsp;&lt;/div&gt;&lt;div&gt;* # *&amp;nbsp;&lt;/div&gt;&lt;div&gt;* # * #&amp;nbsp;&lt;/div&gt;&lt;div&gt;* # * # *&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) To display the following pattern:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5 4 3 2 1&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5 4 3 2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5 4 3&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5 4&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;class&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;Pattern1&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;static
void main() {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(int
i = 1; i &amp;lt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;5; i++)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(int
j = 1; j &amp;lt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;i; j++)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;(j
% n ==&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;System.out.print(&quot;*&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;System.out.print(&quot;#&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;System.out.println();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;(b)&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;class&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;Pattern2&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;public static void main()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i, j;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(i=1; i&amp;lt;=5; i++)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(j=5; j&amp;gt;=i; j--)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(j);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 6:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Write a program in to
input and store all roll numbers, names and marks in 3 subjects&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;of&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;n&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;number&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;students&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;in&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;five&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;single&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;dimensional&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;arrays&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;and&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;display&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;remark&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;based&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;on&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;average
marks&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;as given&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;below:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;Average&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;marks&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;=&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;total&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;marks&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;/&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;3&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 47.8pt; mso-border-alt: solid black .5pt; mso-border-insideh: .5pt solid black; mso-border-insidev: .5pt solid black; mso-padding-alt: 0in 0in 0in 0in; mso-table-layout-alt: fixed; mso-yfti-tbllook: 480;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;height: 16.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: solid black 1.0pt; height: 16.5pt; mso-border-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.15pt; margin-right: 42.1pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;Average&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;Marks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid black 1.0pt; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.05pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 16.5pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.05pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;85 – 100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p align=&quot;right&quot; class=&quot;TableParagraph&quot; style=&quot;margin-right: 46.75pt; text-align: right;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;EXCELLENT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 16.5pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.0pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;75 – 84&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p align=&quot;right&quot; class=&quot;TableParagraph&quot; style=&quot;margin-right: 43.35pt; text-align: right;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;DISTINCTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 16.55pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; height: 16.55pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.0pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;60 – 74&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; height: 16.55pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p align=&quot;right&quot; class=&quot;TableParagraph&quot; style=&quot;margin-right: 43.85pt; text-align: right;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;FIRST&lt;span style=&quot;letter-spacing: 2.95pt;&quot;&gt; &lt;/span&gt;CLASS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 16.65pt; mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; height: 16.65pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;line-height: 13.75pt; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.0pt; margin-top: 0in; mso-line-height-rule: exactly;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;40 – 59&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; height: 16.65pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;line-height: 13.75pt; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.1pt; margin-top: 0in; mso-line-height-rule: exactly;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;PASS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 16.5pt; mso-yfti-irow: 5; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid black 1.0pt; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.1pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;LESS&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;THAN 40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; height: 16.5pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0in 0in 0in 0in; width: 168.75pt;&quot; valign=&quot;top&quot; width=&quot;225&quot;&gt;
  &lt;p class=&quot;TableParagraph&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 42.25pt; margin-right: 42.0pt; margin-top: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12.0pt; mso-bidi-font-size: 11.0pt;&quot;&gt;POOR&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 7.0pt; margin-right: 336.5pt; margin-top: 2.35pt;&quot;&gt;import
java.util.Scanner;&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;public&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;class Marks {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 0in;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;static&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;void main() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter number of
students: &quot;);&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;int&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;n =&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;sc.nextInt();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;int[] rollNumbers = new int[n];&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String[] names = new String[n];&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int[] subject1Marks = new int[n];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int[] subject2Marks = new int[n];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int[]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.2pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;subject3Marks&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.25pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;int[n];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;(int
i =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;0; i &amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;n; i++)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.println(&quot;Student &quot; + (i +
1));&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -2.85pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter
roll number: &quot;);&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;rollNumbers[i]
= sc.nextInt();&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter
name: &quot;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;names[i] =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;sc.nextLine();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;System.out.print(&quot;Enter
marks in subject 1: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;letter-spacing: -2.9pt;&quot;&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;subject1Marks[i]
= sc.nextInt();&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter
marks in subject 2: &quot;);&lt;span style=&quot;letter-spacing: -2.9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;subject2Marks[i]
= sc.nextInt();&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter
marks in subject 3: &quot;);&lt;span style=&quot;letter-spacing: -2.9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;subject3Marks[i]
=&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;sc.nextInt();&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 144.45pt; margin-right: 94.6pt; margin-top: 3.65pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;WordSection1&quot;&gt;&lt;div style=&quot;margin: 4.5pt 0in 0.0001pt 7pt; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;(int
i =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;0; i &amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;n; i++) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 4.5pt 0in 0.0001pt 7pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.println(&quot;Roll&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;number&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;= &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;rollNumbers[i] +&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&quot;,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&quot;
+&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;names[i]);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin: 4.5pt 0in 0.0001pt 7pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;averageMarks&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;(subject1Marks[i]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;subject2Marks[i]
+&amp;nbsp;&lt;/span&gt;subject3Marks[i])&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;/ 3;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;WordSection2&quot;&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-top: .3pt;&quot;&gt;&lt;span style=&quot;font-size: 16.5pt; mso-bidi-font-size: 12.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div&gt;&lt;div class=&quot;WordSection2&quot;&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 61.35pt; margin-top: 0in; text-indent: -45.85pt;&quot;&gt;if (averageMarks &amp;gt;= 85 &amp;amp;&amp;amp; averageMarks &amp;lt;= 100) {&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;EXCELLENT&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div&gt;&lt;div class=&quot;WordSection2&quot;&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 36.9pt; margin-top: .05pt; text-indent: -45.85pt;&quot;&gt;} else if (averageMarks &amp;gt;= 75 &amp;amp;&amp;amp; averageMarks &amp;lt;= 84) {&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;DISTINCTION&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div&gt;&lt;div class=&quot;WordSection2&quot;&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 36.9pt; margin-top: 0in; text-indent: -45.85pt;&quot;&gt;} else if (averageMarks &amp;gt;= 60 &amp;amp;&amp;amp; averageMarks &amp;lt;= 74) {&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;FIRST&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;CLASS&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div&gt;&lt;div class=&quot;WordSection2&quot;&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 36.9pt; margin-top: 0in; text-indent: -45.85pt;&quot;&gt;} else if (averageMarks &amp;gt;= 40 &amp;amp;&amp;amp; averageMarks &amp;lt;= 59) {&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;PASS&quot;);&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;div class=&quot;WordSection2&quot;&gt;&lt;div style=&quot;margin: 0in 0in 0.0001pt 7pt; text-align: left;&quot;&gt;}&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;else&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;if&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;(averageMarks&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;&amp;lt; 40) {&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;POOR&quot;);&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 7:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Design a&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;class&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;to&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;overload&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;a&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;function&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;Joystring()&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;as&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;follows:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) v&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;oid Joystring(String
s, char ch1, char ch2) with one string and two character&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;arguments&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;that&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;replaces&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;character&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;argument&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;ch1&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;with&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;character&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;argument&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;ch2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;in the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;given
string s and&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;prints the&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;new&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;string&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Input value of s =
&quot;TECHNALAGY&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;ch1&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;= &#39;A&#39;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;ch2 = &#39;O&#39;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Output&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;:&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;&quot;TECHNOLOGY&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) void&amp;nbsp;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Joystring(String s)
with one string argument that prints the position of the first&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;space&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;last space&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;of&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;given
String s.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Input value of s =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&quot;Cloud computing
means Internet based computing&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -2.85pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;First Index: 5&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;Last Index: 36&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;(iii)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;void Joystring(String
s1, String s2) with two string arguments that combines the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;two&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;strings with a space&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;between&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;them&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.2pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;and prints the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;resultant string&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Input value of s1 =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&quot;COMMON
WEALTH&quot;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;s2 = &quot;GAMES&quot;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Output:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;COMMON WEALTH&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;GAMES&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #fcfcfc; font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;b&gt;(use library functions)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; letter-spacing: -2.85pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;background-color: #fcfcfc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 7.0pt; margin-right: 336.5pt; margin-top: 2.1pt;&quot;&gt;class&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;StringOperations&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 160.65pt; margin-top: 0in; text-indent: -45.75pt;&quot;&gt;public void Joystring(String s, char ch1, char ch2) {&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;String output = s.replace(ch1, ch2);&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Output&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;&quot;&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;void Joystring(String&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;s)
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 118%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 168.1pt; margin-top: 2.75pt;&quot;&gt;int&lt;span style=&quot;letter-spacing: .55pt;&quot;&gt; &lt;/span&gt;firstIndexOfSpace&lt;span style=&quot;letter-spacing: .5pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: .55pt;&quot;&gt; &lt;/span&gt;s.indexOf(&#39;&lt;span style=&quot;letter-spacing: .5pt;&quot;&gt; &lt;/span&gt;&#39;);&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;int&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;lastIndexOfSpace&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;s.lastIndexOf(&#39;&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;&#39;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 0in; margin-top: .15pt;&quot;&gt;System.out.println(&quot;First&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;index&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;space&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;&quot;&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt;
&lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;firstIndexOfSpace);&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Last index&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;of&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;space&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;= &quot;&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt;
&lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;lastIndexOfSpace);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 0in;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;void Joystring(String&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;s1,&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;String&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt;
&lt;/span&gt;s2) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 98.55pt; margin-right: 153.85pt; margin-top: 2.75pt;&quot;&gt;String output =
s1.concat(&quot; &quot;).concat(s2);&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Output&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;&quot;&lt;span style=&quot;letter-spacing: -.35pt;&quot;&gt; &lt;/span&gt;+&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;output);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 8:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(252, 252, 252); font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;Write&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;a&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;program&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;to&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;input&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;twenty&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;names&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;in an&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;array.&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;Arrange&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;these&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;names&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;in
descending&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;order&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;of
alphabets&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;,&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;using&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;the&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;bubble&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;sort&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;technique.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;[15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 7.0pt; margin-right: 331.5pt; margin-top: 2.5pt;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.35pt;&quot;&gt; &lt;/span&gt;class&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt;
&lt;/span&gt;SortNames&lt;span style=&quot;letter-spacing: -.25pt;&quot;&gt; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: .05pt;&quot;&gt;public&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;static void main() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;sc&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;new&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;Scanner(System.in);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;String[] names&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;new&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;String[20];&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.println(&quot;Enter
20 names&quot;);&lt;/span&gt;&lt;span style=&quot;letter-spacing: -2.85pt; text-indent: 45.85pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.15pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;(int i = 0; i &amp;lt; 20; i++)&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.05pt; text-indent: 45.85pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;names[i]&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;sc.nextLine();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;(int i&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;= 0;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;i &amp;lt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;names.length; i++)&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for&lt;span style=&quot;letter-spacing: -0.15pt;&quot;&gt; &lt;/span&gt;(int j&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;= 1;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;j &amp;lt;&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;(names.length&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;-&lt;span style=&quot;letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;i); j++)&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;
&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;if (names[j - 1].compareTo(names[j]) &amp;gt; 0) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;String temp = names[j - 1];&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.05pt; text-indent: -45.75pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;names[j&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: -45.75pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: -45.75pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;1]&lt;/span&gt;&lt;span style=&quot;letter-spacing: 0.05pt; text-indent: -45.75pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: -45.75pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: -45.75pt;&quot;&gt;names[j];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;names[j]&lt;span style=&quot;letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;=&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;temp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;System.out.println(&quot;Sorted names: &quot;);&lt;/span&gt;&lt;span style=&quot;letter-spacing: -2.85pt; text-indent: 45.85pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;for&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.15pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;(int&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;i =&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;0;
i&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;&amp;lt; names.length;&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-indent: 45.85pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-indent: 45.85pt;&quot;&gt;i++)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(names[i]);&amp;nbsp;&lt;/div&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 52.85pt; margin-right: 0in; margin-top: 4.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=&quot;MsoBodyText&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 7.0pt; margin-right: 0in; margin-top: 2.8pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 9:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Use&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;switch&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;statement,&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;write&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;a&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;menu&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;driven&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;program&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt;
&lt;/span&gt;to: [15]&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;(i)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;To find and display all the factors of a number
input by the user (including 1 and&lt;span style=&quot;letter-spacing: -2.85pt;&quot;&gt; &lt;/span&gt;excluding&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;number&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;itself.)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Example:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Sample Input: n = 15&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;Sample Output: 1, 3, 5&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;(ii)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;To find and display the factorial of a number
input by the user. The factorial of a&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;non-negative
integer n, denoted by n!, is the product of all integers less than or equal to n.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Example:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Sample Input: n = 5&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;Sample Output: 120&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;For&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;an&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;incorrect&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt;
&lt;/span&gt;choice,&lt;span style=&quot;letter-spacing: .05pt;&quot;&gt; &lt;/span&gt;an&lt;span style=&quot;letter-spacing: -.1pt;&quot;&gt; &lt;/span&gt;appropriate&lt;span style=&quot;letter-spacing: -.2pt;&quot;&gt; &lt;/span&gt;error&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;message&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;should&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt;
&lt;/span&gt;be&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;displayed.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-size: 11.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;public class Menu&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Scanner&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;sc&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Scanner(System.in);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.println(&quot;1.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Factors&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;2.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;Factorial&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: 0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.35pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;your&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.3pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;choice:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.25pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; int ch = sc.nextInt();&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; switch(ch){&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; case 1:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.print(&quot;Enter n: &quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;int&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;n =&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;sc.nextInt();&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 144.45pt; margin-right: 176.25pt; margin-top: 2.75pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for&lt;span style=&quot;letter-spacing: -.15pt;&quot;&gt; &lt;/span&gt;(int i
=&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;1; i &amp;lt;&lt;span style=&quot;letter-spacing: -.05pt;&quot;&gt; &lt;/span&gt;n; i++) {&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 11.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-align: right;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-align: right;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-align: right;&quot;&gt;(n % i ==&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-align: right;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;text-align: right;&quot;&gt;0)&lt;/span&gt;&lt;span style=&quot;letter-spacing: -0.05pt; text-align: right;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(i);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp; &amp;nbsp; case 2:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.print(&quot;Enter n: &quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;int&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;n =&lt;span style=&quot;letter-spacing: -0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;sc.nextInt();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;factorial&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;1;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px; letter-spacing: -0.15pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;(int i =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px; letter-spacing: -0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;1; i &amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px; letter-spacing: -0.05pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;n; i++)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 14.6667px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;factorial =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.1pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;factorial&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt; letter-spacing: -0.05pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;i;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.out.println(&quot;Factorial:
&quot; + factorial);&lt;span style=&quot;letter-spacing: -2.9pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; default:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;System.out.println(&quot;Invalid choice&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 11pt;&quot;&gt;&lt;span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p class=&quot;MsoBodyText&quot; style=&quot;line-height: 120%; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 144.45pt; margin-right: 106.5pt; margin-top: 2.75pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/2037631996364435111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2022/05/icse-solved-paper-2015.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/2037631996364435111'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/2037631996364435111'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2022/05/icse-solved-paper-2015.html' title='ICSE Solved Paper, 2015'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN4rbg5PzQLZ0A5pulKm4Itfov2G1csj3tk_pNJZI8ZPm6uO8vfO-1tdiZUwpm_Hh_JSD4v87n92VyX5nzLkgnBSiQl86oMiNdtaC1ekGDeA_OoV75pxHRe-z4fsAxK4XizK4qTOdGd_hLXO9j7yffTb9hoPN96uSbyunLZfeBP2Ww3m5xTNwu-Ba8zg/s72-w53-h40-c/Capture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-1465076802099643175</id><published>2020-11-21T14:00:00.003+05:30</published><updated>2020-11-21T17:13:53.889+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2016</title><content type='html'>&lt;h3 style=&quot;text-align: center;&quot;&gt;ICSE Examination 2016 – 17 (Solution)&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: center;&quot;&gt;COMPUTER APPLICATION&amp;nbsp;&lt;br /&gt;Class – X&amp;nbsp;&lt;br /&gt;&lt;b&gt;SECTION – A (40 MARKS)&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;Attempt all questions&lt;/i&gt;&lt;/div&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 1:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Define Encapsulation. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Encapsulation is the process of wrapping up of data and associated methods into a
single unit (class).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) What are keywords? Give an example. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Keywords are reserved words which convey special meaning to the compiler. They
cannot be used as identifiers. For example, class, void, etc.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) Name any tow library packages. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) java.util&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) java.io&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Name the type of error (Syntax, runtime or logical error) in each case given below:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Math.sqrt(35 – 45);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) int a;b;c; [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) Runtime error, because Math.sqrt(– 9) which cannot be computed as square root of
a negative number is not defined.&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) Syntax error, because multiple variables can be defined in one of the following
ways:
int a, b, c;
int a; int b; int c;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) If int x[] = {4, 3, 7, 8, 9, 10};&amp;nbsp;&lt;/b&gt;&lt;b&gt;[2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;what are the values of p and q?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) p = x.length&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) q = x[2] + x[5] * x[1]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 6&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) q = x[2] + x[5] * x[1]&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;= 7 + 10 * 3&lt;/div&gt;&lt;div&gt;= 7 + 30&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;=37&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 2:&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) State the difference between = = and equals() method. [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;==&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;equals()&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;i) It is a relational operator.&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;i) It is a method of String class.&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 2; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;ii) It checks for equality of primitive types of values.&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;ii) It checks for equality of two String type of values.&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) What are the types of casting shown by the following examples: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) char c = (char) 120;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) int x = &#39;t&#39;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) Explicit casting&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) Implicit casting&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) Differentiate between formal parameter and actual parameter. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Formal parameters are the parameters defined in the signature of a method. Actual
parameters are values given to the method at the time of method call.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Write the function prototype of the following: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;A function PosChar which takes a String argument and a character argument and
returns an integer value.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - int PosChar(String s, char c)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Name any two types of access specifiers. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - public, private, protected and default (&lt;i&gt;any two out of these 4&lt;/i&gt;).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Question 3:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Give the output of the following String function: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) “MISSISSIPPI”.indexOf(&#39;S&#39;) + “MISSISSIPPI”.lastIndexOf(&#39;I&#39;)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) “CABLE”.compareTo(“CADET”)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 2 + 10 = 12&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) 66 – 68 = – 2&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) Give the output of the following Math functions: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Math.ceil (4 . 2)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) Math.abs (– 4)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 5.0&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) 4&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) What is parameterized constructor? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - A parameterized constructor is a constructor that accepts arguments which are used to
initialize the object being created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Write down Java expression for: [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2vSekbRFB7evOxOcKeKsCee8d3TRNTp9SM5yvkO-iolSpIV0ZRyPtWjKNWohyNFuH9MA1m8mqspkVY5vmaOyu14m_aIUvWOLDjswLf9yCgxlGb_COdGjjCF9Gm0pTwz-zEZO7LR5nI3OK/s327/h.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;50&quot; data-original-width=&quot;327&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2vSekbRFB7evOxOcKeKsCee8d3TRNTp9SM5yvkO-iolSpIV0ZRyPtWjKNWohyNFuH9MA1m8mqspkVY5vmaOyu14m_aIUvWOLDjswLf9yCgxlGb_COdGjjCF9Gm0pTwz-zEZO7LR5nI3OK/w134-h20/h.JPG&quot; width=&quot;134&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Ans: - double T = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) + Math.pow(c, 2));&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;i&gt;OR&lt;/i&gt;,&amp;nbsp;&lt;/div&gt;&lt;div&gt;double T = Math.sqrt((A*A) + (B*B) + (C*C));&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Rewrite the following using ternary operator: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;if(x%2 == 0)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;EVEN&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;else&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;ODD&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - System.out.println(x % 2 == 0 ? “EVEN” : “ODD”);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(f) Convert the following while loop to the corresponding for loop: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int m = 5, n = 10;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;while (n&amp;gt;=1)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(m*n);
n–-;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - for(int m=5, n=10; n &amp;gt;=1; n--)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(m*n);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(g) Write one difference between primitive data types and composite data types. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - A primitive data types are predefined or inbuilt data types. For example, int, double,
etc.&lt;/div&gt;&lt;div&gt;Composite data types are defined by user and made-up of primitive data types values. For
example, class, array.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(h) Analyze the given program segment and answer the following questions: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Write the output of the program segment&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) How many times does the body of the loop gets executed?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(int m=5; m&amp;lt;=20; m+=5)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if(m%3 == 0)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else
 if(m%5 == 0)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(m);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;continue;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 5&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;10&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) 3 times&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Write the return type of the following library functions: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) isLetterOrDigit(char)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) replace(char, char)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) boolean&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) String&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SECTION – B (60 MARKS)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Attempt any four questions&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 4:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Define a class named BookFair with the following description: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Instance variables / Data members:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String Bname – stores the name of the book&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;double price – stores the price of the book&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;Member methods:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) BookFair() – default constructor to initialize data members
(&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) void Input() – To input and store the name and price of the book&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(iii) void calculate() – To calculate the price after discount.&amp;nbsp;&lt;/b&gt;&lt;b&gt;Discount is calculated
based on the following criteria.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 5.45in;&quot; valign=&quot;top&quot; width=&quot;523&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;Price&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 1.2in;&quot; valign=&quot;top&quot; width=&quot;115&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;Discount&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 5.45in;&quot; valign=&quot;top&quot; width=&quot;523&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;Less than or equal to&amp;nbsp;&lt;/b&gt;&lt;b&gt;₹&lt;/b&gt;&lt;b&gt;&amp;nbsp;1000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 1.2in;&quot; valign=&quot;top&quot; width=&quot;115&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;2% of price&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 5.45in;&quot; valign=&quot;top&quot; width=&quot;523&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;More than&amp;nbsp;&lt;/b&gt;&lt;b&gt;₹&lt;/b&gt;&lt;b&gt;&amp;nbsp;1000 and less than or equal to&amp;nbsp;&lt;/b&gt;&lt;b&gt;₹&lt;/b&gt;&lt;b&gt;&amp;nbsp;3000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 1.2in;&quot; valign=&quot;top&quot; width=&quot;115&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;10% of price&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 5.45in;&quot; valign=&quot;top&quot; width=&quot;523&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;More than&amp;nbsp;&lt;/b&gt;&lt;b&gt;₹&lt;/b&gt;&lt;b&gt;&amp;nbsp;3000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 1.2in;&quot; valign=&quot;top&quot; width=&quot;115&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;15% of price&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(iv) void display() – To display the name and price of the book after discount.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a main method to create an object of the class and call the above member
methods.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;public class BookFair&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String Bname;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double price;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;BookFair()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Bname = null;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;price = 0.0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;void Input()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter book name: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Bname = sc.nextLine();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter price: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;price = sc.nextDouble();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void calculate()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double discountPercentage = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (price &amp;lt;= 1000)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;discountPercentage = 2;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (price &amp;lt;= 3000)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;discountPercentage = 10;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (price &amp;gt; 3000)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;discountPercentage = 15;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;price = price - (price * discountPercentage / 100);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void display()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Name: &quot; + Bname);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Price after discount: &quot; + price);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;BookFair ob = new BookFair();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.Input();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.calculate();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.display();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 5:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Using the switch statement, write a menu driven program for the following: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) To print the Floyd‟s triangle [Given below]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2 3&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4 5 6&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;7 8 9 10&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;11 12 13 14 15&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) To display the following pattern:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I C&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I C S&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;I C S E&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;For an incorrect option, an appropriate error message should be displayed. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;public class Menu&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;1. Floyd&#39;s triangle&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;2. ICSE Pattern&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter your choice: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int ch = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;switch (ch)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 1:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter n (number of lines): &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int n = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int currentNumber = 1;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt;= n; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 1; j &amp;lt;= i; j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(currentNumber + &quot; &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;currentNumber++;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 2:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter word: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String word = sc.next();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; word.length(); i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 0; j &amp;lt;= i; j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;System.out.print(word.charAt(j) + &quot; &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;default:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.println(&quot;Invalid choice&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 6:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Special words are those words which start and end with the same letter.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Examples:&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;EXISTENCE&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;COMIC&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;WINDOW&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Palindrome words are those words which read the same from left to right and viceversa.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Examples:&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;MALAYALAM&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;MADAM&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;LEVEL&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ROTATOR&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;CIVIC&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;All palindromes are special words, but all special words are not palindromes.
Write a program to accept a word to check and print whether the word is a palindrome
or only special word. [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;class Words&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main(String s)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String reverse = &quot;&quot;;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = s.length() - 1; i &amp;gt;= 0; i--)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;reverse = reverse + s.charAt(i);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (s.equals(reverse))&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Palindrome&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char firstLetter = s.charAt(0);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char lastLetter = s.charAt(s.length() - 1);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (firstLetter == lastLetter)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Special word&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 7:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Design a class to overload a function SumSeries() as follows: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) void SumSeries(int n, double x) – with one integer argument and one double
argument to find and display the sum of the series given below:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsCwfqsynzbsUeqfoWZyoWjze66_SCUFDivDO68bNaDMEbtb5kD0Sq6Oa7kY5vOmQS52jJqEm709pEUG1ZMuLa2LA9vVcY-KfTWfYmABDaWttw7ok99n91xpS8rbk5BaZvsVvj0sJwkJfD/s1013/j.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;108&quot; data-original-width=&quot;1013&quot; height=&quot;27&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsCwfqsynzbsUeqfoWZyoWjze66_SCUFDivDO68bNaDMEbtb5kD0Sq6Oa7kY5vOmQS52jJqEm709pEUG1ZMuLa2LA9vVcY-KfTWfYmABDaWttw7ok99n91xpS8rbk5BaZvsVvj0sJwkJfD/w252-h27/j.jpg&quot; width=&quot;252&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;(ii) void SumSeries() – to find and display the sum of the following series:
s = 1 + (1×2) + (1×2×3) + …. + (1×2×3×4× …. 20)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;class Series&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void SumSeries(int n, double x)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double sum = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt;= n; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (i % 2 == 1)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + (x / i);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum - (x / i);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Sum = &quot; + sum);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void SumSeries()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int sum = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt;= 20; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int product = 1;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 1; j &amp;lt;= i; j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;product = product * j;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + product;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Sum = &quot; + sum);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 8:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to accept a number and check and display whether it is a Niven
number or not. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(Niven number is that number which is divisible by its sum of digits)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Example:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Consider the number 126&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Sum of its digits is 1 + 2 + 6 = 9 and 126 is divisible by 9.&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;class NivenNumber&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main(int n)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int sumOfDigits = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int copyOfNum = n;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;while (n &amp;gt; 0)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int remainder = n % 10;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;n = n / 10;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sumOfDigits = sumOfDigits + remainder;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (copyOfNum % sumOfDigits == 0)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;System.out.println(&quot;Niven number&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Not a niven number&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 9:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to initialize the seven Wonders of the World along with their locations
in two different arrays. Search for a name of the country input by the user. If found,
display the name of the country along with its Wonder, otherwise display “Sorry Not
Found!” [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Seven wonders&lt;/i&gt; – CHICHEN ITZA, CHRIST THE RDEEEMER, TAJMAHAL,
GREAT WALL OF CHINA, MACHU PICCHU, PETRA, COLOSSEUM&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Locations&lt;/i&gt; – MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example – Country Name: INDIA&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output: INDIA – TAJMAHAL&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Country Name: USA&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output: Sorry Not Found!&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;public class SevenWonders&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;String[] sevenWonders = { &quot;CHICHEN ITZA&quot;, &quot;CHRIST THE
RDEEEMER&quot;, &quot;TAJMAHAL&quot;, &quot;GREAT WALL OF CHINA&quot;,
&quot;MACHU PICCHU&quot;, &quot;PETRA&quot;, &quot;COLOSSEUM&quot; };&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;String[] locations = { &quot;MEXICO&quot;, &quot;BRAZIL&quot;, &quot;INDIA&quot;, &quot;CHINA&quot;,
&quot;PERU&quot;, &quot;JORDAN&quot;, &quot;ITALY&quot; };&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;System.out.print(&quot;Enter country: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;String country = sc.next();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int index = -1;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; locations.length; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (locations[i].equals(country))&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;index = i;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (index != -1)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(locations[index] + &quot; - &quot; +
sevenWonders[index]);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Sorry Not Found!&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/1465076802099643175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2016.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1465076802099643175'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1465076802099643175'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2016.html' title='ICSE Solved Paper, 2016'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2vSekbRFB7evOxOcKeKsCee8d3TRNTp9SM5yvkO-iolSpIV0ZRyPtWjKNWohyNFuH9MA1m8mqspkVY5vmaOyu14m_aIUvWOLDjswLf9yCgxlGb_COdGjjCF9Gm0pTwz-zEZO7LR5nI3OK/s72-w134-h20-c/h.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-1782369068657434970</id><published>2020-11-19T10:54:00.003+05:30</published><updated>2020-11-19T11:19:19.098+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2017</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;h3 style=&quot;text-align: center;&quot;&gt;ICSE Examination 2017 – 18 (Solution)&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: center;&quot;&gt;COMPUTER APPLICATION&amp;nbsp;&lt;br /&gt;Class – X&amp;nbsp;&lt;br /&gt;&lt;b&gt;SECTION – A (40 MARKS)&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;Attempt all questions&lt;/i&gt;&lt;/div&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 1:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) What is Inheritance? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Inheritance is the process by which one class extends another class to inherit the
variables and functions and add any additional variables and methods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) Name the operators listed below:&amp;nbsp; [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) &amp;lt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) ++&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;iii) &amp;amp;&amp;amp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;iv)? :&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) &amp;lt; – Less than relational operator&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) ++ – increment operator&amp;nbsp;&lt;/div&gt;&lt;div&gt;iii) &amp;amp;&amp;amp; – Logical AND operator&amp;nbsp;&lt;/div&gt;&lt;div&gt;iv) ? : – Ternary operator&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) State the number of bytes occupied by char and int data types. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - char occupies two bytes and int occupies 4 bytes.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Writ one difference between / and % operator. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - / division operator which gives quotient while % is modules operator which gives the
remainder on dividing two numbers.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) String x[] = {“SAMSUNG”, “NOKIA”, “SONY”, “MICROMAX”,
“BLAKBERRY”}; [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Give the output of the following statements:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) System.out.println(x[1]);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) System.out.println(x[3].length());&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) NOKIA&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) “MICROMAX”.length()&lt;/div&gt;&lt;div&gt;= 8&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 2:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Name of the following:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) A keyword used to call a package in the program.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) Any one reference data types.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) import&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) String&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) What are the two ways of invoking functions? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Call by value and Call by reference&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) State the data type and value of res after the following is executed:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;char ch = &#39;t&#39;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;res = Character.toUpperCase(ch); [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Data type of res is char and value is T&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Give the output of the following program segment and also mention the number of
times the loop is executed: [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int a,b;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(a=6,b=4;a&amp;lt;=24;a=a+6)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if(a%b==0)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(a);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - The output is 12 and loop is executed 2 times.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Write the output: [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;char ch= &#39;F&#39;;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int m=ch;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;m=m+5;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(m+ &quot; &quot; +ch);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - 75&amp;nbsp; F&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 3:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Write a Java expression for the following:
 [2]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUYAqcN7q9Ty4r5csQ9U6-wEmjgB_9Lx9yCHuMNa-yUBfZDmiL-nRQkPhZOI-ky7rdcVzOS9Eh1GKfJIKR7fQJDCbJpTcdpjqP_eu1BHgk5XPXtkn8WHy4clsJMd6Sc68_LYNbs5Oter21/s328/g.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;62&quot; data-original-width=&quot;328&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUYAqcN7q9Ty4r5csQ9U6-wEmjgB_9Lx9yCHuMNa-yUBfZDmiL-nRQkPhZOI-ky7rdcVzOS9Eh1GKfJIKR7fQJDCbJpTcdpjqP_eu1BHgk5XPXtkn8WHy4clsJMd6Sc68_LYNbs5Oter21/w107-h20/g.JPG&quot; width=&quot;107&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Ans: - a * Math.pow(x, 5) + b *b Math.pow(x, 3) + c&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) What is the value of x1 if x = 5? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;x1 = ++x – x++ + – –x&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: x1 = ++x – x++ + – –x&amp;nbsp;&lt;/div&gt;&lt;div&gt;x1 = 6 – 6 + 6&amp;nbsp;&lt;/div&gt;&lt;div&gt;x1 = 6&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) Why is an object called an instance of a class? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - An object is called an instance of a class as every object created from a class gets its
own instances of the variables defined in the class. Multiple objects can be created from the
same class.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Convert following do-while loop into for loop. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int i=1;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int d=5;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;do{&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;d=d*2;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(d);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;i++;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}while(i&amp;lt;=5);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: for(int i=1, d=5; i&amp;lt;=5; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;d = d * 2;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(d);&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Differentiate between constructor and function. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - (i) The constructor of a class is invoked automatically during object creation while a
function is invoked manually after object creation.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; (ii)&lt;/span&gt;A constructor is invoked only once while a function can be invoked multiple times.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; (iii)&amp;nbsp;&lt;/span&gt;A constructor has the same name as the class in which it is defined while a function
can have any time.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(f) Write the output of the following: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String s= &quot;Today is Test&quot;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(s.indexOf(&#39;T&#39;));&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(s.substring(0,7)+ &quot; &quot;+ &quot;Holiday&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - 0&amp;nbsp;&lt;/div&gt;&lt;div&gt;Today i Holiday&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(g) What are the values stored in variables r1 and r2: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) double r1 = Math.abs(Math.min(–2.83, –5.83));&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) double r2 = Math.sqrt(Math.floor(16.3));&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 5.83&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) 4.0&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(h) Give the output of the following code: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String A= &quot;26&quot;, B= &quot;100&quot; ;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String D=A+B+ &quot;200&quot;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int x= Integer.parseInt(A);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int y=Integer.parseInt(B);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int d=x+y;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(&quot;Result 1=&quot; +D);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;System.out.println(&quot;Result 2=&quot;+d);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Result 1 = 26100200&lt;/div&gt;&lt;div&gt;Result 2 = 126&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Analyze the given program segment and answer the following questions: [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(int i=3;i&amp;lt;=4;i++){&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(int j=2;j&amp;lt;i;j++){&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.print(&quot; &quot;);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(&quot;WIN&quot;);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) How many times does the inner loop execute?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) Write the output of the program segment.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) 3 times&lt;/div&gt;&lt;div&gt;ii) WIN&lt;/div&gt;&lt;div&gt;&amp;nbsp;WIN&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(j) What is the difference between the Scanner class functions next() and nextLine()? [2]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - next() read a single token i.e. all characters from the current position till a whitespace&lt;/div&gt;&lt;div&gt;or tab or new line is encountered.&lt;/div&gt;&lt;div&gt;nextLine() reads an entire line i.e. all characters from the current position till a new&lt;/div&gt;&lt;div&gt;line is encountered.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SECTION – B (60 MARKS)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Attempt any four questions&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 4:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Define a class ElectricBill with the following specifications:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;class : ElectricBill&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;i&gt;Instance variable / data members&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String n – to store the name of the customer&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int units – to store the number of units consumed&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;double bill – to store the amount to be paid&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;Methods&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void accept(): to accept the name of the customer and number of units consumed.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void calculate(): to calculate the bill as per the following tariff:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Number of units &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Rate per unit&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;First 100 units &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;₹ 2.00&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Next 200 units &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;₹ 3.00&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Above 300 units &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;₹ 5.00&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;A surcharged of 2.5% charged if the number of units consumed is above 300 units.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void print(): to print the details as follows:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Name of the customer: ___________&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Number of units consumed: ________&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Bill amount: __________&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a main() method to create an object of the class and call the above member
functions. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;class ElectricBill&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;private String n;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;private int units;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;private double bill;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void accept()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter name: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;n = sc.next();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter units: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;units = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void calculate()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (units &amp;lt;= 100)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;bill = units * 2;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (units &amp;lt;= 300)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;bill = 100 * 2 + (units - 100) * 3;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;bill = 100 * 2 + 200 * 3 + (units - 300) * 5;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;double surcharge = bill * 2.5 / 100;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;bill = bill + surcharge;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public void print()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Name of the customer: &quot; + n);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Number of units consumed: &quot; + units);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Bill amount: &quot; + bill);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ElectricBill ob= new ElectricBill();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.accept();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ob&lt;/span&gt;.calculate();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.print();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 5:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to accept a number and check and display whether it is a spy number
or not. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;A number is spy if the sum of its digits equals the product of its digits.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example: &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Consider the number 1124&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Sum of the digits = 1 + 1 + 2 + 4 = 8&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Product of the digits = 1 × 1 × 2 × 4 = 8&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&lt;/div&gt;&lt;div&gt;class SpyNumber&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main(int n)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int sumOfDigits = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int productOfDigits = 1;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;while (n &amp;gt; 0)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int remainder = n % 10;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sumOfDigits = sumOfDigits + remainder;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;productOfDigits = productOfDigits * remainder;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;n = n / 10;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (sumOfDigits == productOfDigits)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Spy number&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Not a spy number&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 6:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Using switch statement, write a menu driven program for the following: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) To find and display the sum of the series given below:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5_4hEhKJAokb7DHwo-YkGQUxhbse9fgEfxCPWBhhuxsDpbVzXhFlDSaT7P9vG_IpI-oV7H7iBobF9YzMIsm3Je65uEdlS1_yrITa26B3cIMXGtSvashht2Yls3tM8nFtJVKWu7s1o8h9F/s577/h.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;54&quot; data-original-width=&quot;577&quot; height=&quot;21&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5_4hEhKJAokb7DHwo-YkGQUxhbse9fgEfxCPWBhhuxsDpbVzXhFlDSaT7P9vG_IpI-oV7H7iBobF9YzMIsm3Je65uEdlS1_yrITa26B3cIMXGtSvashht2Yls3tM8nFtJVKWu7s1o8h9F/w222-h21/h.JPG&quot; width=&quot;222&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;ii) To display the following series:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 1&lt;/b&gt;&lt;span&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 11&lt;/b&gt;&lt;span&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 111&lt;/b&gt;&lt;span&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; 1111&lt;span&gt;&amp;nbsp; &amp;nbsp; 11111&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;For an incorrect option, an appropriate error message should displayed.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Ans: -&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;class Menu&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;1. Sum of series&quot;);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.println(&quot;2. Display Series&quot;);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter your choice: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int choice = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;switch (choice)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 1:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double sum = 0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt;= 20; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (i % 2 == 1)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + Math.pow(2, i);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum - Math.pow(2, i);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Sum = &quot; + sum);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 2:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt;= 5; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 1; j &amp;lt;= i; j++)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;1&quot;);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot; &quot;);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;default:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Invalid choice&quot;);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 7:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to input integer elements into an array of size 20 and perform the
following operations: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) Display largest number from the array&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) Display smallest number from the array&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;iii) Display sum of all the elements of the array&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Ans: -&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;class ArrayOperations&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;int[] numbers = new int[20];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter 20 numbers: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; 20; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;numbers[i] = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int smallest = numbers[0];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int largest = numbers[0];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int sum = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; 20; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (numbers[i] &amp;lt; smallest)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;smallest = numbers[i];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (numbers[i] &amp;gt; largest)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;largest = numbers[i];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + numbers[i];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Smallest = &quot; + smallest);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Largest = &quot; + largest);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Sum = &quot; + sum);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 8:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Design a class to overload a function check() as follows: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;i) void check(String str, char ch) – to find and print the frequency of a
character in a String.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Example:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;str = “success”;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ch = &#39;s&#39;;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output: Number of s present is = 3&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ii) void check(String s1) – to display only the vowels from string s1, after
converting it to lower case.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Example:&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;s1 = “computer”;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output – o u e&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;class Overload&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public void check(String str, char ch)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int result = 0;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; str.length(); i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char currentChar = str.charAt(i);&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;if (ch == currentChar)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;result++;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;number of s present is = &quot; + result);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public void check(String s1)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;s1 = s1.toLowerCase();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; s1.length(); i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char currentChar = s1.charAt(i);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (currentChar == &#39;a&#39; || currentChar == &#39;e&#39; || currentChar == &#39;i&#39; ||
currentChar == &#39;o&#39; || currentChar == &#39;u&#39;)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(currentChar + &quot; &quot; );&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 9:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to input forty words in an array. Arrange these words in descending
order of alphabets, using selection sort technique. Print the sorted array. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;class SelectionSort&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String[] words = new String[40];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Enter 40 words: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; 40; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;words[i] = sc.nextLine();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; words.length - 1; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int largestWordIndex = i;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = i + 1; j &amp;lt; words.length; j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;if (words[j].compareTo(words[largestWordIndex]) &amp;gt; 0)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;largestWordIndex = j;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String temp = words[largestWordIndex];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;words[largestWordIndex] = words[i];&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;words[i] = temp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;for (int i = 0; i &amp;lt; 40; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(words[i]);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/1782369068657434970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2017.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1782369068657434970'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1782369068657434970'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2017.html' title='ICSE Solved Paper, 2017'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUYAqcN7q9Ty4r5csQ9U6-wEmjgB_9Lx9yCHuMNa-yUBfZDmiL-nRQkPhZOI-ky7rdcVzOS9Eh1GKfJIKR7fQJDCbJpTcdpjqP_eu1BHgk5XPXtkn8WHy4clsJMd6Sc68_LYNbs5Oter21/s72-w107-h20-c/g.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-5083081999309265036</id><published>2020-11-13T12:29:00.018+05:30</published><updated>2020-11-18T20:30:31.926+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2018</title><content type='html'>&lt;h3 style=&quot;text-align: center;&quot;&gt;ICSE Examination 2018 – 19 (Solution)&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: center;&quot;&gt;COMPUTER APPLICATION&amp;nbsp;&lt;br /&gt;Class – X&amp;nbsp;&lt;br /&gt;&lt;b&gt;SECTION – A (40 MARKS)&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;Attempt all questions&lt;/i&gt;&lt;/div&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 1:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Define Abstraction. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Abstraction refers to specifying the behavior of a class without going into the details
of the implementation.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) Differentiate between searching and sorting. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - In searching, we are provided with an array which contains multiple elements and
asked to find the index of a specific element.
In sorting, an array is provided and we are asked to order the elements in either
ascending or descending order.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) Write a difference between the functions isUpperCase() and toUpperCase(). [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - isUpperCase() returns the boolean value whereas, toUpperCase returns character
value.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) How are private members of a class different from public members? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Private members of a class can be accessed only by the methods of the class in which
they are declared. While public members can be accessed outside of the class also.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Classify the following as primitive or non-primitive data types: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - char – Primitive&amp;nbsp;&lt;/div&gt;&lt;div&gt;arrays – Non-primitive&amp;nbsp;&lt;/div&gt;&lt;div&gt;int – Primitive&amp;nbsp;&lt;/div&gt;&lt;div&gt;classes – Non-primitive&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 2:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) (i) int res = &#39;A&#39;;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;What is the value of res?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) Name the package that contains wrapper classes. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - (i) res = 65&amp;nbsp;&lt;/div&gt;&lt;div&gt;(ii) java.lang package contains wrapper classes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) State the difference between while and do-while loop. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - A while is an entry controlled loop i.e. the loop condition is checked before the loop is
executed while, do-while is an exit controlled loop i.e. the loop condition is checked after the
loop is executed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) System.out.print(“BEST ”);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.print(“OF LUCK ”);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Choose the correct option for the output of the above statements: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) BEST OF LUCK&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) BEST&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; OF LUCK&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - (i) BEST OF LUCK is the correct answer.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Write the prototype of a function check which takes an integer as an argument and
returns a character. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - char function(int a)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Write the return data type of the following functions: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) endsWith()&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) log()&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - (i) endsWith – boolean&amp;nbsp;&lt;/div&gt;&lt;div&gt;(ii) log() – double&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Question 3:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(a) Write a Java expression for the following: [2]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpvEa65AFg32PFNuQk7ct4Nt5aILChlKRoR8dQGCorMtod1FPViLejGjifyozhgLtyvep71mH_AwlRBtqmG7YGDMHhrlGooyyiIevBeweje2usAWurKBALlXmntbc-D8zvkUuMHdp6rAj/s224/d.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;134&quot; data-original-width=&quot;224&quot; height=&quot;41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpvEa65AFg32PFNuQk7ct4Nt5aILChlKRoR8dQGCorMtod1FPViLejGjifyozhgLtyvep71mH_AwlRBtqmG7YGDMHhrlGooyyiIevBeweje2usAWurKBALlXmntbc-D8zvkUuMHdp6rAj/w68-h41/d.JPG&quot; width=&quot;68&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Ans:&amp;nbsp;Math•sqrt(3 * x + Math•pow(x, 2)) / (a + b);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(b) What is the value of y after evaluating the expressing given below? [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;y+= ++y + y– + – –y; when int y=8.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - y+= ++y + y– – + – –y&amp;nbsp;&lt;/div&gt;&lt;div&gt;8 + 9 + 9 + 7&amp;nbsp;&lt;/div&gt;&lt;div&gt;y=33&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(c) Give the output of the following: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Math.floor(–4.7)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) Math.ceil(3.4) + Math.pow(2,3)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) – 5.0&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) 4.0 + 8.0&amp;nbsp;&lt;/div&gt;&lt;div&gt;= 12.0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(d) Write two characteristics of a constructor. [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) A constructor has the same name as that of the class.&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) A constructor does not have a return type.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(e) Write the output of the following: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(“Incredible” + “\n” + “world”);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - Incredible&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;world&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(f) Convert the following if else if constructor into switch case: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;if(var = = 1)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;System.out.println(&quot;good&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;else if(var = = 2)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; System.out.println(&quot;better&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;else if(var = = 3)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; System.out.println(&quot;best&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;else&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;invalid&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -
switch(var)&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;case 1:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;System.out.println(&quot;good&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 2:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;better&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;case 3:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;best&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;default:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;invalid&quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(g) Give the output of the following String functions: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) “ACHIEVEMENT”.replace(„E‟, „A‟)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) “DEDICATED”.compareTo(“DEVOTE”)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: - i) ACHIAVAMANT&amp;nbsp;&lt;/div&gt;&lt;div&gt;ii) D – V = 68 – 86 = – 18&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(h) Consider the following String array and give the output: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String arr[] = {&quot;DELHI&quot;, &quot;CHENNAI&quot;, &quot;MUMBAI&quot;, &quot;LUCKNOW&quot;, &quot;JAIPUR&quot;};&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(arr[0].length() &amp;gt; arr[3].length());&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.print(arr[4].substring(0, 3));&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -
arr[0].length() &amp;gt; arr[3].length()&amp;nbsp;&lt;/div&gt;&lt;div&gt;= “DELHI”.length() &amp;gt; “LUCKNOW”.length()&amp;nbsp;&lt;/div&gt;&lt;div&gt;= 5 &amp;gt; 7&amp;nbsp;&lt;/div&gt;&lt;div&gt;So, output is false&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;arr[4].substring(0, 3)&amp;nbsp;&lt;/div&gt;&lt;div&gt;JAIPUR.substring(0, 3)&amp;nbsp;&lt;/div&gt;&lt;div&gt;So, output is JAI&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) Rewrite the following using ternary operator: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;if(bill &amp;gt; 10000)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;discount = bill * 10.0 / 100;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;else&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;discount = bill * 5.0 / 100;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: discount = bill &amp;gt; 10000 ? (bill * 10.0 / 100) : (bill * 5.0 / 100);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(j) Give the output of the following program segment and also mention how many times
the loop is executed: [2]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int i;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;for(i = 5; i &amp;gt; 10; i++)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(i);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;System.out.println(i * 4);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: Loop condition i&amp;gt;10 i.e. 5&amp;gt;10 which is false. So, loop is not executed even once.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Output will be 5 * 4 =20&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SECTION – B (60 MARKS)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;Attempt any four questions&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 4:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Design a class RailwayTicket with following description:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;Instance Variable / Data members&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String name : to store the name of the customer&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;String coach : to store the type of coach customer wants to travel&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;long mobno : to store customer‟s mobile number&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int amt : to store basic amount of ticket&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;int totalamt : to store the amount to be paid after updating the original
amount&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Methods:&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void accept() : to take input for name, coach, mobile number and amount&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void update() : to update the amount as per the coach selected.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Extra amount to be added in the amount as follows:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Type of coaches&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Amount&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;First_AC&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;700&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Second_AC&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;500&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Third_AC&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;250&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;sleeper&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;None&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;void display() : To display all details of a customer such as name, coach, total
amount and mobile number.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a main() method to create an object of the class and call the above methods. [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&amp;nbsp;&lt;/div&gt;&lt;div&gt;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div&gt;class RailwayTicket&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String name;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;String coach;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;long mobno;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int amt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int totalamt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void accept()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter name: &quot;);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;name = sc.nextLine();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter coach: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;coach = sc.nextLine();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter mobno: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;mobno = sc.nextLong();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter amt: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;amt = sc.nextInt();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void update()&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (coach.equals(&quot;First_AC&quot;))&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;totalamt = amt + 700;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (coach.equals(&quot;Second_AC&quot;))&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;totalamt = amt + 500;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (coach.equals(&quot;Third_AC&quot;))&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;totalamt = amt + 250;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else if (coach.equals(&quot;sleeper&quot;))&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;totalamt = amt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;void display()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Name: &quot; + name);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Coach: &quot; + coach);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Mobile Number: &quot; + mobno);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Amount: &quot; + amt);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Total Amount: &quot; + totalamt);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; public static&amp;nbsp;&lt;/span&gt;void main()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;RailwayTicket ob= new RailwayTicket();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; ob&lt;/span&gt;.accept();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.update();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ob.display();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 5:&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to input a number and check and print whether it is a Pronic number
or not. Pronic number is the number which is the product of two consecutive integers. [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Examples:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;12 = 3 × 4&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;20 = 4 × 5&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;42 = 6 × 7&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div&gt;class PronicNumber&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main(int n)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;boolean pronic = false;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i &amp;lt; n; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int product = i * (i + 1);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (product = = n)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;pronic = true;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;break;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Pronic number = &quot; + pronic);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 6:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program in Java to accept a string in lowercase and change the first letter of
every word to uppercase. Display the new string. [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Sample INPUT : &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;we are in cyber world&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Sample OUTPUT : &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;We Are In Cyber World&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;class SentenceCase&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main(String s)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String output = &quot;&quot;;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; s.length(); i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char ch = s.charAt(i);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if (i = = 0 || s.charAt(i - 1) = = &#39; &#39;)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;output = output + Character.toUpperCase(ch);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;output = output + ch;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Output: &quot; + output);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 7:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Design a class to overload a function volume() as follows:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) double volume(double r) – with radius &#39;r&#39; as an argument, returns the volume
of sphere using the formula:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0VyrHQqQwKVQ7HfZ7EXreXnmnkfXVk2SW91ggvPsLSguG7jbpoLK8XZ3pcOR2iE22IGAd3z8d6rtyXjRPzNHqvVWoS6S01RbwyiHR_tYkO7TcKTBt_yasNP4EEKv-INH0eyaljIWbmK4E/s333/e.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;92&quot; data-original-width=&quot;333&quot; height=&quot;30&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0VyrHQqQwKVQ7HfZ7EXreXnmnkfXVk2SW91ggvPsLSguG7jbpoLK8XZ3pcOR2iE22IGAd3z8d6rtyXjRPzNHqvVWoS6S01RbwyiHR_tYkO7TcKTBt_yasNP4EEKv-INH0eyaljIWbmK4E/w108-h30/e.jpg&quot; width=&quot;108&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) double volume(double h, double r) – with height &#39;h&#39; and radius &#39;r&#39; as the
arguments. returns the volume of a cylinder using the formula:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy0MNaLkXtyyxCbn-gLUJAksb3iN24Sbm_TgnRtbpL3pw1oNoDP5GxQIsAM7gne2nW_HRbN-z30geLdy_lV0gdjDdpmx11rh-kjtldiXpr2QwK48zUwTLCpQI0iPrx7HZnoyT6b1ibtQnw/s248/f.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;67&quot; data-original-width=&quot;248&quot; height=&quot;28&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy0MNaLkXtyyxCbn-gLUJAksb3iN24Sbm_TgnRtbpL3pw1oNoDP5GxQIsAM7gne2nW_HRbN-z30geLdy_lV0gdjDdpmx11rh-kjtldiXpr2QwK48zUwTLCpQI0iPrx7HZnoyT6b1ibtQnw/w103-h28/f.jpg&quot; width=&quot;103&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;(iii) double volume(double l, double b, double h) – with length &#39;l&#39;, breadth &#39;b&#39; and
height &#39;h&#39; as the arguments, returns the volume of a cuboid using the formula:&amp;nbsp;&lt;/b&gt;&lt;div&gt;&lt;b&gt;v = l × b × h&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;class Overload&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double volume(double r)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double vol = 4.0 / 3 * 22 / 7 * Math.pow(r, 3);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return vol;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double volume(double h, double r)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double v = 22.0 / 7 * Math.pow(r, 2) * h;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return v;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;double volume(double l, double b, double h)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double v = l * b * h;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return v;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Question 8:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a menu driven program to display the pattern as per user&#39;s choice: [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Pattern 1&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Pattern 2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ABCDE&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;B&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ABCD &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;LL&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ABC &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;UUU&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;AB &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;EEEE&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;A&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;For an incorrect option, an appropriate error message should be displayed.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;import java.util.Scanner;&lt;/div&gt;&lt;div&gt;class Pattern&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.print(&quot;1. Pattern 1&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;System.out.print(&quot;2. Pattern 2&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter your choice: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int ch = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;switch(ch)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; case 1:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter number of lines: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int n = sc.nextInt();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = n; i &amp;gt;= 1; i--)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 0; j &amp;lt; i; j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;System.out.print((char) (&#39;A&#39; + j));&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;case 2:&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter string: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String s = sc.next();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; char ch;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; s.length(); i++)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ch = s.charAt(i);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int j = 1; j &amp;lt;= (i + 1); j++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;System.out.print(ch);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; default:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Invalid choice&quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;&lt;b&gt;Question 9:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Write a program to accept name and total marks of N number of students in two single
subscripts array name[] and totalmarks[]. [15]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Calculate and print:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(i) The average of the total marks obtained by N number of students.
[average = (sum of total marks of all the students) / N]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;(ii) Deviation of each student‟s total marks with the average.
[deviation = total marks of a student – average]&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;import java.util.*;&lt;/div&gt;&lt;div&gt;class Student&amp;nbsp;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scanner(System.in);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter number of students: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int n = sc.nextInt();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;String[] name = new String[n];&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int[] totalmarks = new int[n];&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; n; i++)&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Student &quot; + (i + 1));&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter name: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;name[i] = sc.next();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(&quot;Enter marks: &quot;);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;totalmarks[i] = sc.nextInt();&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int sum = 0;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; n; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sum = sum + totalmarks[i];&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;double average = (double) sum / n;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Average is &quot; + average);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 0; i &amp;lt; n; i++)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double deviation = totalmarks[i] - average;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Deviation of &quot; + name[i] + &quot; is &quot; + deviation);&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/5083081999309265036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2018.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/5083081999309265036'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/5083081999309265036'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2018.html' title='ICSE Solved Paper, 2018'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpvEa65AFg32PFNuQk7ct4Nt5aILChlKRoR8dQGCorMtod1FPViLejGjifyozhgLtyvep71mH_AwlRBtqmG7YGDMHhrlGooyyiIevBeweje2usAWurKBALlXmntbc-D8zvkUuMHdp6rAj/s72-w68-h41-c/d.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-500788665917183128</id><published>2020-11-12T10:57:00.011+05:30</published><updated>2020-11-13T11:25:11.673+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ICSE Solved Paper"/><title type='text'>ICSE Solved Paper, 2019</title><content type='html'>&lt;h3 style=&quot;text-align: center;&quot;&gt;&amp;nbsp;ICSE Examination 2019 – 20 (Solution)&amp;nbsp;&lt;/h3&gt;&lt;div style=&quot;text-align: center;&quot;&gt;COMPUTER APPLICATION&amp;nbsp;&lt;br /&gt;Class – X&amp;nbsp;&lt;br /&gt;&lt;b&gt;Section – A (40 Marks)&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;i&gt;Attempt all questions
&lt;/i&gt;&lt;/div&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 1:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;a) Name any two basic principles of Object-oriented Programming.&amp;nbsp; &amp;nbsp; [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - Abstraction, Encapsulation, Inheritance and Polymorphism (Write any two).&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;b) Write a difference between unary and binary operator. [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - Unary operator works on single operand or variable. Binary operator works on two
operands or variables.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;c) Name the keyword which:&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(i) indicates that a method has no return type.&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(ii) makes the variable as a class variable. [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - (i) void
(ii) static&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;d) Write the memory capacity (storage size) of short and float data type in bytes. [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - short – 2 bytes (16 bits),&amp;nbsp; Float – 4 bytes (32 bits)&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;e) Identify and name the following tokens:&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(i) public&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(ii) &quot;a&quot;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(iii) = =&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(iv) { }&amp;nbsp; &amp;nbsp;[2]&lt;/b&gt;&amp;nbsp;&lt;br /&gt;Ans: - (i) Keyword or Reserved word&amp;nbsp;&lt;br /&gt;(ii) Character constant or literal&amp;nbsp;&lt;br /&gt;(iii) Relational or comparison operator&amp;nbsp;&lt;br /&gt;(iv) separator or punctuator&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 2:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(a) Differentiate between if else if and switch-case statement. [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - i) if else if allows all relational operators whereas, switch-case allows only = =
operator.&amp;nbsp;&lt;br /&gt;ii) if else if allows all data types whereas switch-case allows int, char and String.&amp;nbsp;&lt;br /&gt;iii) Range of values are checked in if else if whereas, one value is compared.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(b) Give the output of the following code:&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;String P = “20”, Q = “19”;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;int a = Ingeger.parseInt(P);&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;int b = Ingeger.parseInt(Q);&lt;br /&gt;&lt;/b&gt;&lt;b&gt;System.out.println(a+ “” +b); [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - 2019&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(c) What are the various types of errors in Java? [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - i) Syntax error / Compiler time error&amp;nbsp;&lt;br /&gt;ii) Logical error&amp;nbsp;&lt;br /&gt;iii) Runtime error&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(d) State the data type and value of res after the following is executed:&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;char ch = &quot;9&quot;;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;res = Character.isDigit(ch); [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - data type = boolean&amp;nbsp;&lt;br /&gt;res = true&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(e) What is the difference between the linear search and the binary search technique?
[2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - &lt;b&gt;&lt;i&gt;Linear Search&amp;nbsp;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;i) Can work on unsorted array.&lt;br /&gt;ii) Check each item.&lt;br /&gt;iii) Takes more time.&lt;br /&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Binary Search&amp;nbsp;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;i) Array must be sorted.&amp;nbsp;&amp;nbsp;&lt;br /&gt;ii) Does not check each item.&amp;nbsp;&amp;nbsp;&lt;br /&gt;iii) Takes less time&amp;nbsp;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 3:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(a) Write a Java expression for the following:&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;b&gt;[2]&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5E7CFo1F4xdUdHuwwT6-O5ujJpD8IA48BCDJAyYx4flv83auLZ4n7gaPjy0i9S6FiATWuXLgmiXTxi_7QURtwRcbOyal32XZiRTR-DeLsmfFfowvfCGMsKFbA2OTTelKRsv0AZBipbnR_/s172/b.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;49&quot; data-original-width=&quot;172&quot; height=&quot;24&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5E7CFo1F4xdUdHuwwT6-O5ujJpD8IA48BCDJAyYx4flv83auLZ4n7gaPjy0i9S6FiATWuXLgmiXTxi_7QURtwRcbOyal32XZiRTR-DeLsmfFfowvfCGMsKFbA2OTTelKRsv0AZBipbnR_/w86-h24/b.JPG&quot; width=&quot;86&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;Ans: - Math.abs(x*x + 2*x*y) or, Math.abs(Math.pow(x,2) + 2*x*y);&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(b) Write the return data type of the following functions: [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(i) startsWith()&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;(ii) random()&amp;nbsp;&lt;br /&gt;&lt;/b&gt;Ans: - startsWith() – Boolean&amp;nbsp;&lt;br /&gt;random() – double&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(c) If the value of basic = 1500, what will be the value of tax after following statement is
executed?
tax = basic &amp;gt; 1200 ? 200 : 100; [2]&lt;br /&gt;&lt;/b&gt;Ans: - tax = 200&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(d) Give the output of the following code and mention how many times the loops will
execute? [2]&lt;br /&gt;&lt;/b&gt;&lt;b&gt;int i;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;for(i = 5; i&amp;gt;=1; i – –)&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;{&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;if(i%2 = = 1)&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;continue;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;System.out.print(i+ “ ”);&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;}&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Ans:&lt;/b&gt; - Output: 4 2&amp;nbsp;&lt;br /&gt;5 times the loop will execute.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;(e) State a difference between call by value and call by reference. [2]&lt;/b&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Call
  by value&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Call
  by reference&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;i) It works with primitive data type. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;i) It works with reference (address) data type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;ii) The original value of variable remains unchanged.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;ii) The original value of variable changes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;iii) Operation is performed on duplicate value of variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;iii) Operation is performed on original values of variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;mso-yfti-irow: 4; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;iv) It is also called pure function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;iv) It is also called as impure function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;o:p&gt;&lt;b&gt;(f) Give the output of the following: [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;Math.sqrt(Math.max(9, 16))&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;Ans: - 4.0&amp;nbsp;&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(g) Write the output for the following: [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;String s1 = “phoenix”;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;String s2 = “island”;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;System.out.println(s1.substring(0).concat(s2.substring(2)));&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;System.out.println(s2.toUpperCase());&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;Ans: phoenixland&amp;nbsp;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;ISLAND&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(h) Evaluate the following expression if the value of x =2, y = 3 and z = 1. [2]&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;v = x+ – –z+ y++ +y;&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;Ans: v = 2 + 0 + 3 + 4 = 9&amp;nbsp;&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(i) String x[] = {“Artificial intelligence”, “IOT”, “Machine learning”, “Big data”}; [2]&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;Give the output of the following statements:&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(i) System.out.println(x[3]);&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(ii) System.out.println(x.length);&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;Ans: - i) Big Data&amp;nbsp;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;ii) 4&amp;nbsp;&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;(j) What is meant by a package? Give an example. [2]&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;Ans: - Package is a group of related classes. Example: java.io, java.util, etc.&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;o:p&gt;&lt;b&gt;Section – B (60 Marks)&amp;nbsp;&lt;br /&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;i&gt;Attempt any four questions&lt;/i&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;b&gt;&lt;u&gt;Question 4:&lt;/u&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Design a class name ShowRoom with the following description:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Instance variables / Data members:&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;String name - To store the name of the customer&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;long mobno - To store the mobile number of the customer&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;double cost - To store the cost of the items purchased&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;double dis - To store the discount amount&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;double amount - To store the amount to be paid after discount&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Members methods:&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;ShowRoom() - default constructor to initialize data members&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;void input() - To input customer name, mobile number, cost&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;void calculate() - To calculate discount on the cost of purchased items, based
on following criteria:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;&lt;tr&gt;
  &lt;td style=&quot;border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 342.9pt;&quot; valign=&quot;top&quot; width=&quot;457&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;Cost&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 135.9pt;&quot; valign=&quot;top&quot; width=&quot;181&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;Discount (in percentage)&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 342.9pt;&quot; valign=&quot;top&quot; width=&quot;457&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;Less than or equal to ₹ 10000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 135.9pt;&quot; valign=&quot;top&quot; width=&quot;181&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;5%&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 342.9pt;&quot; valign=&quot;top&quot; width=&quot;457&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;More than ₹ 10000 and less than or equal to ₹ 20000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 135.9pt;&quot; valign=&quot;top&quot; width=&quot;181&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;10%&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 342.9pt;&quot; valign=&quot;top&quot; width=&quot;457&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;More than ₹ 20000 and less than or equal to ₹ 35000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 135.9pt;&quot; valign=&quot;top&quot; width=&quot;181&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;15%&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 342.9pt;&quot; valign=&quot;top&quot; width=&quot;457&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;More than ₹ 35000&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 135.9pt;&quot; valign=&quot;top&quot; width=&quot;181&quot;&gt;
  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;&lt;b&gt;20%&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;void display() - To display customer name, mobile number, amount to be
paid after discount&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Write a main method to create an object of the class and call the above member
methods. [15]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Ans:import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;class ShowRoom&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp;String name;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;long mobno;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;double cost, dis, amount;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ShowRoom()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;name = “”;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;cost = 0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;mobno = 0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;dis = 0.0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;amount = 0.0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;void input()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Enter name, mobile no and cost”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;name = sc.next();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;mobno = sc.nextLong();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;cost = sc.nextDounle();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;void calculate()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;if(cost&amp;lt;=10000)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;dis=0.05*cost;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;else if(cost &amp;lt;= 20000)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;dis = 0.1 * cost;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;else if(cost &amp;lt;= 35000)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;dis = 0.15 * cost;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;else&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;dis = 0.2 * cost;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;void display()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Name is:”+name);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Mobile no is:”+mobno);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Amount is:”+amount);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ShowRoom ob = new ShowRoom();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ob.input();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ob.calculate();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ob.display();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 5:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Using the switch-case statement, write a menu driven program to do the following: [15]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;(a) To generate and print Letters from A to Z and their Unicode&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;u&gt;Letters&lt;/u&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;u&gt;Unicode&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; A&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;65&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; B&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;66&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; .&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; .&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; .&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Z&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; 90&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;(b) Display the following pattern using iteration (looping) statement:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;1&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;1 2&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;1 2 3&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;1 2 3 4&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;1 2 3 4 5&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Ans:&amp;nbsp;import java.util.*;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;class MenuDriven&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Scanner sc = new Scanner(System.in);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;int ch, x;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“1. Unicode of letters”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“2. Number pattern”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Enter your choice:”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;ch = sc.nextInt();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;switch(ch)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;case 1:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Letters” + “\t” + “Unicode”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;for(char c=‟A‟; c&amp;lt;= „Z‟; c++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;x=c;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(c+ “\t” + x);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;case 2:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;for(int i =1; i&amp;lt;=5; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;for(j = 1; j&amp;lt;=i; j++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print(j+ “\t”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;break;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;default:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;System.out.println(“Wrong choice!”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 6:&lt;/u&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Write a program to input integer elements in an array and sort them in ascending order
using the bubble sort technique. [15]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Ans: import java.util.*;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;class BubbleSort&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;public static void main()&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Scanner sc = new Scnanner(System.in);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int a[] = new int[15];&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(“Enter elements”);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for(int i = 0; i&amp;lt;15; i++) // OR i&amp;lt;a.length&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;a[i] = sc.nextInt();&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int temp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for(int i = 0; i&amp;lt;a.length – 1; i++) //OR i&amp;lt;14&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for(int j=0; j&amp;lt;(a.length – 1) – i; j++) // OR j&amp;lt;14 – i&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if(a[j] &amp;gt; a[j+1])&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;temp = a[j];&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;a[j] = a[j+1];&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;a[j+1] = temp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for(int k = 0; k&amp;lt;a.length; k++) // OR k&amp;lt;15&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(a[k]);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 7:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Design a class to overload a function series() as follows: [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;(a) void series(int x, int n) – To display the sum of the series given below:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;x&lt;sup&gt;1&lt;/sup&gt; + x&lt;sup&gt;2&lt;/sup&gt; + x&lt;sup&gt;3&lt;/sup&gt; + ....... x&lt;sup&gt;n&lt;/sup&gt;
terms&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;(b) void series(int p) – To display the following series:
0, 7, 26, 63 ...... p terms&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;(c) void series() – To display the sum of the series given below:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK2nbXXH3HQI1noTQykBWCNOjGXnkXa6HSme4A5MhChzXeJSmMLnjXiRJkNy6uGZKm7Xt1HpVVTO4UUwgKLF6gEwkzJD0EaZBmvyK0lVe9NvDZ2CZ-CZVQh47CycuzSNT2H3zKhjqT8j0n/s466/a.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;113&quot; data-original-width=&quot;466&quot; height=&quot;29&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK2nbXXH3HQI1noTQykBWCNOjGXnkXa6HSme4A5MhChzXeJSmMLnjXiRJkNy6uGZKm7Xt1HpVVTO4UUwgKLF6gEwkzJD0EaZBmvyK0lVe9NvDZ2CZ-CZVQh47CycuzSNT2H3zKhjqT8j0n/w117-h29/a.JPG&quot; width=&quot;117&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Ans:&amp;nbsp;class Overload&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;{&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void series (int x, int n)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;double sum = 0.0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;for (int i = 1; i&amp;lt;=n; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + Math.pow(x,i);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(sum);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void series (int p)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 1; i&amp;lt;=p; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.print((i*i*i) – 1 + “ ”);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;void series ()
&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;double sum = 0.0;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (int i = 2; i&amp;lt;=10; i++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sum = sum + (double)1/i;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(sum);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 8:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Write a program to input a sentence and convert it into uppercase and count and
display the total number of words starting with letter &#39;A&#39;.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;i&gt;&lt;b&gt;Example:&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Sample Input: ADVANCEMENT AND APPLICATION OF INFORMATION
TECHNOLOGY ARE EVER CHANGING&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Sample Output: Total number of words starting with letter &#39;A&#39; = 4. [15]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Ans: -&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;class Starting_Letter_A&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;public static void main(String s)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int c=0,i;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;char ch1,ch2;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int l=s.length();&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;s=s.toUpperCase();&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;s=&quot; &quot;+s;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;for(i=0; i&amp;lt;l; i++)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;ch1=s.charAt(i);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;ch2=s.charAt(i+1);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;if(ch1==&#39; &#39; &amp;amp;&amp;amp; ch2==&#39;A&#39;)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;c++;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(&quot;Number of of wrods started with letter A: &quot;+c);&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;u&gt;Question 9:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;A tech number has even number of digits. If the number is split in two equal halves, then
the square of sum of these halves is equal to the number itself. Write a program to
generate and print all four digits tech numbers. [15]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;i&gt;&lt;b&gt;Example:&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Consider the number 3025&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;Square of sum of the halves of 3025&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7jRZ4VTgLM9g6coGbdinh_59T4E_VodaZ94it9lITNiPQ20BBs2T-rewTrLF1tBpwp6HZdSMof96T4ZNg5OFg6v9ghNzvkyLwdmZ43MURe0ykJQyKK7LdfHYMF73d_RKoQi2WAOdnIMBx/s397/c.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;152&quot; data-original-width=&quot;397&quot; height=&quot;63&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7jRZ4VTgLM9g6coGbdinh_59T4E_VodaZ94it9lITNiPQ20BBs2T-rewTrLF1tBpwp6HZdSMof96T4ZNg5OFg6v9ghNzvkyLwdmZ43MURe0ykJQyKK7LdfHYMF73d_RKoQi2WAOdnIMBx/w164-h63/c.JPG&quot; width=&quot;164&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Ans:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;class TechNumber&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;public static void main()&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;int x, r, q, sq, s;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;for (x = 1000; x&amp;lt;=9999; x++)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;r=x%100;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;q=x/100;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;s=r+q;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;sq=s*s;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if(x = = sq)&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;System.out.println(x);&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/500788665917183128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2019.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/500788665917183128'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/500788665917183128'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/11/icse-solved-paper-2019.html' title='ICSE Solved Paper, 2019'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5E7CFo1F4xdUdHuwwT6-O5ujJpD8IA48BCDJAyYx4flv83auLZ4n7gaPjy0i9S6FiATWuXLgmiXTxi_7QURtwRcbOyal32XZiRTR-DeLsmfFfowvfCGMsKFbA2OTTelKRsv0AZBipbnR_/s72-w86-h24-c/b.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-903057086609567256</id><published>2020-07-12T20:05:00.003+05:30</published><updated>2020-11-12T13:28:32.564+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics of Computer"/><title type='text'>Computer Virus</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A &lt;span style=&quot;color: red;&quot;&gt;virus&lt;/span&gt; is a computer program that enters the computer system by attaching itself to another computer program, and spreads itself across the system. The full form of VIRUS is &lt;span style=&quot;color: red;&quot;&gt;V&lt;/span&gt;ital &lt;span style=&quot;color: red;&quot;&gt;I&lt;/span&gt;nformation &lt;span style=&quot;color: red;&quot;&gt;R&lt;/span&gt;esource &lt;span style=&quot;color: red;&quot;&gt;U&lt;/span&gt;nder &lt;span style=&quot;color: red;&quot;&gt;S&lt;/span&gt;eize.&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;What does a Computer virus do?&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A computer virus is capable of performing the following tasks:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) It can infect executable program files, such as word processors, spreadsheets, and the operating system program.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) It can infect disks by attaching itself to special programs in the hard disk, called boot records. )These are the programs, the computer uses to start up.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3) It can infect a file before it is attached to an email message or transferred to a disk, and thus spread from one computer to another.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;What are the in-capabilities of Computer virus?&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A computer virus is incapable of performing the following tasks:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) It cannot infect files on write protected discs (for example: CD-ROM )&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) It cannot infect computer hardware for examples: monitor and keyboard. It infects only software.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Hackers&lt;/span&gt; refers to the people, who use their skills to enter into computer systems without permission. Hackers are computer enthusiasts who break into secure systems to gain knowledge about them and possibly use this knowledge to play pranks.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A &lt;span style=&quot;color: red;&quot;&gt;Cracker&lt;/span&gt; is malicious programmer, who gains unauthorised access to computer systems for the purpose of stealing, altering or corrupting information. Crackers often destroy confidential or crucial data of the systems they invade. They break the security of application software and create destructive programs like viruses.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img height=&quot;226&quot; src=&quot;https://tr3.cbsistatic.com/hub/i/r/2016/05/16/4602734e-b650-4594-99fb-c50b3c480cd1/resize/1200x/d2f66faf04d8d33eff658f536f4f3f1d/hackerh.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Hackers&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;How does a Computer virus spread?&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Computer viruses spread from one computer to another by transfer of infected data through emails, pen drives, or other sources.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/903057086609567256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/computer-virus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/903057086609567256'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/903057086609567256'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/computer-virus.html' title='Computer Virus'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-8777069673592427834</id><published>2020-07-10T22:58:00.000+05:30</published><updated>2020-07-13T10:12:03.295+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><title type='text'>Charts is Excel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;color: magenta;&quot;&gt;Chart&lt;/b&gt;&amp;nbsp;in Excel is a pictorial representation of data. It allows us to present data entered into the worksheet in a visual format using a variety of graph types.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Types of Charts&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZy9iXyw0QhxwojiVa-hzzHr_v7-xeAbaBWmTVT9KD6xzZhrDzeT6-1m_VV1f45NpTRPe3QQwxPnqkqPu3u43XpuqhdF9l5vFvcK0-pIpzluyVJHqY2nN2R_EiSjnQKZljSNpJqC-Wr4c/s1600/chart.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZy9iXyw0QhxwojiVa-hzzHr_v7-xeAbaBWmTVT9KD6xzZhrDzeT6-1m_VV1f45NpTRPe3QQwxPnqkqPu3u43XpuqhdF9l5vFvcK0-pIpzluyVJHqY2nN2R_EiSjnQKZljSNpJqC-Wr4c/s640/chart.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;
How to create a chart?&lt;/span&gt;&lt;/h3&gt;
&lt;hr /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1. Select the cells we want to insert into the chart, including the column titles and row labels.&lt;br /&gt;
2. Click the &lt;b&gt;Insert&lt;/b&gt;&amp;nbsp;tab.&lt;br /&gt;
3. In the &lt;b&gt;Charts&lt;/b&gt;&amp;nbsp;group, select the desired charts category.&lt;br /&gt;
4. Select the desired &lt;b&gt;Chart type&lt;/b&gt;&amp;nbsp;from the drop-down menu.&lt;br /&gt;
5. The chart will appear in the worksheet.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Different parts of an Excel chart&lt;/span&gt;&lt;/h3&gt;
&lt;hr style=&quot;text-align: left;&quot; /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Chart area&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Everything inside the chart window, including all parts of the chart (labels, axes, data markers, tick marks, and other elements listed here).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Plot area&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The area where Excel plots our data, including the axes and all markers that represent data points.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Data series&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A group of related values, such as all the values in a single row in the chart.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Axis&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A line that serves as a major reference for plotting data in a chart. In two-dimensional charts there are two axes - the &lt;b&gt;x-axis&lt;/b&gt;&amp;nbsp;(&lt;i&gt;horizontal / category&lt;/i&gt;) and the &lt;b&gt;y-axis&lt;/b&gt;&amp;nbsp;(&lt;i&gt;vertical&lt;/i&gt;&amp;nbsp;/ &lt;i&gt;value&lt;/i&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Tick mark&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A small line intersecting an axis. A tick mark indicates a category, scale or chart data series.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Gridlines&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Gridlines are optional lines extending from the tick marks across the plot area, thus making it easier to view the data values representing by the tick marks.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Chart text&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A label or title that you add to the chart.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Legend&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A legend is a key that identifies patterns, colors or symbols associate with the markers of a chart data series.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Advantages of Chart&lt;/span&gt;&lt;/h3&gt;
&lt;hr /&gt;
1) It helps US to analyze and evaluate the worksheet conveniently.&lt;br /&gt;
2) It also holds the interest of the audience if the data is present in graphical or pictorial form, which is easier to read and understand.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Embedded chart&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
It is a chart object that is placed on a worksheet and saved with that worksheet when the workbook is saved.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Chart Sheet&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
It is a sheet in a workbook that contains only a chart. it is beneficial when we want to view a chart separately from workbook data.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/8777069673592427834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/charts-is-excel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/8777069673592427834'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/8777069673592427834'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/charts-is-excel.html' title='Charts is Excel'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZy9iXyw0QhxwojiVa-hzzHr_v7-xeAbaBWmTVT9KD6xzZhrDzeT6-1m_VV1f45NpTRPe3QQwxPnqkqPu3u43XpuqhdF9l5vFvcK0-pIpzluyVJHqY2nN2R_EiSjnQKZljSNpJqC-Wr4c/s72-c/chart.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-7969801772817026971</id><published>2020-07-10T12:50:00.001+05:30</published><updated>2020-07-10T12:50:12.446+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Networking"/><title type='text'>Modes of Communication | Simplex, Half-Duplex and Full Duplex</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In a network system, when two computers transferring data (one is called sender and another one is called receiver), then this types of modes of communication is classified into following three types:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Simplex Mode&lt;hr /&gt;
&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
In Simplex mode communication, data can be transmitted in one direction only. In this case, any computer which is connected with the network can only send data as a sender and in opposite side the receiver computer can only receive the data. For example, &lt;b&gt;Keyboard&lt;/b&gt;, &lt;b&gt;Monitor&lt;/b&gt;, &lt;b&gt;TV&lt;/b&gt;, &lt;b&gt;Radio &lt;/b&gt;telecast, etc.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicsuARX9VB0_qgp7krHnjOwZze8VWmkAmedw_DB4UvJoV3gdUN3uVQUNdtk65Olp4AAs8ToDBlPQUHF0C7CX88bt4KBhNuKCfNxhZ0O1uZuEqBfghaO75vmETRgteZRpu2wjVEvVMO2KrU/s1600/simplex.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;306&quot; data-original-width=&quot;1194&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicsuARX9VB0_qgp7krHnjOwZze8VWmkAmedw_DB4UvJoV3gdUN3uVQUNdtk65Olp4AAs8ToDBlPQUHF0C7CX88bt4KBhNuKCfNxhZ0O1uZuEqBfghaO75vmETRgteZRpu2wjVEvVMO2KrU/s400/simplex.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Simplex Mode&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Half-Duplex Mode&lt;hr /&gt;
&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
In Full Duplex mode any computer in the network can send data to any other computer in the network. But not simultaneously. When one computer acts as sender then other computer acts as receiver and vice-versa. Here one channel is used for both actions i.e., sending and receiving data. For example, Conversation through &lt;b&gt;Walkie-Talkies&lt;/b&gt;.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiuLTJUQ_zByBWQNXzhTbvUEeeztqxThF5NdQODHna3izqTCV6L5gV9yZoi4JMT3xyeE8X93er7R5DMehhjqHRvtmW4hg1obwtYmyk5OBhzuTmSKa1vGoaa9lNxAV_fqCmkHUU5q_LaGCl/s1600/Half-duplex.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;306&quot; data-original-width=&quot;1194&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiuLTJUQ_zByBWQNXzhTbvUEeeztqxThF5NdQODHna3izqTCV6L5gV9yZoi4JMT3xyeE8X93er7R5DMehhjqHRvtmW4hg1obwtYmyk5OBhzuTmSKa1vGoaa9lNxAV_fqCmkHUU5q_LaGCl/s400/Half-duplex.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Half Duplex Mode&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Full Duplex Mode&lt;hr /&gt;
&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
Full Duplex mode is also two way communication, but here data can transmit both the directions simultaneously. Which means, two computers in a network can send and receive data at the same time. Here two channels are used, one for sending and another one for receiving. For example, &lt;b&gt;Telephone line, &lt;/b&gt;where we can talk and listen at the same time.&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCQvqEHdNSXvDSdCizyR48HDXV0tir1zRaQqRPLaSokcYrpzNaeRDjIvoaOFBDgQySGw0oLI0OI0KuIZHDYgwFw1MZQKQh3kiMU7SjNTCsZOckSzj1i2X9TA_E2mX-Cum9FnH33Lc-Wt8s/s1600/full-duplex.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;306&quot; data-original-width=&quot;1194&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCQvqEHdNSXvDSdCizyR48HDXV0tir1zRaQqRPLaSokcYrpzNaeRDjIvoaOFBDgQySGw0oLI0OI0KuIZHDYgwFw1MZQKQh3kiMU7SjNTCsZOckSzj1i2X9TA_E2mX-Cum9FnH33Lc-Wt8s/s400/full-duplex.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Full Duplex Mode&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/7969801772817026971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/modes-of-communication-simplex-half.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7969801772817026971'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7969801772817026971'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/modes-of-communication-simplex-half.html' title='Modes of Communication | Simplex, Half-Duplex and Full Duplex'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicsuARX9VB0_qgp7krHnjOwZze8VWmkAmedw_DB4UvJoV3gdUN3uVQUNdtk65Olp4AAs8ToDBlPQUHF0C7CX88bt4KBhNuKCfNxhZ0O1uZuEqBfghaO75vmETRgteZRpu2wjVEvVMO2KrU/s72-c/simplex.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-714646204182798650</id><published>2020-07-06T17:49:00.000+05:30</published><updated>2020-07-10T13:44:47.005+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Word"/><title type='text'>Mail Merge</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Mail Merge&lt;/span&gt;&lt;/b&gt; is the process of connecting main document and the data source. We can send any letter or invitation to a number of people very quickly using Mail Merge. It is very easy to proofread a single letter which is then used as the template for many others.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Advantages&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) One standard letter can be written and sent to all customers without having to manually add each name and address.&lt;br /&gt;
2) The letter can personalized - it looks as though the letter has been written to the individual person.&lt;br /&gt;
3) It&#39;s a very fast way to produce hundreds of personalized letters.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;Disadvantages&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Letters can lack the personal touch.&lt;br /&gt;
2) The database that provides the information for the mail merge letter must be kept up to date if ti is going to be useful.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;What are the basic components of Mail Merge?&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Main Document&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Main document can be used for storing the information that remains same for different letters.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Data Source&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
The name and address that changes in every letter is inserted in the data source that contains variable fields which are later on inserted in the merged document.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Merged Document&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
When the main document is merged with the data source created a third document, called as the merged document that is said to be a combination of main document and the data source.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: justify; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;color: red;&quot;&gt;The steps followed for using Mail Merge?&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
1) Create the Main Document&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) Create the Data Source&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3) Merge the Main Document with Data Source&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Step 1: Create Main Document&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;1. Click on &lt;/span&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Mailings&lt;/b&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;tab.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2. Under &lt;b&gt;Mail Merge &lt;/b&gt;group click on &lt;b&gt;Start Mail Merge&lt;/b&gt;&amp;nbsp;button and select &lt;b&gt;Letters&lt;/b&gt;&amp;nbsp;option.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3. Then type your desired letter and Save it.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVKvlqLDeOmerAda90Htf62KNCWDcjHxPKQwaEVhnoxgSnydEjCk2oUlLK9cfi3_h5awGKVmhYT3WsseF08abZqO8Hd47PypqcaTWH93m0KEGyOpFUeVP9EUfH82MxWNuOr1HRHF-jhOwp/s1600/mail+merge.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;663&quot; data-original-width=&quot;1050&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVKvlqLDeOmerAda90Htf62KNCWDcjHxPKQwaEVhnoxgSnydEjCk2oUlLK9cfi3_h5awGKVmhYT3WsseF08abZqO8Hd47PypqcaTWH93m0KEGyOpFUeVP9EUfH82MxWNuOr1HRHF-jhOwp/s400/mail+merge.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Creation of Main Document&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Step 2: Create Data Source&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;1. Under &lt;b&gt;Mailings&lt;/b&gt; tab, click on&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Start Mail Merge&lt;/b&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;button and then select &lt;b&gt;Select Recipients&lt;/b&gt;&amp;nbsp;option.&lt;/span&gt;&lt;span style=&quot;font-style: italic; font-weight: 700;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;2. Select &lt;b&gt;Type New List&lt;/b&gt;&amp;nbsp;option. Then &lt;b&gt;New Address List&lt;/b&gt;&amp;nbsp;dialog box will appear.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;3. Click on &lt;b&gt;Customized Columns &lt;/b&gt;button and then &lt;b&gt;Customize Address List &lt;/b&gt;dialog box will appear.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;4. Keep the desired field from here and delete unnecessary field (Delete --&amp;gt; Yes). If you want to add new field from your own, then click &lt;b&gt;Add. &lt;/b&gt;Then click on &lt;b&gt;OK&lt;/b&gt;&amp;nbsp;button.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;5. Now enter the required data in each field.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj87T5UWGGHFWa9ORG4BHZXuBgo49ny_G7SYTc4puk6z-CNIqHIzk97CCnwEKnaiS0YrTjpuByjxZOLNQsGMOIOAw7cME8Jr16Uzw1e-NF_8HC-jf7HRsaHvv_yQPLS-9bg-wbKB9sDAJnC/s1600/mail+merge+2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;834&quot; data-original-width=&quot;1566&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj87T5UWGGHFWa9ORG4BHZXuBgo49ny_G7SYTc4puk6z-CNIqHIzk97CCnwEKnaiS0YrTjpuByjxZOLNQsGMOIOAw7cME8Jr16Uzw1e-NF_8HC-jf7HRsaHvv_yQPLS-9bg-wbKB9sDAJnC/s400/mail+merge+2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Creation of Data Source&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Step 3: Merge Document&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;hr style=&quot;text-align: justify;&quot; /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;1. Keep the cursor in the desired position of the &lt;b&gt;Main Document&lt;/b&gt;. Then click on &lt;b&gt;Insert Merge Field&lt;/b&gt;&amp;nbsp;button of &lt;b&gt;Write &amp;amp; Insert Fields &lt;/b&gt;groups.&lt;/span&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;2. Click on each &lt;b&gt;Field&amp;nbsp;&lt;/b&gt;name to &lt;b&gt;Insert &lt;/b&gt;them into the document. Then Save it to update the document.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;3. Click on &lt;b&gt;Finish &amp;amp; Merge &lt;/b&gt;button under &lt;b&gt;Finish &lt;/b&gt;group&amp;nbsp; and the select &lt;b&gt;Edit Individual Documents.&lt;/b&gt;&amp;nbsp;So, &lt;b&gt;Merge To New Documents&lt;/b&gt;&amp;nbsp;dialog box will appear.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
4. Select on &lt;b&gt;All &lt;/b&gt;and then&amp;nbsp;Click on &lt;b&gt;OK&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Mail Merge Process&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/3XGLEKpJaRU&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/714646204182798650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/mail-merge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/714646204182798650'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/714646204182798650'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/mail-merge.html' title='Mail Merge'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVKvlqLDeOmerAda90Htf62KNCWDcjHxPKQwaEVhnoxgSnydEjCk2oUlLK9cfi3_h5awGKVmhYT3WsseF08abZqO8Hd47PypqcaTWH93m0KEGyOpFUeVP9EUfH82MxWNuOr1HRHF-jhOwp/s72-c/mail+merge.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-8720580881838206302</id><published>2020-07-01T23:36:00.003+05:30</published><updated>2020-07-04T12:59:18.442+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Networking"/><title type='text'>Analog and Digital Communication | Communication Signal</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The main feature or motive in data communication system is transferring &lt;b&gt;data &lt;/b&gt;in between two&amp;nbsp; or&amp;nbsp; more devices. Data can be of different types - audio, video, text, graphics, etc. In computer network, data is sent in the form of electrical signal. Electrical signal is of two types - Analog signal and Digital signal.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Analog Signal&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We commonly used Analog signal in our daily life. It mainly used for voice communication (e.g., telephonic conversation). It is mainly consists in the combination of Electromagnetic Wave. Electromagnetic Waveform mainly measures with the help of the following three features -&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Amplitude&lt;/i&gt;:&lt;/span&gt;&amp;nbsp;Amplitude is used to measure the power or the range of the signal. As the height of the wave is high, the signal will more powerful.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Frequency&lt;/i&gt;:&lt;/span&gt;&amp;nbsp;Frequency is the ability that signal creates a total number of wave form per second.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Phase&lt;/i&gt;:&lt;/span&gt;&amp;nbsp;The phase involves the relationship between the position of the amplitude crests and troughs of two wave forms. Phase can be measured in distance, time or degrees.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Advantages&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Analog signal is very useful for sending audio and video data.&lt;br /&gt;
2) Analog signal can be received from any part of the world.&lt;br /&gt;
3) Analog signal is not being effected by noise of other signals.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTMQbXt_Fzwe8LAHBkWjh_Yf79RG-9aUiUbhWMvcDT3jwPdz9JsTtt4CjShB7lC8s5f-kL_8IDDI2jNaD_hiWzbjrn_pJqGMd5PWN6BIyJEsBEKqNv9PyyFa2xcz6K4X3KYNZA4jUr48uP/s1600/analog.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;253&quot; data-original-width=&quot;605&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTMQbXt_Fzwe8LAHBkWjh_Yf79RG-9aUiUbhWMvcDT3jwPdz9JsTtt4CjShB7lC8s5f-kL_8IDDI2jNaD_hiWzbjrn_pJqGMd5PWN6BIyJEsBEKqNv9PyyFa2xcz6K4X3KYNZA4jUr48uP/s400/analog.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Analog Signal&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;Digital Signal&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Digital signal is mainly used to communicate between computers. Digital signal is consists of two Binary Digits 0 and 1. Every digital signals is sent in the form of 0 and 1.&lt;br /&gt;
Digital signal can be classified with two different types - &lt;b&gt;current state encoding&lt;/b&gt;&amp;nbsp;and&amp;nbsp;&lt;b&gt;&amp;nbsp;state transition encoding&lt;/b&gt;.&lt;br /&gt;
In&amp;nbsp;&lt;b&gt;current state encoding, &lt;/b&gt;the signal value 0 or 1 is decided on the basis of flow of voltage on every moment.&lt;br /&gt;
In&amp;nbsp;&lt;b&gt;state transition encoding&lt;/b&gt;, the transformation of high voltage to low voltage we assume as 1 and the transformation of low voltage to high voltage we assume as 0.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;Advantages&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Digital circuits are cheaper and easy to design as compare to Analog signal.&lt;br /&gt;
2) Digital circuits are more reliable.&lt;br /&gt;
3) Digital signal has a high level of accuracy.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjivDs5lVzf-FW7EFHkDBK6EwrtQExYT2Z2OpHRJDoVyN1x_MZDb1WkZLs46E8Hgrtb20LwZAqjfGs6JeGXr-Tpm3lWW8svGLic05D2mbngFZOEsJYHESknpZOZQJDqMrtKYvAQrjjTlqjl/s1600/digital+signal.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;215&quot; data-original-width=&quot;605&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjivDs5lVzf-FW7EFHkDBK6EwrtQExYT2Z2OpHRJDoVyN1x_MZDb1WkZLs46E8Hgrtb20LwZAqjfGs6JeGXr-Tpm3lWW8svGLic05D2mbngFZOEsJYHESknpZOZQJDqMrtKYvAQrjjTlqjl/s400/digital+signal.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Digital Signal&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Differences between Analog and Digital Signal&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;b&gt;Analog
  Signal&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;b&gt;Digital
  Signal&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
1) It is suitable for sending audio and video data.&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
1) It is suitable for sending Text data.&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
2) It consists with electromagnetic wave.&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
It consists with binary digits 0 and 1.&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
3) It is costlier than Digital Signal.&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 239.4pt;&quot; valign=&quot;top&quot; width=&quot;319&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
3) It is cheaper than Analog signal.&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/8720580881838206302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/analog-and-digital-communication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/8720580881838206302'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/8720580881838206302'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/07/analog-and-digital-communication.html' title='Analog and Digital Communication | Communication Signal'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTMQbXt_Fzwe8LAHBkWjh_Yf79RG-9aUiUbhWMvcDT3jwPdz9JsTtt4CjShB7lC8s5f-kL_8IDDI2jNaD_hiWzbjrn_pJqGMd5PWN6BIyJEsBEKqNv9PyyFa2xcz6K4X3KYNZA4jUr48uP/s72-c/analog.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3587663827073257725</id><published>2020-06-26T17:49:00.000+05:30</published><updated>2020-06-29T20:48:41.239+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Word"/><title type='text'>Tabular Representation | MS Word</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Table&lt;/b&gt;&amp;nbsp;&lt;/span&gt;is a grid of cells where we arrange data in the form of row and column.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwNlbWKbjF3kotagknzlSLlHUEoASwP-mjJVuNwoalpj9ZVQ5sXJn7Kxj1hYnh8MoJYV5cSKshamPTyEUbZf4atCKPIUKmF-aMOH1qK5VHbH7u4yQlXlIx10vCFcuJk0lcJ4B8DgGCyFwe/s1600/table.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwNlbWKbjF3kotagknzlSLlHUEoASwP-mjJVuNwoalpj9ZVQ5sXJn7Kxj1hYnh8MoJYV5cSKshamPTyEUbZf4atCKPIUKmF-aMOH1qK5VHbH7u4yQlXlIx10vCFcuJk0lcJ4B8DgGCyFwe/s400/table.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Click on the image to see in original size&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;How to create a table in a document?&lt;/span&gt;&lt;/h2&gt;
The steps to create a table in a document are given below:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 1&lt;/i&gt;:&lt;/span&gt; Click on &lt;b&gt;Insert&lt;/b&gt;&amp;nbsp;tab and select &lt;b&gt;Insert Table&lt;/b&gt;&amp;nbsp;button under &lt;b&gt;Table &lt;/b&gt;option of the&amp;nbsp;&lt;b&gt;Table &lt;/b&gt;command group.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 2&lt;/i&gt;:&lt;/span&gt; After appearing &lt;b&gt;Insert Table&lt;/b&gt;&amp;nbsp;dialog box, enter the number of column and row in the &lt;b&gt;Number of columns &lt;/b&gt;box and&amp;nbsp;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;Number of rows&amp;nbsp;&lt;/b&gt;box respectively.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 3&lt;/i&gt;:&lt;/span&gt;&amp;nbsp;Click on OK button.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We can also create table by dragging and selecting Column and Row from Table option of the Insert Ribbon.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Insert Row or Column in a Table&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
To insert a row or column -&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1. Click on the desired cell and then right click on it.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2. Move the cursor on the &lt;b&gt;Insert&lt;/b&gt;&amp;nbsp;option.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3. Then, if you want to insert column then select either select &lt;b&gt;Insert Column to the Left&lt;/b&gt;&amp;nbsp;or &lt;b&gt;Insert Column to the Right &lt;/b&gt;as your requirement, or if you want to insert row, then select either &lt;b&gt;Insert Rows Above &lt;/b&gt;or &lt;b&gt;Insert Rows Below &lt;/b&gt;according to your requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Delete Row or Column in a Table&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
To insert a row or column -&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1. Click on the desired row or column which one you want to delete.&lt;br /&gt;
2. Right click on the row or column.&lt;br /&gt;
3. Select either &lt;b&gt;Delete columns&lt;/b&gt;&amp;nbsp;or &lt;b&gt;Delete rows&lt;/b&gt;&amp;nbsp;as you want to delete.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Merge cell and Split cell&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Using &lt;b&gt;Merge cell&lt;/b&gt; option you can combine or join together two or more table cells located into same column or same row into a single cell.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Using &lt;b&gt;Split cell &lt;/b&gt;option you can separate or divide a single cell into multiple cells, i.e. you can insert any number of row or column into a single cell.&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSGy_D8buVoYz2LS7U0EoYAzew3rClYRYz8BUy_Dc-xP4m53nX7iCGpYoX7aNRjc4OfsVc7YmrwQZBhYHAEu6AtLogOAEnJPGBQ7glldQzKXdXMJV8LiiIYe4xSdRG9-vwITKBeIzU7WWb/s1600/merge+and+split+cell.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSGy_D8buVoYz2LS7U0EoYAzew3rClYRYz8BUy_Dc-xP4m53nX7iCGpYoX7aNRjc4OfsVc7YmrwQZBhYHAEu6AtLogOAEnJPGBQ7glldQzKXdXMJV8LiiIYe4xSdRG9-vwITKBeIzU7WWb/s400/merge+and+split+cell.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Click on the image to see in original size&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Table Creation in MS Word | Merge Cells and Split Cells&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; 
gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/o_USPfOW_94&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3587663827073257725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/tabular-representation-ms-word.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3587663827073257725'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3587663827073257725'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/tabular-representation-ms-word.html' title='Tabular Representation | MS Word'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwNlbWKbjF3kotagknzlSLlHUEoASwP-mjJVuNwoalpj9ZVQ5sXJn7Kxj1hYnh8MoJYV5cSKshamPTyEUbZf4atCKPIUKmF-aMOH1qK5VHbH7u4yQlXlIx10vCFcuJk0lcJ4B8DgGCyFwe/s72-c/table.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-4217535362518064772</id><published>2020-06-25T00:11:00.000+05:30</published><updated>2020-07-10T19:35:55.550+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><title type='text'>MS Excel Functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;function &lt;/span&gt;&lt;/b&gt;is a predefined formula that performs calculations using specific values in a particular order. Excel has many built-in functions. In another side, a &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;formula &lt;/span&gt;&lt;/b&gt;is an expression which calculates the value of a cell. Every Excel formula starts with &lt;b&gt;equal to &lt;/b&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;(=) &lt;/span&gt;symbol.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmnQRM38lrc3VYDWdbKxD521JH7O_iLA798aKdWwKAsx6AQj3tfhRVjYjAneRKTLuqq0qwFT0Vyu_8ChNKAsft_VXEdRPTxOfwicl8RZMW8sdCKCd7joai45nTGPDypgsNjgNyUA3nLtP9/s1600/sum+excel.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;860&quot; data-original-width=&quot;1559&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmnQRM38lrc3VYDWdbKxD521JH7O_iLA798aKdWwKAsx6AQj3tfhRVjYjAneRKTLuqq0qwFT0Vyu_8ChNKAsft_VXEdRPTxOfwicl8RZMW8sdCKCd7joai45nTGPDypgsNjgNyUA3nLtP9/s400/sum+excel.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Using of SUM function in Excel&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Uses of some Excel functions&lt;hr /&gt;
&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUM()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
SUM() function is used to find the sum or addition value in a particular range of cells of an Excel worksheet.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=SUM(A1 : A5)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, the addition value or summation value will return from the cell A1 to A5.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;SUMIF()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
SUMIF() function is used to find the sum or addition value in a particular range of cells of an Excel worksheet, but according to some criteria i.e., on the the basis of user given condition.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=SUMIF(A1 : A5, &quot;&amp;gt;50&quot;)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, from the range of cells A1 to A5 will be added but only those numbers, which are more than 50.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;COUNT()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
COUNT() function is used to find the total number of numbers are present in a particular range of cells of an Excel Worksheet.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=COUNT(A1 : A5)&lt;br /&gt;
Here, how many total numbers are present in the range of cells A1 to A5 will return.&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;MAX()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
MAX() function returns the maximum number from a given range of cells.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=MAX(A1 : A5)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, the maximum number will return from the range of cells A1 to A5.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;MIN()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
MIN() function returns the minimum number from a given range of cells.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=MAX(A1 : A5)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, the minimum number will return from the range of cells A1 to A5.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;AVERAGE()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
AVERAGE() function is used to find the average in a given range of cells.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=AVERAGE(A1 : A5)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, the average will return from the range of cells A1 to A5.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;PRODUCT()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
PRODUCT() function is used to find the multiplication value or product value in a given range of cells.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
=PRODUCT(A1 : A5)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, the multiplication value will return from the range of cells A1 to A5.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Excel functions | Part - 1&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; 
gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/xye4aRvctgE&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;TODAY()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
TODAY()&amp;nbsp;function is used to return system current date.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
=TODAY()&lt;br /&gt;
Here, the system current date will be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;NOW()&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
NOW() returns the system current data and time in a particular cell.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
=NOW()&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Here, the system current date and time will display in any cell, in
which you will apply this formula.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;IF()&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
As IF() function is a logical function, it returns logical values i.e.,
either True value or False value on the basis of user given condition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
=IF(A5&amp;gt;=50,”Good”,”Bad”)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Here, If the value of A5 is more than or equal to 50, then &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Good&lt;/b&gt; will display, otherwise &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;Bad&lt;/b&gt; will display.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;PMT()&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
PMT() is a type of financial function in MS Excel. This function calculates the payment for a loan based on constant payments and a constant interest rate.&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Cqraj_K0efVmdaBcFsbqykZdMrztZjRtSKRRlMDcvj2dREYdH2iszFkQGPT9Nt3iQHlEC-odmMwC5i2SlwPsw4RTNH3ufjH0AFGwG9WS2xZBlkaCeIDBekYeq_LHB-UBm_zJCoPbGWFf/s1600/PMT.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Cqraj_K0efVmdaBcFsbqykZdMrztZjRtSKRRlMDcvj2dREYdH2iszFkQGPT9Nt3iQHlEC-odmMwC5i2SlwPsw4RTNH3ufjH0AFGwG9WS2xZBlkaCeIDBekYeq_LHB-UBm_zJCoPbGWFf/s400/PMT.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The Calculation of PMT() function&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-align: justify;&quot;&gt;
On the above example, to find the Payable Amount we have used the following formula.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-align: justify;&quot;&gt;
=PMT(B2/12, B3, B1)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Excel Functions | Part - 2&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/zIQr4aT78tQ&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;AutoSum (Σ)&lt;/span&gt;&lt;hr /&gt;
&lt;/b&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The AutoSum command allows us to automatically return the results for range of cells for common function like SUM.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;&lt;i&gt;How to use AutoSum(&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;Σ&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;)&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
1. Select the cell that the sum will appear in that is outside the cluster of cells whose values will be added.&lt;br /&gt;
2. Click the AutoSum button (Greek letter sigma&amp;nbsp;Σ) on the Formula tab.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
3. Highlight the group of cells that will be summed.&lt;br /&gt;
4. Press the ENTER key on the keyboard or click the tick (✔) mark button on the Formula bar.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/4217535362518064772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/ms-excel-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/4217535362518064772'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/4217535362518064772'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/ms-excel-functions.html' title='MS Excel Functions'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmnQRM38lrc3VYDWdbKxD521JH7O_iLA798aKdWwKAsx6AQj3tfhRVjYjAneRKTLuqq0qwFT0Vyu_8ChNKAsft_VXEdRPTxOfwicl8RZMW8sdCKCd7joai45nTGPDypgsNjgNyUA3nLtP9/s72-c/sum+excel.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-7052698428541291753</id><published>2020-06-22T21:58:00.001+05:30</published><updated>2020-06-25T00:14:04.501+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Word"/><title type='text'>Creating, Editing and Saving a document</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;How to save a document?&lt;/span&gt;&lt;/h2&gt;
&lt;i&gt;To save a document, follow the steps:&lt;/i&gt;&lt;br /&gt;
&lt;b style=&quot;font-style: italic;&quot;&gt;Step 1&lt;/b&gt;: Click on Save or &lt;b&gt;Save&lt;/b&gt; or &lt;b&gt;Save As&lt;/b&gt;&amp;nbsp;option from file or press &lt;b&gt;Ctrl + S&lt;/b&gt;. Then Save As dialog box will appear.&lt;br /&gt;
&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 2&lt;/i&gt;: Choose the location from the left side of the box, where we want to save.&lt;br /&gt;
&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 3&lt;/i&gt;: Give the desired file name in the &lt;b&gt;File &lt;u&gt;n&lt;/u&gt;ame: &lt;/b&gt;text box.&lt;br /&gt;
&lt;i style=&quot;font-weight: bold;&quot;&gt;Step 4&lt;/i&gt;: Click one Save button.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJZ2v9Hg9Jdm9gdJVkcajtiu9gUFPGpQlFHvnoKx-MtB6NV2PeskjRcbk9KJV6GW5GRVo4v1AiAzXVPqHGzXMI7LKMambThL6AJquIoZOw6CuZtOS8YZiFsAUunDwcsaPhbhp-ajfjaVQ/s1600/save+as.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;526&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJZ2v9Hg9Jdm9gdJVkcajtiu9gUFPGpQlFHvnoKx-MtB6NV2PeskjRcbk9KJV6GW5GRVo4v1AiAzXVPqHGzXMI7LKMambThL6AJquIoZOw6CuZtOS8YZiFsAUunDwcsaPhbhp-ajfjaVQ/s400/save+as.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Save As dialog box&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Differences between Save and Save As&lt;/span&gt;&lt;/h2&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Save helps us to lastly preserved file with the latest content, while Save As helps to store a new file or to store an existing file to a new location with the same name or a different name.&lt;/li&gt;
&lt;li&gt;The&amp;nbsp; short-cut key of Save is &lt;b&gt;Ctrl + S&lt;/b&gt;, while the short-cut key of Save As is &lt;b&gt;F12&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;color: red;&quot;&gt;Differences between Cut and Copy&lt;/span&gt;&lt;/h2&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;The &lt;b&gt;Cut &lt;/b&gt;command removes the selected data from its original position, while &lt;b&gt;Copy&lt;/b&gt;&amp;nbsp;command creates a duplicate of the original.&lt;/li&gt;
&lt;li&gt;The short-cut key of Cut is &lt;b&gt;Ctrl+X&lt;/b&gt;&amp;nbsp;and the short-cut key of Copy is &lt;b&gt;Ctrl+C&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2&gt;
&lt;span style=&quot;color: red;&quot;&gt;Page Orientation&lt;/span&gt;&lt;/h2&gt;
There are two following two types of page orientation supports in MS Word:&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Portrait:&lt;/b&gt;&amp;nbsp;It is the vertical align of any page. It is taller and less wider than Landscape.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Landscape&lt;/b&gt;: It is horizontal align of any page. It is more wider and lesser in height than Portrait.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2&gt;
&lt;span style=&quot;color: red;&quot;&gt;Alt + F4 vs Ctrl + F4&lt;/span&gt;&lt;/h2&gt;
By pressing &lt;b&gt;Alt + F4&lt;/b&gt;, the current Word Document will be closed, but Word window will remain open. But, by pressing &lt;b&gt;Ctrl + F4&lt;/b&gt;, the Word window will be closed.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/7052698428541291753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/creating-editing-and-saving-document.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7052698428541291753'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7052698428541291753'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/creating-editing-and-saving-document.html' title='Creating, Editing and Saving a document'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJZ2v9Hg9Jdm9gdJVkcajtiu9gUFPGpQlFHvnoKx-MtB6NV2PeskjRcbk9KJV6GW5GRVo4v1AiAzXVPqHGzXMI7LKMambThL6AJquIoZOw6CuZtOS8YZiFsAUunDwcsaPhbhp-ajfjaVQ/s72-c/save+as.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-4548205938853534145</id><published>2020-06-22T19:46:00.003+05:30</published><updated>2020-06-22T19:52:38.593+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Word"/><title type='text'>MS Word | Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;MS Word&lt;/span&gt;&lt;/b&gt; is an application, word-processing software designed and developed by Microsoft Corporation in USA. The extension name of MS Word file is .DOCX (from 2007 onward).&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Introduction to MS Word window and it&#39;s elements&lt;/span&gt;&lt;/h2&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilWK14uuopWIxGhsjgOdkijlPLHW887UtHqcSLKnpt9Q2CCFe4Wyg-YT2DNwvWVfGOzSx8FAXHDzJCeRjofjYCyh3Sqtm_AVKov7DehmZ0GxKE90Uf9BaLo1olKX-9r1JhjCR_xW7JsPBf/s1600/word+window.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;280&quot; data-original-width=&quot;560&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilWK14uuopWIxGhsjgOdkijlPLHW887UtHqcSLKnpt9Q2CCFe4Wyg-YT2DNwvWVfGOzSx8FAXHDzJCeRjofjYCyh3Sqtm_AVKov7DehmZ0GxKE90Uf9BaLo1olKX-9r1JhjCR_xW7JsPBf/s1600/word+window.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;MS Word window with it&#39;s elements&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Title Bar&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
It is the top most bar of the MS Word window. It show the name of the current file name. By default it opens with Document1. At the right side of the bar Minimize, Maximize / Restore and Close buttons are placed.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Ribbons&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
There are total 7 Ribbons present in MS Word window - &lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Home, Insert, Page Layout, References, Mailings, Review, View. &lt;/span&gt;&lt;/b&gt;Each and every Ribbon has some predefined command groups, such as Home has - &lt;i&gt;Clipboard, Paragraph, Font, Style, Editing.&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Status Bar&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Status Bar is the bottom most bar of the MS Word window. It displays the current position of the cursor and many more statistics about the current document, such as total number of words, paragraphs, etc. present in the current document.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Horizontal and Vertical Scroll Bar&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
If the document size becomes very big, then it will not fit on the monitor screen. Then we scroll up and down (using Vertical Scroll Bar) or right and left (using Horizontal Scroll Bar) to see the invisible part of the document.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Ruler&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Ruler is used to set the margin of the current document page from all the sides (4 sides).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Text Area&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Text Area is the main working area of Word window, where we type anything or insert any image. It presents just below of Ruler.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Quick Access Tool Bar&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Quick Access Tool Bar contains some frequently used options with it&#39;s icons, such as Save, Open, Copy, Paste, etc.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/4548205938853534145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/ms-word-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/4548205938853534145'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/4548205938853534145'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/ms-word-introduction.html' title='MS Word | Introduction'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilWK14uuopWIxGhsjgOdkijlPLHW887UtHqcSLKnpt9Q2CCFe4Wyg-YT2DNwvWVfGOzSx8FAXHDzJCeRjofjYCyh3Sqtm_AVKov7DehmZ0GxKE90Uf9BaLo1olKX-9r1JhjCR_xW7JsPBf/s72-c/word+window.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3635440501202508392</id><published>2020-06-19T23:58:00.001+05:30</published><updated>2020-07-11T09:54:16.751+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Video"/><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Types of Operator in Java Part - 1&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/YhKgd4wL_aU&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;


&lt;b&gt;Types of Operator in Java Part - 2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/iF_PnOhTlsk&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Increment and Decrement Operator | Part - 1&lt;/b&gt;&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/QEa8bGPME3Y&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Increment and Decrement Operator | Part - 2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; 
gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/37g_R4LNt-w&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;if-else and nested if-else | Part 1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/XIDcxnDivf0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Ternary Operator&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/aE-DpNe5WM4&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;String Handling in Java | Part 1&lt;/b&gt;&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/80pr-HluEOY&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;String Handling in Java | Part 2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; 
gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/lc_76tkivSk&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;String Handling in Java | Part - 3&lt;/b&gt;&lt;br /&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; 
gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/giFiDSx7bxA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Palindrome Word Checking | String Handling in Java | Part&amp;nbsp; &amp;nbsp;4&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/TJex-qCE5Yk&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3635440501202508392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3635440501202508392'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3635440501202508392'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/blog-post.html' title=''/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/YhKgd4wL_aU/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3718669592848652745</id><published>2020-06-19T18:08:00.000+05:30</published><updated>2020-06-25T17:10:07.714+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="MS Office"/><title type='text'>Microsoft Excel | Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Microsoft Excel&lt;/span&gt; is a spreadsheet based application software of MS Office suit productivity software, developed and published by Microsoft Corporation in USA. The extension name of Excel file (for Office version 2007 onward) is .XLSX.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Introduction to Excel window and it&#39;s elements&lt;/span&gt;&lt;/h2&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj9MuJg1nUMeedmEC6WGFY6iQDT1pCUiJUinOT7gy-t-wd2Wkbl_7z0FA3hGAx7sDv94fSMFza_tRB3NXr7w48pzdiCAw6cDTiknhT-wR_zwRGHM1ibi0oE-v53XTCQgwitJNgfMO86uC2/s1600/excel+window.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;900&quot; data-original-width=&quot;1600&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj9MuJg1nUMeedmEC6WGFY6iQDT1pCUiJUinOT7gy-t-wd2Wkbl_7z0FA3hGAx7sDv94fSMFza_tRB3NXr7w48pzdiCAw6cDTiknhT-wR_zwRGHM1ibi0oE-v53XTCQgwitJNgfMO86uC2/s640/excel+window.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;MS Excel window with it&#39;s elements&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Workbook:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A workbook is an Excel file that contains one or more worksheets to help you organize data. You can create a new workbook from blank workbook or a template.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Worksheet:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Each and every page of a workbook is known as worksheet. By default, there are three worksheets present in a Workbook - Sheet1, Sheet2, Sheet3. We can increase the number of worksheets as requirement.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Title Bar:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Title Bar is the top most bar in Excel window. It displays the name of the current workbook and at the right side of the bar, Minimize, Maximize / Restore and Close buttons are placed.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Ribbon:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
There are total 7 Ribbons present - &lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;Home, Insert, Page Layout, Formulas, Data, Review, View&lt;/span&gt;&lt;/b&gt;. Each and every Ribbon has some predefined command groups , such as Home has &lt;i&gt;Clipboard, Font, Alignment,Number, Styles, Cells, Editing &lt;/i&gt;total 7 command groups.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Row and Column:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Row lays in horizontally, while column lays in vertically. In Excel 2010, Row numbers ranges from 1 to 1048576 and Column number ranges from A to XFD, in total 16384 columns.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Cell:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The intersection of row and column is known as Cell. Each cell has Cell Address, like A1, A2, B4, etc. The first cell address is A1 and last cell address is XFD1048576.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Active cell:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
An active cell refers to the currently selected cell in a spreadsheet. It can be identified by a bold outline that surrounds the cell.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Status Bar:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Status Bar is the bottom most bar in Excel. It shows the current status of the worksheet. It also notifies us about Caps Lock, Num Lock, Scroll Lock, etc. ON or OFF state.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Name box:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Name box shows the address of Active cell. On which cell the mouse pointer will be clicked, the Name box will display that particular cell address.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Formula Bar:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The Formula Bar is where data or formulas we enter into a worksheet appear for the active cell. The Formula Bar can also be used to edit data or formula in the active cell.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Horizontal and Vertical Scroll Bar:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Normally, the size of the worksheet is very big, which does not fit in monitor. So, to move on to invisible part of the worksheet, we use Scroll Bar. To move up and down, we use Vertical Scroll Bar, while to move right and left, we use Horizontal Scroll Bar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Different types of Cell References&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Relative reference:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
By default, all cell references are &lt;b&gt;relative references&lt;/b&gt;. When copied across multiple cells, they change based on the relative position of rows and columns. For example, if you copy the formula&amp;nbsp;&lt;b&gt;=A1+B1&lt;/b&gt;&amp;nbsp;from row 1 to row 2, the formula will become &lt;b&gt;=A2+B2&lt;/b&gt;. Relative references are especially convenient whenever you need to repeat the same calculation across multiple rows or columns.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Absolute reference:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
An &lt;b&gt;absolute reference&lt;/b&gt; in Excel refers to a reference that is &lt;b&gt;&quot;locked&quot;&lt;/b&gt;&amp;nbsp;so that rows and columns won&#39;t change when copied. To create an absolute reference, add a dollar sign ($) before the row and column. For example, if we write formula, =$A$1 * 10, that means A1 cell is locked and after copying in the next cell, the cell reference will not change.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Mixed reference:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Mixed reference&lt;/b&gt; is the combination of Relative reference or Absolute reference. That means here, either row or column can be locked with $ sign as Absolute reference and other one will be unlocked as Relative reference. For example, =$A1 * 10, which means A column is locked but not row. So, after copying in the next cell, the formula will be =$A2 * 10, that means column remain same and row just changed.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3718669592848652745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/microsoft-excel-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3718669592848652745'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3718669592848652745'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/microsoft-excel-introduction.html' title='Microsoft Excel | Introduction'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj9MuJg1nUMeedmEC6WGFY6iQDT1pCUiJUinOT7gy-t-wd2Wkbl_7z0FA3hGAx7sDv94fSMFza_tRB3NXr7w48pzdiCAw6cDTiknhT-wR_zwRGHM1ibi0oE-v53XTCQgwitJNgfMO86uC2/s72-c/excel+window.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3133919850427240098</id><published>2020-06-13T20:24:00.000+05:30</published><updated>2020-06-13T20:24:04.219+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Array (Single Dimensional and Double Dimensional)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
An &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;array&lt;/span&gt;&lt;/b&gt;&amp;nbsp;is a structure created in the memory to represent a number of values of the same data type with variable having the same variable name along with different subscript (location). An array is also called &lt;b&gt;Subscripted Variable.&lt;/b&gt; An array with empty [ ] represents an unfixed number of cells in the memory.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
An array is basically of two types:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1) Single Dimensional Array&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2) Double Dimensional Array&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Creating Single Dimensional Array (SDA)&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The syntax to crate a single dimensional array is as shown below:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;lt;Data type&amp;gt; &amp;lt;variable&amp;gt;[ ] = new &amp;lt;Data type&amp;gt;[size of the array];&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;e.g., &lt;/b&gt;int m[ ] = new int[10]; means m is an integer type array that can store 10 data items in the memory with different subscripts along X-axis. However, the storage of the array elements begin with the 0th subscript as shown below:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT1ziowHY58PBC6Rb15hG6bnLwoPFYq2sz3iwfkLkUDhJmDYaUtUEoCHCMBPrZv-_g6iwL8bCxHEkWkViHBLxpjnuAczLiFdLjplp9YjnzQNlHUrcWNK3AYTxAH28MQSfqw8KaClWjNdTH/s1600/array1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;209&quot; data-original-width=&quot;449&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT1ziowHY58PBC6Rb15hG6bnLwoPFYq2sz3iwfkLkUDhJmDYaUtUEoCHCMBPrZv-_g6iwL8bCxHEkWkViHBLxpjnuAczLiFdLjplp9YjnzQNlHUrcWNK3AYTxAH28MQSfqw8KaClWjNdTH/s320/array1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Here, m0 can be written as m[0] where m is subscripted variable and 0 is subscript.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXqnOo4pE640KoGUrxsmsOskmLl9FO-v_au-YI5Oeow66NmPXXjL5yJ5r0a2yyCq6liPVpnCs7TW_vn36KEoI_Vq5uuRRnnkwfn21zndiX_ScH-iw3987Joxe1ate4YwtG5INDp6TdZJTZ/s1600/array2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;269&quot; data-original-width=&quot;568&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXqnOo4pE640KoGUrxsmsOskmLl9FO-v_au-YI5Oeow66NmPXXjL5yJ5r0a2yyCq6liPVpnCs7TW_vn36KEoI_Vq5uuRRnnkwfn21zndiX_ScH-iw3987Joxe1ate4YwtG5INDp6TdZJTZ/s400/array2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In this illustration shown above, 0, 1, 2, ......, 9 are referred to as subscripts and they help in both input and output of the array elements.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3133919850427240098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/array-single-dimensional-and-double.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3133919850427240098'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3133919850427240098'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/array-single-dimensional-and-double.html' title='Array (Single Dimensional and Double Dimensional)'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT1ziowHY58PBC6Rb15hG6bnLwoPFYq2sz3iwfkLkUDhJmDYaUtUEoCHCMBPrZv-_g6iwL8bCxHEkWkViHBLxpjnuAczLiFdLjplp9YjnzQNlHUrcWNK3AYTxAH28MQSfqw8KaClWjNdTH/s72-c/array1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3641174522022365587</id><published>2020-06-11T12:13:00.002+05:30</published><updated>2020-06-11T22:03:41.715+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Mathematical Library Methods</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The library methods (functions) are the in-built methods designed by the developers. These predefined functions help the user to perform certain tasks easily and quickly which are frequently used in Java programming. All the Mathematical functions are included in a&amp;nbsp; class called &lt;i style=&quot;font-weight: bold;&quot;&gt;Math&lt;/i&gt;&amp;nbsp;under &lt;b&gt;java.lang&lt;/b&gt;&amp;nbsp;package.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.min()&lt;/span&gt;&lt;/h3&gt;
It returns the minimum of two numbers. It returns int/long/double type value depending upon the type of arguments passed to it.&lt;br /&gt;
&lt;b&gt;Syntax&lt;/b&gt;: &amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument 1, argument 2)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&lt;/b&gt;&amp;nbsp;double m = Math.min(-4.5, -5.4);&lt;br /&gt;
&lt;b&gt;Output&lt;/b&gt;: -5.4&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.max()&lt;/span&gt;&lt;/h3&gt;
It returns the greatest value of two numbers. It returns int/long/double type value depending upon the type of arguments passed to it.&lt;br /&gt;
&lt;b&gt;Syntax&lt;/b&gt;: &amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument 1, argument 2)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&lt;/b&gt;&amp;nbsp;double m = Math.max(9.2, 9.45);&lt;br /&gt;
&lt;b&gt;Output&lt;/b&gt;: 9.45&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.pow()&lt;/span&gt;&lt;/h3&gt;
This method is used to find the power raised to a given base value. It always returns a double type value.&lt;br /&gt;
&lt;b&gt;Syntax: &lt;/b&gt;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument 1, argument 2)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&lt;/b&gt;&amp;nbsp;double m = Math.pow(2,4);&lt;br /&gt;
&lt;b&gt;Output&lt;/b&gt;: 16.0&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.sqrt()&lt;/span&gt;&lt;/h3&gt;
It is used to find the square root of a positive number. It returns a double type value.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(Positive number)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&lt;/b&gt;&amp;nbsp;double m = Math.sqrt(7.29);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;2.7&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Square root of a negative number is an imaginary number.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.cbrt()&lt;/span&gt;&lt;/h3&gt;
It is used to find the cube root of a positive number or negative number. It returns a double type value.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(number)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&lt;/b&gt;&amp;nbsp;double m = Math.cbrt(27.791);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;3.1&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.log()&lt;/span&gt;&lt;/h3&gt;
This function is used to find the natural logarithmic value of a given argument. It always return a double type value.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(number)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g., &lt;/b&gt;double m = Math.log(6.25);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;1.8325&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.abs()&lt;/span&gt;&lt;/h3&gt;
It always returns the absolute value of an argument (magnitude of the number without its sign, i.e., a positive value). The return value may be int/long/double data type depending upon the input arguments.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(number)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.abs(-6.25);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;6.25&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.round()&lt;/span&gt;&lt;/h3&gt;
This function return the value of a number rounded to its nearest integer. If the fractional part is less than 0.5 then it returns the same integer value, otherwise it returns the next higher integer. It returns the value in long or int type.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(8.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;9&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(-8.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;-8&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.rint()&lt;/span&gt;&lt;/h3&gt;
This function returns the nearest integer of a given fractional number. The return data type will always be double.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(8.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;8.0&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(-9.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;-10.0&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.ceil()&lt;/span&gt;&lt;/h3&gt;
It returns the next higher integer number that is greater than or equal to the argument. It always return the value as a double data type.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.ceil(8.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;9.0&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(-8.5);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;-8.0&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.floor()&lt;/span&gt;&lt;/h3&gt;
It returns the lower integer number that is less than or equal to the argument. It always returns the value as a double data type.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(argument)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.floor(8.912);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;8.0&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.round(-8.912);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;-9.0&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Math.floor()&lt;/span&gt;&lt;/h3&gt;
It results in the exponential value of an argument x (i.e.e^&lt;sup&gt;x&lt;/sup&gt;). It returns a double type value.&lt;br /&gt;
&lt;b&gt;Syntax:&lt;/b&gt;&amp;nbsp;&amp;lt;Return data type&amp;gt; &amp;lt;variable&amp;gt; = &amp;lt;Function name(number)&amp;gt;;&lt;br /&gt;
&lt;b&gt;e.g.,&amp;nbsp;&lt;/b&gt;double m = Math.exp(6.25);&lt;br /&gt;
&lt;b&gt;Output:&lt;/b&gt;&amp;nbsp;518.0128&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3641174522022365587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/mathematical-library-methods.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3641174522022365587'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3641174522022365587'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/mathematical-library-methods.html' title='Mathematical Library Methods'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-3050465962669276752</id><published>2020-06-10T19:52:00.001+05:30</published><updated>2020-06-10T20:40:45.481+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Iterative Constructs with Nested Loop</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A construct in which a block of statements gets executed repeatedly unless the required task has been completed. Such repetitive construct is known as an iterative construct or a &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Loop&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;Iterative means repeated execution of a set of statements. This can be achieved by using a loop.&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Based on the flow of control, the looping constructs can be categorized into two types. They are:&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Entry Controlled Loop&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;Exit Controlled Loop&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Entry Controlled Loop&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A looping construct in which the condition is checked in the beginning. If the condition is true, the control is allowed to enter into the loop otherwise the entry will be denied. There are two types of looping construct under this category:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;for Loop&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The &lt;b&gt;for&lt;/b&gt;&amp;nbsp;loop is used when number of iterations is fixed and known. It is a fixed or known iterative&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
looping construct.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggg2U9ygqqIyCgQLPdrrj0TNO_aAezH6njLxROfG7TmEwFF207xFYABT7P2THgM4F9jj3JtqUMbdfG0KQzkYiJ4TL6NED298uzdK4-UFCm2Cn3zhNIBduscCx5RUfUgdsYKTSI9Qd4uV8C/s1600/for_loop.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: justify;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;575&quot; data-original-width=&quot;595&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggg2U9ygqqIyCgQLPdrrj0TNO_aAezH6njLxROfG7TmEwFF207xFYABT7P2THgM4F9jj3JtqUMbdfG0KQzkYiJ4TL6NED298uzdK4-UFCm2Cn3zhNIBduscCx5RUfUgdsYKTSI9Qd4uV8C/s200/for_loop.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;Components of &lt;b&gt;for &lt;/b&gt;loop structure are:&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;control variable with initial value&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;test condition&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;iteration (increment / decrement step value)&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;syntax:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
for(initialization; test condition; iteration)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
// loop body&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
for(a=1; a&amp;lt;=10; a++)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
System.out.prinlnt(a);&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
s=s+a;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;while Loop&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Sometimes, it may happen that a set of statements are to be executed repeatedly without knowing the number of iterations, while loop is used to solve the purpose. In this looping construct, a block of statements gets executed repeatedly unless the given condition is false. while loop is unfixed or unknown iterative loop.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;syntax:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
initialization;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
while(test condition)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
//statements&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
iteration;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
int p=1000, r=10;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
while(p&amp;lt;=10000)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
si = (p * r) / 1000.0;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
p = p + si;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Exit Controlled Loop&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
This is another type of looping construct in which condition is checked at the exit point (end point) of the loop. The control will repeat for the next iteration or exit from the loop depending on the condition is true or false receptively. Here, the body of the loop will execute at least once.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;do-while Loop&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The &lt;b&gt;do-while&lt;/b&gt;&amp;nbsp;loop also works in the same way as while loop. It is also unfixed or unknown iterative loop. Only difference is the position at which the condition will be checked. In &lt;b&gt;do-while&lt;/b&gt;&amp;nbsp;loop the condition is checked at the end of the loop.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;syntax&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
initialization;&lt;br /&gt;
do&lt;br /&gt;
{&lt;br /&gt;
//statement&lt;br /&gt;
iteration;&lt;br /&gt;
}while(test condition);&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
int p=1000, r=10;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
do&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
si = (p * r) / 1000.0;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
p = p + si;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
}while(p&amp;lt;=10000);&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Use of &#39;break&#39; statement in loop&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Sometimes, it may happen that the loop has not been completed but the requirement has been fulfilled. The user then would like to terminate the loop without its completion. In this situation, &lt;b&gt;break&lt;/b&gt;&amp;nbsp;statement is used to solve the purpose. Hence, the &lt;b&gt;break&lt;/b&gt;&amp;nbsp;statement is used in a loop to send the control out of the loop, if certain condition is true.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;eg.,&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
for(i=1; i&amp;lt;=10; i++)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if(i == 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; s = s + i;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
In the above example, the loop will add the numbers from 1 to 4. As soon as the value of &#39;i&#39; becomes 5, the break statement will be executed. As a result control will exit from the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Use of &#39;continue&#39; statement in loop&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The &lt;b&gt;continue&lt;/b&gt;&amp;nbsp;statement is opposite of the break statement. When continue statement is invoked, the control goes back to check the condition of the loop by ignoring rest statements of the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;eg.,&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
for(i=1; i&amp;lt;=10; i++)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if(i == 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; s = s + i;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
In the above example, the loop will run from 1 to 10 times, but as soon as, the value of &#39;i&#39; becomes 5, the continue statement will be executed. As a result, the control will be forced to move back for the next iteration by ignoring the last statement of the loops.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Infinite loop&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
A loop that repeats for infinite number of iterations is known as infinite loop. It is also called endless loop. Here, the test condition always return &lt;b&gt;true&lt;/b&gt;&amp;nbsp;value.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;eg.,&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
for(;;)&lt;br /&gt;
//statements&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Nested loop&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
When you use a loop within another loop is said to be a nested loop. In the nested loop, you will notice that the inner loop repeats a number of times for each repetition of the outer loop.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;e.g.,&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
int i, j;&lt;br /&gt;
for(i=1; i&amp;lt;=5; i++)&amp;nbsp; &amp;nbsp; &amp;nbsp; // outer loop&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; for(j=1; j&amp;lt;=i; j++)&amp;nbsp; &amp;nbsp; &amp;nbsp;// inner loop&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(j);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;OUTPUT&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
1&lt;br /&gt;
12&lt;br /&gt;
123&lt;br /&gt;
1234&lt;br /&gt;
12345&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/3050465962669276752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/iterative-constructs-with-nested-loop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3050465962669276752'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/3050465962669276752'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/iterative-constructs-with-nested-loop.html' title='Iterative Constructs with Nested Loop'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggg2U9ygqqIyCgQLPdrrj0TNO_aAezH6njLxROfG7TmEwFF207xFYABT7P2THgM4F9jj3JtqUMbdfG0KQzkYiJ4TL6NED298uzdK4-UFCm2Cn3zhNIBduscCx5RUfUgdsYKTSI9Qd4uV8C/s72-c/for_loop.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-6399716429517205195</id><published>2020-06-10T00:18:00.001+05:30</published><updated>2020-06-27T00:24:40.968+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Conditional Statements</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;if statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-4Z4W9RJl8cpWfxx-nL-mgiM82c4xbiVj8AzXnhXSFZ5uFvwyiotI-ideBslCZWfetvoDOW9CVIwF0HAeHQRybUk-acQoPoZggLmGKPG_sh7Fgmvb3UlEzQ4z_3pBqt4lqYP8D7PD8Dvu/s1600/condition+1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;670&quot; data-original-width=&quot;768&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-4Z4W9RJl8cpWfxx-nL-mgiM82c4xbiVj8AzXnhXSFZ5uFvwyiotI-ideBslCZWfetvoDOW9CVIwF0HAeHQRybUk-acQoPoZggLmGKPG_sh7Fgmvb3UlEzQ4z_3pBqt4lqYP8D7PD8Dvu/s200/condition+1.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;This statement checks the condition first. If the condition is true then the next statement is executed&lt;/div&gt;
otherwise it is ignored.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
e.g.,&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
if(a&amp;gt;10)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c = a * a;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
System.out.println(c);&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In the example shown above, if the given condition (i.e., a is greater than 10) is true then it will calculate the square of the number &#39;a&#39; otherwise, it will ignore this statement and will go to the next statement. In that case, it will print the default value of c as 0.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;if-else statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCQADUfs1BMcib5NHqEoeMc0LZaEK0XUsW7D219r7q-W0HBIv22jytmFoz1ekBnV6eGAAlv6ZWvF-Ak0dO6Q0x82edaoXngAmG-UFZ3rJFOYgFF9AynlowFFgOTvdWRqRnwlGUf5xhexH/s1600/condition+2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;585&quot; data-original-width=&quot;625&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKCQADUfs1BMcib5NHqEoeMc0LZaEK0XUsW7D219r7q-W0HBIv22jytmFoz1ekBnV6eGAAlv6ZWvF-Ak0dO6Q0x82edaoXngAmG-UFZ3rJFOYgFF9AynlowFFgOTvdWRqRnwlGUf5xhexH/s200/condition+2.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;If you want to execute either of the two statements depending upon a given condition then &lt;i&gt;&#39;if-else&#39;&lt;/i&gt;&amp;nbsp;statement is used.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
e.g.,&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
if(a &amp;gt; b)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;max = a;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
else&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;max = b;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The example shown above illustrates that max is assigned either with the value &#39;a&#39; or &#39;b&#39; depending upon the condition (a&amp;gt;b) us true or false.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;if-else-if statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Sometimes, it may happen that the given condition is false and the user wants to check another condition for taking necessary action, under this situation &#39;&lt;i&gt;if-else-if&amp;nbsp;&lt;/i&gt;&#39; statement is used.&lt;br /&gt;
e.g.,&lt;br /&gt;
if(marks &amp;gt;= 75)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Distinction&quot;);&lt;br /&gt;
else if(marks &amp;gt;= 60)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;First Division&quot;);&lt;br /&gt;
else if(marks &amp;gt;= 50)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Second Division&quot;);&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Third Division&quot;);&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;if-else and nested if-else | Part 1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/XIDcxnDivf0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Nested if statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
When &#39;if&#39; statement is used within another &#39;if&#39; statement, the construct is said to be a &#39;&lt;i&gt;Nested if &#39; &lt;/i&gt;statement. In this construct, if the given condition is true then it further checks another if condition and carries out the instructions accordingly.&lt;br /&gt;
e.g.,&lt;br /&gt;
if( a&amp;gt;= 10)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if(a &amp;lt; 100)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c = a * a;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; c = a * a * a;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;switch-case statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In a switch case statement, a number of blocks are created under different cases. All the cases are enclosed within curly braces { } under switch statement. A particular case is executed based on the given value (user&#39;s choice) of control variable passed as an argument to the switch () statement.&lt;br /&gt;
e.g.,&lt;br /&gt;
switch (a)&lt;br /&gt;
{&lt;br /&gt;
case 1:&lt;br /&gt;
System.out.println(&quot;Good&quot;);&lt;br /&gt;
break;&lt;br /&gt;
case 2:&lt;br /&gt;
System.out.println(&quot;Better&quot;);&lt;br /&gt;
break;&lt;br /&gt;
System.out.println(&quot;Best&quot;);&lt;br /&gt;
break;&lt;br /&gt;
default:&lt;br /&gt;
System.out.println(&quot;Invalid&quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A particular case will be executed when matched with the value of control variable &#39;a&#39;. The default case will be executed only when the value of &#39;a&#39; doesn&#39;t match with any of the cases listed above.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Terms related to switch statement&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Control Variable&lt;/span&gt;&lt;/h4&gt;
The variable passed as an argument to the switch statement that decides which case is to be executed is known as a control variable.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;break statement&lt;/span&gt;&lt;/h4&gt;
This is the statement used at the end of each case which acts as the case terminator. As soon as break is encountered, the control is forced to move out of the switch block.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;default statement&lt;/span&gt;&lt;/h4&gt;
If no case is matched in the switch block for a given value of control variable, default case is executed implicitly.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Fall Through&lt;/span&gt;&lt;/h4&gt;
In case a break statement is not used at the end of a case, the control enters into the next case for execution. This condition is said to be Fall Through.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/6399716429517205195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/conditional-statements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/6399716429517205195'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/6399716429517205195'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/conditional-statements.html' title='Conditional Statements'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-4Z4W9RJl8cpWfxx-nL-mgiM82c4xbiVj8AzXnhXSFZ5uFvwyiotI-ideBslCZWfetvoDOW9CVIwF0HAeHQRybUk-acQoPoZggLmGKPG_sh7Fgmvb3UlEzQ4z_3pBqt4lqYP8D7PD8Dvu/s72-c/condition+1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-7191809077402367345</id><published>2020-06-09T20:18:00.000+05:30</published><updated>2020-06-09T23:41:39.655+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Introduction to Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPaZdvNFGPoTbr1wuPJ66F04i8wTwQ4ZjYfNJ2k40sRQtzccCMjA53dX8YoiuoZb6kabeWjPClF6rd0rLLgZHO7p0Vbz1v_hhULS9eVx4wVCOkCm-7E5P8IFGPyG1qyJmWrmFbCdQEc80a/s1600/Java.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;479&quot; data-original-width=&quot;268&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPaZdvNFGPoTbr1wuPJ66F04i8wTwQ4ZjYfNJ2k40sRQtzccCMjA53dX8YoiuoZb6kabeWjPClF6rd0rLLgZHO7p0Vbz1v_hhULS9eVx4wVCOkCm-7E5P8IFGPyG1qyJmWrmFbCdQEc80a/s200/Java.PNG&quot; width=&quot;111&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt;Java &lt;/span&gt;is a an object oriented, high level programming language developed by James Gosling along with his associates at Sun Micro System (a software company), in USA. Initially it was named OAK (a tree outside Gosling&#39;s office). The name OAK remained only for some hours until the development team realised that another language is also available with this name. Finally,on the coffee table they decided a professional name for the language as Java. It was primarily developed to help users in web designing but later on it emerged as a full-fledged programming language in 1991.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Java gained wide popularity amongst the users due to its platform independence. The platform independence means the program in Java language can be executed on any types of Operating System (OS).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Java language allows writing a program in two ways. They are:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;u style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Java application or Standalone system&lt;/u&gt;: It is a Java program that is developed to run on a computer without any help of a web browser. It is also known as standalone system.&lt;/li&gt;
&lt;li&gt;&lt;u style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Java applet or Internet applet&lt;/u&gt;: It is a program written in Java language that can be included in a web page in the same way as a picture or a clip is included. Java applets are run with the help a Java supported web browser.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Features of Java Language&lt;/span&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Java is object oriented programming language.&lt;/li&gt;
&lt;li&gt;It is a high level programming language.&lt;/li&gt;
&lt;li&gt;It is platform independent.&lt;/li&gt;
&lt;li&gt;It uses compiler as well as interpreter.&lt;/li&gt;
&lt;li&gt;It is a robust language.&lt;/li&gt;
&lt;li&gt;It is case sensitive.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Java Compiler and Interpreter&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Java compiler is a system software that converts a program in Java (Java source code) into an intermediate binary form called &lt;b&gt;Byte Code. &lt;/b&gt;Further, the byte code is converted into machine code suitable to a specific platform known as Java Interpreter.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Java Interpreter enables a computer to execute a Java program as well as a program written in other language compiled into Java byte code. This is the reason, Java interpreter is said to be &lt;b&gt;Java Virtual Machine (JVM).&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7wkiChgQvMYFBxyZ3FIyrGYAWhSDFsBcXcjsM9QxF3VL_HShXEoFs4KRH0fRLLmA7G-YObS8lJKUgDFQNxwroX3AxrGBjqXkalDAFo8zjgRUJa5wzMT23OWcJG0dUIvNnKYMn0JkxlsaU/s1600/compiler-interpreter.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;349&quot; data-original-width=&quot;958&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7wkiChgQvMYFBxyZ3FIyrGYAWhSDFsBcXcjsM9QxF3VL_HShXEoFs4KRH0fRLLmA7G-YObS8lJKUgDFQNxwroX3AxrGBjqXkalDAFo8zjgRUJa5wzMT23OWcJG0dUIvNnKYMn0JkxlsaU/s640/compiler-interpreter.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;It is important to know that Java machine code varies for different platforms such as windows (single user OS), UNIX (multi-user OS) including other operating systems.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/7191809077402367345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/introduction-to-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7191809077402367345'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7191809077402367345'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/introduction-to-java.html' title='Introduction to Java'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPaZdvNFGPoTbr1wuPJ66F04i8wTwQ4ZjYfNJ2k40sRQtzccCMjA53dX8YoiuoZb6kabeWjPClF6rd0rLLgZHO7p0Vbz1v_hhULS9eVx4wVCOkCm-7E5P8IFGPyG1qyJmWrmFbCdQEc80a/s72-c/Java.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-7893276567603064794</id><published>2020-06-08T19:17:00.000+05:30</published><updated>2020-06-23T13:14:13.334+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Values and Data Types</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;ASCII Codes&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: 11.0pt; line-height: 115%;&quot;&gt;ASCII
stands for American Standard Code for Information Interchange. It uses 7 bits
code for representing each character. It includes 256 characters but only 128
characters are used while designing and executing a program. ASCII code
represents these characters as numbers, with each letter assigned a number from
0 to 127. The ASCII codes of some of the characters used in Java programming
are shown below:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 167.4pt;&quot; valign=&quot;top&quot; width=&quot;223&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Characters&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 81.0pt;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
ASCII Codes&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 167.4pt;&quot; valign=&quot;top&quot; width=&quot;223&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Blank space (white space)&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 81.0pt;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
32&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 167.4pt;&quot; valign=&quot;top&quot; width=&quot;223&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
0 to 9 (Numbers)&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 81.0pt;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
48 – 57&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 167.4pt;&quot; valign=&quot;top&quot; width=&quot;223&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
A to Z (Capital Alphabets)&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 81.0pt;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
65 – 90&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 167.4pt;&quot; valign=&quot;top&quot; width=&quot;223&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
a to z (Small Alphabets)&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 81.0pt;&quot; valign=&quot;top&quot; width=&quot;108&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
97 – 122&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2 style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: inherit;&quot;&gt;Tokens&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Token is defined as each individual item or component of Java program
that carries some meaning and takes active part in program execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN52g2d6484smLjAzaWdf95eRHdwEeGKung9a7OiBSLQPYTfxi_DYlxJtf5o0vlp9s_xRmgIsAVPhWxrq1uLC4qTfdeLATT4sxVaeV-z0CVh7_kobgXXl_vXdUI8ir8PGQdU6AHt5ndqyE/s1600/token.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;236&quot; data-original-width=&quot;729&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN52g2d6484smLjAzaWdf95eRHdwEeGKung9a7OiBSLQPYTfxi_DYlxJtf5o0vlp9s_xRmgIsAVPhWxrq1uLC4qTfdeLATT4sxVaeV-z0CVh7_kobgXXl_vXdUI8ir8PGQdU6AHt5ndqyE/s400/token.JPG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Keywords&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Keywords are the reserved words which are preserved by the system and
carry special meaning for the system compiler. They have already been defined
in the language and we cannot use them as names for variables or identifiers,
e.g., class, public, throws, for, sqrt, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Identifiers&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Identifiers is a term used for naming a block of statements by which
they are identified in a Java program. Identifiers can be a class name, a
function name, an object , a variable name or an interface name. Following are
some naming rules for identifiers:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Identifier’s name cannot be same with Keywords
or Reserved words.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Identifier’s name always starts with alphabets,
not with numbers.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;No special characters are used within an
identifiers name except underscore (_) or dollar ($).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Blank space (white space) is not allowed in
between identifiers name.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: magenta;&quot;&gt;Literals&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The term constants are referred to as literals in Java programs that
remain unchanged during entire execution of the program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The various types of literals used in Java are as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;Integer Literals:&lt;/u&gt;&lt;/b&gt; The
whole numbers (positive or negative) are known as integer literals. Decimal
point is not allowed in Integer Literals. e.g., 16, 357, 7856, 66845, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;Real Literals:&lt;/u&gt;&lt;/b&gt; Real
literals are also called as floating point numbers. They are the fractional
numbers. The placement of decimal point may not be same in real numbers. e.g.,
3.45, 85.6, 557.65, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;Character Literals:&lt;/u&gt;&lt;/b&gt; A
single letter or a digit or any special symbol enclosed within single quotes is
known as a character literal. It does not take part in arithmetical
calculations. e.g., ‘B’, ‘u’ ‘6’, ‘?’, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;String Literals:&lt;/u&gt;&lt;/b&gt; A
group of characters enclosed within double quotes is known as a String literal.
e.g., “PROCESS”, “System”, “Salary – 2018”, “4357”, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;Boolean Literals&lt;/u&gt;&lt;/b&gt;: Boolean
literals are true and false. A Boolean literal can either be true or false at a
time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;Null Literal:&lt;/u&gt;&lt;/b&gt; Null
literal denotes the absence of a value. It is used to initialize an object or
array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;e.g., int n = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;String s = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Operators&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Operators are the symbols or signs used to specify the operations to be performed in a Java expression or statement.&lt;br /&gt;
To know different types of operators and their functions, &lt;a href=&quot;https://a2z-computer.blogspot.com/2020/04/operators-in-java-types-of-operators-in.html&quot;&gt;click here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;b&gt;Punctuators or Separators&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Punctuators or Separators are some punctuation signs or some special characters in Java, which are used to separate the variables or the characters. e.g., comma (,), semicolon (;), dot (.), parenthesis (), brackets {}, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;span style=&quot;color: red; font-family: inherit;&quot;&gt;Data Types&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Date type basically refers to as the types of data,a memory location can hold. Java supports mainly following two types of data:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Primitive Data Type (Built-in)&lt;/li&gt;
&lt;li&gt;Non-primitive Data Type (User-defined)&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Primitive Data Types&lt;/span&gt;&lt;/h3&gt;
Primitive Data Types are the basic or fundamental data types used to declare a variable. There are following 8 primitive data types present in Java:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;background: #BFBFBF; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 126.9pt;&quot; valign=&quot;top&quot; width=&quot;169&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;b&gt;Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BFBFBF; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;b&gt;Size
  (Bytes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BFBFBF; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
&lt;b&gt;Default&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td rowspan=&quot;4&quot; style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 59.4pt;&quot; width=&quot;79&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Integer&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
byte&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
short&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
int&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
4&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 11.65pt; mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 11.65pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
long&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 11.65pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
8&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 11.65pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td rowspan=&quot;2&quot; style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 59.4pt;&quot; width=&quot;79&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Real&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
float&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
4&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0.0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
double&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
8&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
0.0&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 59.4pt;&quot; valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Character&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
char&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
\u0000&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 59.4pt;&quot; valign=&quot;top&quot; width=&quot;79&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
Boolean&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
boolean&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.5pt;&quot; valign=&quot;top&quot; width=&quot;90&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
1 bit&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 77.4pt;&quot; valign=&quot;top&quot; width=&quot;103&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;&quot;&gt;
false&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Non-primitive Data Types&lt;/span&gt;&lt;/h3&gt;
A non-primitive data type is one that is derived from primitive data types. We also may say that a number of primitive data types are used together to represent a non-primitive data type. Hence, a non-primitive data type is also called a composite data type.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-align: center;&quot;&gt;
&lt;h2&gt;
&lt;span style=&quot;color: red; font-size: large;&quot;&gt;Type conversion&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
If various types of data are used in an expression, a question
obviously comes to your mind that what type of result it will return after
execution. In fact, the system converts the result into a specific data type
known as Type Conversion. Basically, the data type conversion take place in two
ways as discussed below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Implicit type conversion&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
In a mixed mode expression, when the smaller data types are converted
into higher data type automatically, then it is known as Implicit type
conversion. It is also known as Coercion.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
e.g., int a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
long b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
long c = a + b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;Explicit type conversion&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
In a mixed mode expression, when the smaller data types are need to be
converted into smaller data type, which is normally not possible, then we convert
them forcefully using type cast operator &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;().
&lt;/b&gt;This is known as Explicit type conversion. It is also known as Type
casting.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/7893276567603064794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/values-and-data-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7893276567603064794'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/7893276567603064794'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/values-and-data-types.html' title='Values and Data Types'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN52g2d6484smLjAzaWdf95eRHdwEeGKung9a7OiBSLQPYTfxi_DYlxJtf5o0vlp9s_xRmgIsAVPhWxrq1uLC4qTfdeLATT4sxVaeV-z0CVh7_kobgXXl_vXdUI8ir8PGQdU6AHt5ndqyE/s72-c/token.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-1959114637630077188</id><published>2020-06-06T23:22:00.000+05:30</published><updated>2020-07-04T12:29:02.884+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>String Handling</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Strings&lt;/span&gt;,
which are widely used in Java programming, are a sequence of characters.
Basically, String is a class in Java and we work with objects of String class.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: inherit; line-height: 130%;&quot;&gt;Java
String literal is created by using double quotes. For Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background: white; color: black; font-family: inherit; line-height: 130%;&quot;&gt;String s
= “Learn Java”&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWK0DYuyu8Ksalb-I4i8KwurXh4wXV5pUZVMMbL_VGbpfPtMK_-5HI5Ur5sELLDvMSGpGS5N5jEu8M79RtlilyDhD7yhICcu8nESPcgP3ssxQxBHB7vnNPEBqyt52FGNYsAWaXbdbCh126/s1600/string.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;388&quot; data-original-width=&quot;765&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWK0DYuyu8Ksalb-I4i8KwurXh4wXV5pUZVMMbL_VGbpfPtMK_-5HI5Ur5sELLDvMSGpGS5N5jEu8M79RtlilyDhD7yhICcu8nESPcgP3ssxQxBHB7vnNPEBqyt52FGNYsAWaXbdbCh126/s400/string.JPG&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;color: #351c75; font-family: inherit; font-size: large;&quot;&gt;Some String methods with their descriptions&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;int
length()&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This function returns
string length (i.e., total number of characters present in a String)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;char
charAt(int index)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This function returns a character value for the particular position.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;String Handling in | Java Part - 1&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/80pr-HluEOY&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;int
indexOf(char ch)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This function returns the index position of the particular character in the String.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;int
lastIndexOf(char ch)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This function returns the index position of the last occurrence of a character in a String.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;MsoNormalCxSpFirst&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;String substring(int start_index)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;This
function is used to extract a set of characters simultaneously from a given
index up to end of the string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;String substring(int start_index, int
last_index)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;It is
another modification of substring function. It will return a set of characters
simultaneously from start index up to the last index of the string (excluding
the character present at the last index).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;String toLowerCase()&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;This
function converts all the characters (if in upper case) of a given string into
lower case. If any character is already in lower case or is a special character
then it will remain same.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;String toUpperCase()&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;This
function converts all the characters (if in lower case) of a given string into
upper case. If any character is already in upper case or is a special character
then it will remain same.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;boolean isLowerCase()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;This
function is used to check whether all the characters of a given string are in
lower case or not. It returns boolean value true if all the characters are in
lower case, otherwise false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;b&gt;String Handling in | Java Part - 2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/lc_76tkivSk&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;boolean isUpperCase()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;This
function is used to check whether all the characters of a given string are in
upper case or not. It returns boolean value true if all the characters are in
upper case, otherwise false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;String concat(String s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This function is used to
concatenate (join) two strings together and returns in one string.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14.0pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;MsoNormalCxSpFirst&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;String replace(char old_char, char
new_char)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This
function is used to replace a character by another character in the given
string and returns a new string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;String replace(old_sequence_of_characters,
new_sequence_of_characters)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This
function is also used to replace a sequence of characters by another sequence
of characters at all its occurrences in the string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;boolean equals(String s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This
function is used to compare two strings together to check whether they are
identical or not. It returns a boolean type value true if both are same,
otherwise false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;boolean equalsIgnoreCase(String s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This
function is also used to compare two strings to check whether both are
identical or not after ignoring the case (i.e., corresponding upper and lower
case characters are treated to be the same). It also returns a boolean type
value as true or false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;int compareTo(String s)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This
function is also used to compare two strings. But, it not only checks the
equality of two strings but also checks whether a string is bigger or smaller
than the other. It will return 0 if both the strings are same, a negative value
if first string is smaller and a positive value if the first string is bigger.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; tab-stops: .25in;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;String Handling in Java | Part - 3&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/giFiDSx7bxA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;color: red; font-family: inherit;&quot;&gt;How to take String as input?&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;We can take String as input through either &lt;b&gt;main ()&lt;/b&gt; method or using &lt;b&gt;Scanner &lt;/b&gt;class. The procedure of taking input are given below:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: inherit;&quot;&gt;&lt;b&gt;Using main() method&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 1:&lt;/b&gt; write the codes like below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIjeaDGP_AME1Jp7-qwXrM0ojXPxbFo88aJEN40S1-hPrq5je5dsBHaJg13ymJBo2uZPKAuqh2MXQ5W8rFsFS8Sih3cV4p3vOZ8F1SECWIGtn3Vm5nDxhbU79F8pj7II_jWWHF2VXqocZR/s1600/string+1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;808&quot; height=&quot;111&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIjeaDGP_AME1Jp7-qwXrM0ojXPxbFo88aJEN40S1-hPrq5je5dsBHaJg13ymJBo2uZPKAuqh2MXQ5W8rFsFS8Sih3cV4p3vOZ8F1SECWIGtn3Vm5nDxhbU79F8pj7II_jWWHF2VXqocZR/s400/string+1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;b&gt;Step 2: &lt;/b&gt;At the time of taking input use double quotes (&quot; &quot;).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3v_uaqZu7D9AVUW9cbtRJfDmhAyjJP_rHBS1z1ZX-5uhOgKjmyOZ9TVqaI9FDz4hStU2znmfdXvL-el6VkK5WPMVAy5XavVRJx3G8-JOgGiTeMp00fusVDbrVIcibjUpPVSqJlikFx9Yg/s1600/string+2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;238&quot; data-original-width=&quot;371&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3v_uaqZu7D9AVUW9cbtRJfDmhAyjJP_rHBS1z1ZX-5uhOgKjmyOZ9TVqaI9FDz4hStU2znmfdXvL-el6VkK5WPMVAy5XavVRJx3G8-JOgGiTeMp00fusVDbrVIcibjUpPVSqJlikFx9Yg/s320/string+2.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;color: magenta; font-family: inherit;&quot;&gt;Using Scanner class&lt;/b&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Step 1:&lt;/b&gt;&amp;nbsp;Import the java class &lt;b&gt;java.util &lt;/b&gt;where the &lt;b&gt;Scanner&lt;/b&gt;&amp;nbsp;class is located.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import java.util.*;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Step 2: &lt;/b&gt;Create object of Scanner class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;color: blue; font-family: inherit;&quot;&gt;Scanner sc = new Scanner(System.in);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Here, &lt;b&gt;sc &lt;/b&gt;object is created of Scanner class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Step 3:&lt;/b&gt;&amp;nbsp;Use either &lt;b&gt;next()&lt;/b&gt;&amp;nbsp;method or &lt;b&gt;nextLine()&lt;/b&gt;&amp;nbsp;method with object of Scanner class, as your requirement. &lt;b&gt;next() &lt;/b&gt;method is for single word and &lt;b&gt;nextLine()&lt;/b&gt;&amp;nbsp;is for multiple words.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;color: blue; font-family: inherit;&quot;&gt;String s1 = sc.next();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;color: blue; font-family: inherit;&quot;&gt;String s2 = sc.nextLine();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Here, s1 will accept only one word and s2 will accept multiple words.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/1959114637630077188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/string-handling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1959114637630077188'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1959114637630077188'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/string-handling.html' title='String Handling'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWK0DYuyu8Ksalb-I4i8KwurXh4wXV5pUZVMMbL_VGbpfPtMK_-5HI5Ur5sELLDvMSGpGS5N5jEu8M79RtlilyDhD7yhICcu8nESPcgP3ssxQxBHB7vnNPEBqyt52FGNYsAWaXbdbCh126/s72-c/string.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3846313688195226786.post-1774317449812795943</id><published>2020-06-06T20:25:00.001+05:30</published><updated>2020-06-06T23:13:18.732+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Introduction to Object Oriented Programming (OOP)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; padding: 0in;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Class&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div align=&quot;center&quot; style=&quot;background: white; margin-bottom: .0001pt; margin: 0in; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;A class is a user defined blueprint or prototype from
which objects are created. &amp;nbsp;It represents the set of properties or methods
that are common to all objects of one type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpFirst&quot; style=&quot;line-height: 130%; tab-stops: .25in; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;background: white; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;border: 1pt none windowtext; padding: 0in;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin-bottom: 7.5pt; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;It is a basic
unit of Object Oriented Programming&amp;nbsp;and represents the real life entities.
&amp;nbsp;A typical Java program creates many objects, which as you know, interact
by invoking methods. An object consists of :&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin-bottom: 7.5pt; text-align: justify; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; padding: 0in;&quot;&gt;State&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;: It is represented by attributes of an object. It
also reflects the properties of an object.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; padding: 0in;&quot;&gt;Behavior&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: inherit; text-indent: -0.25in;&quot;&gt;: It is represented by methods of an object. It also
reflects the response of an object with other objects.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Let us
consider an example of real world class to understand the way different characteristics
and common behaviours are embedded in its objects.&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOwSFxkZpI0N3QLr2PUSnqGLFBZCYLHw-4Lnbh3iwjXvkKJqAzknr1wK6OU6QnPIfetzUPvPuQNLar_bGcqSQ43U97GYIBQ4YKtVGzaKeNtB37CEQgoHACqBID0JEWMSm4sRIoghS8xjUe/s1600/Intro+of+OOP.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;600&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOwSFxkZpI0N3QLr2PUSnqGLFBZCYLHw-4Lnbh3iwjXvkKJqAzknr1wK6OU6QnPIfetzUPvPuQNLar_bGcqSQ43U97GYIBQ4YKtVGzaKeNtB37CEQgoHACqBID0JEWMSm4sRIoghS8xjUe/s320/Intro+of+OOP.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrAFUKZTuKBI4zzUR8tO5YyII0VCCNWnWCupCmFUvuBywXNR25HGPmy2FCBu3VvfnW8Vsu9ogskVP1HjHB98tPFRsVcJQq8BGPp3HEvTSnwBVinmDcXVY7SkyaWXp9NKa6Ot1_H6odZtIa/s1600/Intro+of+OOP2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;401&quot; data-original-width=&quot;567&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrAFUKZTuKBI4zzUR8tO5YyII0VCCNWnWCupCmFUvuBywXNR25HGPmy2FCBu3VvfnW8Vsu9ogskVP1HjHB98tPFRsVcJQq8BGPp3HEvTSnwBVinmDcXVY7SkyaWXp9NKa6Ot1_H6odZtIa/s400/Intro+of+OOP2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: justify;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The syntax to create an
object in Java:&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;ClassName
ObjectName = new ClassName();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: 16.0pt;&quot;&gt;How to create objects of the
above mentioned class?&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: inherit; font-size: 13.0pt; line-height: 130%;&quot;&gt;Object 1:&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 130%;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TelevisionSet objSony = new TelevisionSet();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 130%;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 130%;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: inherit; font-size: 13.0pt; line-height: 130%;&quot;&gt;Object 2:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%;&quot;&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;



















&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 130%;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;TelevisionSet objLG = new TelevisionSet();&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Let us take an example
to understand as how software class and objects will be used for programming
purpose.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_H6wuglElWqT8sZOZlgGDuVdsbBU_cf2XkYXzX7Fno9zeiGDfA5kV7ig1oolf3u2PveJWQQ8n93aLhwpBI7Heb44sdtHCp9-txVZbk_A2yy9CB3NAzDiVpouRqj39vL94xbkL2fxPWKa/s1600/Intro+of+OOP3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;509&quot; data-original-width=&quot;479&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt_H6wuglElWqT8sZOZlgGDuVdsbBU_cf2XkYXzX7Fno9zeiGDfA5kV7ig1oolf3u2PveJWQQ8n93aLhwpBI7Heb44sdtHCp9-txVZbk_A2yy9CB3NAzDiVpouRqj39vL94xbkL2fxPWKa/s400/Intro+of+OOP3.JPG&quot; width=&quot;376&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In the structure shown above, the &lt;b&gt;class ‘Rectangle’ &lt;/b&gt;is designed with the &lt;b&gt;data members&lt;/b&gt; (i.e. states or attributes) – ‘&lt;b&gt;length and breadth’&lt;/b&gt; and &lt;b&gt;member
functions&lt;/b&gt; –‘&lt;b&gt;input(), calculate() and
display()’&lt;/b&gt;. The &lt;b&gt;objects&lt;/b&gt; can be
created as shown below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Object 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Rectangle Area = new Rectangle();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;&lt;u&gt;Object 2&lt;/u&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Rectangle Perimeter = new Rectangle();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The structure shown above, states when the objects
Area and Perimeter are created then each object will automatically possess the
data members and member function described within the class &lt;b&gt;Rectangle&lt;/b&gt;. The allocation of data
members pertaining to each object can be different but the function to be
carried on them will be common.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Hence,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Area.input()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;: will accept length and breadth of
object &lt;b&gt;Area&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Area.calculate ()&amp;nbsp;&amp;nbsp; : will perform calculations by using
length and breadth of object &lt;b&gt;Area&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Area.display()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;: will display the result of calculation
of object &lt;b&gt;Area&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit; line-height: 130%;&quot;&gt;





























&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Similarly, we can show the above tasks for the object &lt;b&gt;Perimeter&lt;/b&gt;.&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpMiddle&quot; style=&quot;line-height: 130%; text-align: left;&quot;&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Principles of Object Oriented Programming (OOP)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;tab-stops: 50.25pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: .25in; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: 50.25pt; text-align: justify; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;1)&lt;span style=&quot;font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;Data Abstraction&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
The
‘Data Abstraction’ is defined as an act of representing the essential features
without knowing background details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: 50.25pt; text-align: justify; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;2)&lt;span style=&quot;font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;Encapsulation&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
Wrapping
of data and functions of an object as a unit that can be used together in a
specific operation is known as ‘Encapsulation’.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: 50.25pt; text-align: justify; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;3)&lt;span style=&quot;font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;Inheritance&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
Inheritance
is the process in which objects of one class can link and share some common
properties from the objects of another class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: 50.25pt; text-align: justify; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;4)&lt;span style=&quot;font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;Polymorphism&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: justify;&quot;&gt;
Polymorphism
is the process of using a function for more than one purpose. It allows the use
of different internal structures of the objects by keeping the same external
interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h3 style=&quot;margin-left: .25in; mso-add-space: auto; tab-stops: 50.25pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;b&gt;&lt;u&gt;The advantages of OOP&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/h3&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 49.5pt; mso-add-space: auto; mso-list: l1 level1 lfo2; tab-stops: 50.25pt; text-indent: -31.5pt;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;symbol&amp;quot;;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Data values are
secured.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 49.5pt; mso-add-space: auto; mso-list: l1 level1 lfo2; tab-stops: 50.25pt; text-indent: -31.5pt;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;symbol&amp;quot;;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Mishandling of
data is protected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 49.5pt; mso-add-space: auto; mso-list: l1 level1 lfo2; tab-stops: 50.25pt; text-indent: -31.5pt;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;symbol&amp;quot;;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Error detection
and correction become easier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 49.5pt; mso-add-space: auto; mso-list: l1 level1 lfo2; tab-stops: 50.25pt; text-indent: -31.5pt;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;symbol&amp;quot;;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-stretch: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Easier in coding
complex programs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;h3 style=&quot;tab-stops: 50.25pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;b&gt;&lt;u&gt;Some
examples of OOP&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/h3&gt;
&lt;span style=&quot;line-height: 130%;&quot;&gt;















































&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Java, C++, Small Talk, Eiffel,
Python are some of the Object Oriented Programming Languages.&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://a2z-computer.blogspot.com/feeds/1774317449812795943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/introduction-to-object-oriented.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1774317449812795943'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3846313688195226786/posts/default/1774317449812795943'/><link rel='alternate' type='text/html' href='https://a2z-computer.blogspot.com/2020/06/introduction-to-object-oriented.html' title='Introduction to Object Oriented Programming (OOP)'/><author><name>Kuntal Mohan Roy</name><uri>http://www.blogger.com/profile/09895074083006390381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI8tN-q9mfqT7D7w-ePMzJAMl91-gBHNKTagQStw_pepE7zD1UbDqCa5d8bXKEN_8AgxYQRVzUp6_JdKoxdHGiYRiqkRNnSoiBE7OFRu_Se7XaN-Bga_jWJfLyVeji4w/s220/20170328_083250.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOwSFxkZpI0N3QLr2PUSnqGLFBZCYLHw-4Lnbh3iwjXvkKJqAzknr1wK6OU6QnPIfetzUPvPuQNLar_bGcqSQ43U97GYIBQ4YKtVGzaKeNtB37CEQgoHACqBID0JEWMSm4sRIoghS8xjUe/s72-c/Intro+of+OOP.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>