<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>classes and objects by Faizan Warsi</title>
      <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci</link>
      <description>Programming in Java</description>
      <language>en-us</language>
      <pubDate>2021-07-14 01:58:37 UTC</pubDate>
      <lastBuildDate>2021-07-19 03:52:44 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f5a5.png</url>
      </image>
      <item>
         <title>Prg of sales</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648583981</link>
         <description><![CDATA[<div><strong>import java.io.*;<br>class Sale_Commission<br>{<br>&nbsp; &nbsp; String Name;&nbsp;<br>&nbsp; &nbsp; double Monthlysale;&nbsp;<br>&nbsp; &nbsp; double commission=0.0d;<br>&nbsp; &nbsp; Sale_Commission(String str, double M)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; Name=str;<br>&nbsp; &nbsp; &nbsp; &nbsp; Monthlysale=M;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; private void calculate()<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; if(Monthlysale&gt;10000)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;commission=(10/100.0)*Monthlysale;<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;commission=(5/100.0)*Monthlysale;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; private void display()<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("NAME IS-"+ Name);<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("MONTHLY SALE IS-"+ Monthlysale);<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("COMMISSION IS-"+ commission);<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; void main()throws IOException<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; BufferedReader in=new BufferedReader(new InputStreamReader(System.in));<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("INPUT NAME AND MONTHLY SALE RESPECTIVELY-");<br>&nbsp; &nbsp; &nbsp; &nbsp; String S= in.readLine();<br>&nbsp; &nbsp; &nbsp; &nbsp; double N= Double.parseDouble(in.readLine());<br>&nbsp; &nbsp; &nbsp; &nbsp; Sale_Commission obj=new Sale_Commission(S,N);<br>&nbsp; &nbsp; &nbsp; &nbsp; obj.calculate();<br>&nbsp; &nbsp; &nbsp; &nbsp; obj.display();<br>&nbsp; &nbsp; }<br>}<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</strong></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-14 02:11:55 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648583981</guid>
      </item>
      <item>
         <title>Smith number</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648589386</link>
         <description><![CDATA[<div>i<strong>mport java.io.*;</strong></div><div><strong>Class Smith</strong></div><div><strong>{</strong></div><div><strong>Int n;</strong></div><div><strong>Smith(int a)</strong></div><div><strong>{</strong></div><div><strong>n=a;</strong></div><div><strong>}</strong></div><div><strong>Int sum_of_digits(int x)</strong></div><div><strong>{</strong></div><div><strong>Int s=0;</strong></div><div><strong>while(x!=0)</strong></div><div><strong>{</strong></div><div><strong>s=s+x%10;</strong></div><div><strong>x=x/10;</strong></div><div><strong>}</strong></div><div><strong>return s;</strong></div><div><strong>}</strong></div><div><strong>boolean ischeck()</strong></div><div><strong>{</strong></div><div><strong>Int s1=sum_of_digits(n);</strong></div><div><strong>Int s2=0;</strong></div><div><strong>Int i=2;</strong></div><div><strong>while(n&gt;1)</strong></div><div><strong>{</strong></div><div><strong>if(n%i==0)</strong></div><div><strong>{</strong></div><div><strong>s2=s2+sum_of_digits(i);</strong></div><div><strong>n=n/i;</strong></div><div><strong>}</strong></div><div><strong>else</strong></div><div><strong>{</strong></div><div><strong>I++;</strong></div><div><strong>}</strong></div><div><strong>}</strong></div><div><strong>if(s1==s2)</strong></div><div><strong>return true;</strong></div><div><strong>return false;</strong></div><div><strong>}</strong></div><div><strong>void display()</strong></div><div><strong>boolean t=ischeck();</strong></div><div><strong>if(t)</strong></div><div><strong>sopln(“Smith number”);</strong></div><div><strong>Else</strong></div><div><strong>sopln(“not Smith”);</strong></div><div><strong>}</strong></div><div><strong>Void main()throws IOException</strong></div><div><strong>{</strong></div><div><strong>BRin=new BR(new ISR(System.in));</strong></div><div><strong>Int p=Integer.parseInt(in.readLine());</strong></div><div><strong>Smith obj=new Smith(p);</strong></div><div><strong>obj.display();</strong></div><div><strong>}</strong></div><div><strong>}</strong></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-14 02:13:35 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648589386</guid>
      </item>
      <item>
         <title></title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648656843</link>
         <description><![CDATA[<div><strong>QUESTIONS</strong></div>]]></description>
         <enclosure url="https://docs.google.com/document/d/1q1W72PKRcd_5QiZx0PFIOEmhIoTjcIzRtqgbymdbulY/edit?usp=sharing" />
         <pubDate>2021-07-14 02:36:47 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648656843</guid>
      </item>
      <item>
         <title>PrimePalin</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648888533</link>
         <description><![CDATA[<div><strong>import java.io.*;<br>class PrimePalin<br>{<br>&nbsp; &nbsp; BufferedReader Br = new BufferedReader(new InputStreamReader(System.in));<br>&nbsp; &nbsp; int lower , Upper;<br>&nbsp; &nbsp; PrimePalin(int n , int N)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; lower = n ;<br>&nbsp; &nbsp; &nbsp; &nbsp; Upper = N;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; boolean palin(int x)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp;int x1 =0;<br>&nbsp; &nbsp; &nbsp; &nbsp; int sum = 0 ;<br>&nbsp; &nbsp; &nbsp; &nbsp; while(x!=0)<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int a = x%10;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum = sum*10+a;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x=x/10;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; if(x1 == sum )<br>&nbsp; &nbsp; return true;<br>&nbsp; &nbsp; else&nbsp;<br>&nbsp; &nbsp; return false;<br>}<br>boolean prime(int x)<br>{<br>&nbsp; &nbsp; int c = 0;<br>&nbsp; &nbsp; for(int i = 1 ;i&lt;=x ; i++)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; if(x%i==0)<br>&nbsp; &nbsp; &nbsp; &nbsp; c++;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; if(c==2)<br>&nbsp; &nbsp; return true ;<br>&nbsp; &nbsp; else&nbsp;<br>&nbsp; &nbsp; return false;<br>}<br>&nbsp; &nbsp; &nbsp; &nbsp;void display()<br>&nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int i = lower ;i&lt;=Upper ;i++)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if((prime(i) &amp;&amp; palin(i)))<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(i+" ");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; void main()throws IOException<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("enter lower limit");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int n1 = Integer.parseInt(Br.readLine());<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("enter upper limit");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int n2 = Integer.parseInt(Br.readLine());<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PrimePalin&nbsp; obj = new PrimePalin(n1 , n2);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; obj.display();<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp;&nbsp;</strong></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-14 04:30:01 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1648888533</guid>
      </item>
      <item>
         <title>Magic number</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1650804748</link>
         <description><![CDATA[<div>//<strong>HARSHIT SRIVASTAVA<br>import java.io.*;<br>class Magic<br>{<br>&nbsp; &nbsp; int Num;<br>&nbsp; &nbsp; BufferedReader in=new BufferedReader(new InputStreamReader(System.in));<br>&nbsp; &nbsp; Magic()<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; Num=0;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; void input()throws IOException<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; Num=Integer.parseInt(in.readLine());<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; int sumDigit(int x)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; int Sum=0;<br>&nbsp; &nbsp; &nbsp; &nbsp; for( ;x!=0; x=x/10)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Sum=Sum+(x%10);<br>&nbsp; &nbsp; &nbsp; &nbsp; return Sum;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; void isMagic()<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; while(Num&gt;9)<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Num=sumDigit(Num);<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; if(Num==1)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("IT IS A MAGIC NUMBER");<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println("IT IS NOT A MAGIC NUMBER");<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; void main()throws IOException<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; Magic obj=new Magic();<br>&nbsp; &nbsp; &nbsp; &nbsp; obj.input();<br>&nbsp; &nbsp; &nbsp; &nbsp; obj.isMagic();<br>&nbsp; &nbsp; }<br>}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</strong></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-15 06:14:44 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1650804748</guid>
      </item>
      <item>
         <title>seriessum(sujal)</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1653168064</link>
         <description><![CDATA[<div><strong>import java.io.*;</strong></div><div><strong>class seriessum</strong></div><div><strong>{</strong></div><div><strong>&nbsp; &nbsp; BufferedReader Br = new BufferedReader(new InputStreamReader(System.in));</strong></div><div><strong>&nbsp; &nbsp; int n ,x ;</strong></div><div><strong>&nbsp; &nbsp; double sum ;&nbsp;</strong></div><div><strong>&nbsp; &nbsp; seriessum()</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; n = 0 ;&nbsp;</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; x = 0 ;</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; sum = 0;</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><br></div><div><strong>&nbsp; &nbsp; int factorial(int a)</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; int f = 1 ;</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 1 ; i&lt;=a ;i++)</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f = f *i;</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; return f;</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><br></div><div><strong>&nbsp; &nbsp; double term(int p , int q)</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; double Term = p/factorial(q);</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; return Term;</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><br></div><div><strong>&nbsp; &nbsp; void accept()throws IOException</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("input the value of x");</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; x = Integer.parseInt(Br.readLine());</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("input the limit of series");</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; n = Integer.parseInt(Br.readLine());</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><br></div><div><strong>&nbsp; &nbsp; double calsum()</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; for(int i = 1 ; i&lt;=n ;i++)</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum = sum + term((int)Math.pow(x,2*i-1) , i);</strong></div><div><strong>&nbsp; &nbsp; &nbsp; return sum</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><br></div><div><strong>&nbsp; &nbsp; void main()throws IOException</strong></div><div><strong>&nbsp; &nbsp; {</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; seriessum obj = new seriessum();</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; obj.accept();</strong></div><div><strong>&nbsp; &nbsp; &nbsp; &nbsp; obj.display());</strong></div><div><strong>&nbsp; &nbsp; }</strong></div><div><strong>}</strong></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-17 04:23:31 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1653168064</guid>
      </item>
      <item>
         <title>automorphic</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1654286930</link>
         <description><![CDATA[<div>//BIWAN  VAIBHAV<br><strong><em>class automorphicnumber<br>{<br>&nbsp; &nbsp; void main(int Num)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; int Denom=1,Sqr=Num*Num, Temp=Num;<br>&nbsp; &nbsp; &nbsp; &nbsp; while(Num!=0)<br>&nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Num=Num/10;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Denom=Denom*10;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; if(Sqr%Denom==Temp)<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Automorphic Number");<br>&nbsp; &nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Not a Automorphic Number");<br>&nbsp; &nbsp; }<br>}<br></em></strong><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-19 03:40:44 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1654286930</guid>
      </item>
      <item>
         <title>ARMSTRONG NUMBER</title>
         <author>faizanwarsi</author>
         <link>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1654300697</link>
         <description><![CDATA[<div><strong><br>//Divyansh(Armstrong number)<br>class armstrong<br>{<br>&nbsp; void main(int num)<br>&nbsp; {<br>&nbsp; &nbsp;int a=0;int cube=1;int sum=0;int temp=num;<br>&nbsp; &nbsp;while(num!=0)<br>{<br>a=num%10;<br>cube=a*a*a;<br>num=num/10;<br>sum+=cube;<br>}<br>if(temp==sum)<br>System.out.println("armstrong");<br>else<br>System.out.println("NOT A ARMSTRONG NUMBER");<br>}<br>}<br></strong><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-07-19 03:52:25 UTC</pubDate>
         <guid>https://padlet.com/faizanwarsi/wj5zcxt1fkuym8ci/wish/1654300697</guid>
      </item>
   </channel>
</rss>
