<?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-162850788350934027</id><updated>2024-11-08T07:39:55.189-08:00</updated><category term="Java"/><category term="SAP"/><category term="Java Programming"/><category term="C++"/><category term="IT223 Resources"/><category term="Machine Progs"/><category term="Processors"/><category term="Health Concern"/><category term="Excel"/><category term="Inspirational Stories"/><category term="Visual Basic"/><category term="edmodo"/><category term="Comp. Org."/><category term="OS"/><category term="Pacquiao"/><category term="A Gift of Fire"/><category term="ISM313"/><category term="IT111"/><category term="xml"/><category term="File Structure"/><category term="Funny Staff"/><category term="Intro to computing"/><category term="Modeling and Simulation"/><category term="Personality"/><category term="SAD"/><category term="ms access"/><title type='text'>Info. Source of ite</title><subtitle type='html'>Info. Tech. Lecture Slides, Assignments, Quizzes, Lab Slides</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>235</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-5311633639424363564</id><published>2021-05-24T00:20:00.004-07:00</published><updated>2021-05-24T00:22:38.203-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>SUM OF ARRAY LIST</title><content type='html'>&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/AVvXsEh_OQM9QeFXDTvHTMIvtoE27d7mHdX3Va53pFN3Bf4aFNsDROvKmUeHmvcYVblP66xr_woxWBjkj4SsVSm62fAAhL7bA8M7P-iXPgSizGaidV7xMZB9AHk7519s-gRJYb1kNxeLp3Hk-qIR/s1280/SUM+OF+ARRAY+LIST.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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_OQM9QeFXDTvHTMIvtoE27d7mHdX3Va53pFN3Bf4aFNsDROvKmUeHmvcYVblP66xr_woxWBjkj4SsVSm62fAAhL7bA8M7P-iXPgSizGaidV7xMZB9AHk7519s-gRJYb1kNxeLp3Hk-qIR/s320/SUM+OF+ARRAY+LIST.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;SUM OF ARRAY LIST&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.ArrayList;

public class array_list_sum 
{
  public static ArrayList&amp;lt;Double&amp;gt; array_list_sum(ArrayList&amp;lt;Double&amp;gt; x, ArrayList&amp;lt;Double&amp;gt; y)
  {
    if (x.size() != y.size())
    {
      return null;
    }
    
    ArrayList&amp;lt;Double&amp;gt; result = new ArrayList&amp;lt;Double&amp;gt;();
    for (int i = 0; i &amp;lt; x.size(); i++)
    {
      double temp = x.get(i) + y.get(i);
      result.add(temp);
    }
    
    return result;
  }    
  
  public static void main(String[] args)   
  {
    ArrayList&amp;lt;Double&amp;gt; a = new ArrayList&amp;lt;Double&amp;gt;();
    a.add(1.0);
    a.add(2.0);
    a.add(3.0);
    
    ArrayList&amp;lt;Double&amp;gt; b = new ArrayList&amp;lt;Double&amp;gt;();
    b.add(10.0);
    b.add(11.0);
    b.add(12.0);
    
    ArrayList&amp;lt;Double&amp;gt; c = array_list_sum(a, b);
    System.out.println(c);
  }  
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/5311633639424363564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/sum-of-array-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5311633639424363564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5311633639424363564'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/sum-of-array-list.html' title='SUM OF ARRAY LIST'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_OQM9QeFXDTvHTMIvtoE27d7mHdX3Va53pFN3Bf4aFNsDROvKmUeHmvcYVblP66xr_woxWBjkj4SsVSm62fAAhL7bA8M7P-iXPgSizGaidV7xMZB9AHk7519s-gRJYb1kNxeLp3Hk-qIR/s72-c/SUM+OF+ARRAY+LIST.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-3628520468579784463</id><published>2021-05-22T06:04:00.003-07:00</published><updated>2021-05-22T06:04:41.990-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Java Programming Array List Part 3 | Java Programming Tutorial for Begin...</title><content type='html'>&lt;iframe style=&quot;background-image:url(https://i.ytimg.com/vi/uatdLQDSJ20/hqdefault.jpg)&quot;  width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/uatdLQDSJ20&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/3628520468579784463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/java-programming-array-list-part-3-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3628520468579784463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3628520468579784463'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/java-programming-array-list-part-3-java.html' title='Java Programming Array List Part 3 | Java Programming Tutorial for Begin...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/uatdLQDSJ20/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-5971051622024458488</id><published>2021-05-18T19:01:00.001-07:00</published><updated>2021-05-18T19:01:06.541-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Array List Sum</title><content type='html'>&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/AVvXsEi0MLeSBnC9ICj5Y7XrlLWz8PG80d2W0jtTuwODq-Xn2wndyLm6i-zFi1OWr7Xv_qBgTrb9UEnbx6STwIZkrFa-v8sIo3SBpJNKQAv4u2B5hFkfVdUg60gnratvMqfmcYwgfxX-I5jmBU8C/s1280/ArrayList+Java+programming+eclipse+getting+sum+of+arraylist.png&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;720&quot; data-original-width=&quot;1280&quot; height=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0MLeSBnC9ICj5Y7XrlLWz8PG80d2W0jtTuwODq-Xn2wndyLm6i-zFi1OWr7Xv_qBgTrb9UEnbx6STwIZkrFa-v8sIo3SBpJNKQAv4u2B5hFkfVdUg60gnratvMqfmcYwgfxX-I5jmBU8C/w400-h0/ArrayList+Java+programming+eclipse+getting+sum+of+arraylist.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.ArrayList;

public class array_list_sum 
{
  public static ArrayList&amp;lt;Double&amp;gt; array_list_sum(ArrayList&amp;lt;Double&amp;gt; x, ArrayList&amp;lt;Double&amp;gt; y)
  {
    if (x.size() != y.size())
    {
      return null;
    }
    
    ArrayList&amp;lt;Double&amp;gt; result = new ArrayList&amp;lt;Double&amp;gt;();
    for (int i = 0; i &amp;lt; x.size(); i++)
    {
      double temp = x.get(i) + y.get(i);
      result.add(temp);
    }
    
    return result;
  }    
  
  public static void main(String[] args)   
  {
    ArrayList&amp;lt;Double&amp;gt; a = new ArrayList&amp;lt;Double&amp;gt;();
    a.add(1.0);
    a.add(2.0);
    a.add(3.0);
    
    ArrayList&amp;lt;Double&amp;gt; b = new ArrayList&amp;lt;Double&amp;gt;();
    b.add(10.0);
    b.add(11.0);
    b.add(12.0);
    
    ArrayList&amp;lt;Double&amp;gt; c = array_list_sum(a, b);
    System.out.println(c);
  }  
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/5971051622024458488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/array-list-sum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5971051622024458488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5971051622024458488'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/array-list-sum.html' title='Array List Sum'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0MLeSBnC9ICj5Y7XrlLWz8PG80d2W0jtTuwODq-Xn2wndyLm6i-zFi1OWr7Xv_qBgTrb9UEnbx6STwIZkrFa-v8sIo3SBpJNKQAv4u2B5hFkfVdUg60gnratvMqfmcYwgfxX-I5jmBU8C/s72-w400-h0-c/ArrayList+Java+programming+eclipse+getting+sum+of+arraylist.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-4031706097912478686</id><published>2021-05-18T18:53:00.002-07:00</published><updated>2021-05-18T18:56:34.935-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Array List | Matrix Average | Nested For Loop | Java Programming</title><content type='html'>&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/AVvXsEj2S0J4NjVaP9h00cm4vexykFfxOnCuTOHN0PHN9EeJuzUwhSGlnFhmssZPKozpokRqnHLyWHIz_WtMN7j1_hSVCB08LPEvQld4k5SnEAbrZlk3Qix61EaVJLp9m75udBgzaezAl8EyehV0/s1280/arraylist+nested+forloop+java+programming+eclipse.png&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;720&quot; data-original-width=&quot;1280&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2S0J4NjVaP9h00cm4vexykFfxOnCuTOHN0PHN9EeJuzUwhSGlnFhmssZPKozpokRqnHLyWHIz_WtMN7j1_hSVCB08LPEvQld4k5SnEAbrZlk3Qix61EaVJLp9m75udBgzaezAl8EyehV0/w640-h360/arraylist+nested+forloop+java+programming+eclipse.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;------------------------&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;public class matrix_average {
  public static double average(double[][] matrix)
  {
    // First compute the sum
    double sum = 0.0;
    double number_of_entries = 0;
    for (int i = 0; i &amp;lt; matrix.length; i++)
    {
      number_of_entries += matrix[i].length;
      for (int j = 0; j &amp;lt; matrix[i].length; j++)
      {
        sum = sum + matrix[i][j];
      }
    }
    
    // Then divide the sum by the number of values in the matrix.
    double result = sum / number_of_entries;
    return result;
  }
  
  public static double column_average(double[][] matrix, int col)
  {
    // first compute the sum of values in that column
    double sum = 0;
    double number_of_values = 0;
    for (int i = 0; i &amp;lt; matrix.length; i++)
    {
      if (col &amp;lt; matrix[i].length)
      {
        sum = sum + matrix[i][col];
        number_of_values = number_of_values + 1;
      }
    }
    
    // then divide the sum by the number of values in that column
    double result = sum / number_of_values;
    return result;
  }
  
  public static void main(String[] args)   
  {
    double[][] a = { {3.2, 2.1, 5.3},
                     {8.0, 4.9, 5.7, 4.1} };

    double result = average(a);
    System.out.printf(&quot;average(a) = %.1f\n&quot;, result);
    result = column_average(a, 2);
    System.out.printf(&quot;column_average(a, 2) = %.1f\n&quot;, result);
  }  
}&lt;/pre&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/AVvXsEjZniiNPywODTgGr0f7a0zvlZ0Kzy2ScPvLMHdythXq8bx0StB4hYXG9PlNuoYilin72OD87UEj01Ii73hjN2ru2h2jjsoKHVA6KS4c70cyoGMeBMJzAQDP7e_VBbGh5CD6_vN4pDEDgk0d/s1280/arraylist+nested+forloop+java+programming+eclipse.png&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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZniiNPywODTgGr0f7a0zvlZ0Kzy2ScPvLMHdythXq8bx0StB4hYXG9PlNuoYilin72OD87UEj01Ii73hjN2ru2h2jjsoKHVA6KS4c70cyoGMeBMJzAQDP7e_VBbGh5CD6_vN4pDEDgk0d/s320/arraylist+nested+forloop+java+programming+eclipse.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/4031706097912478686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/array-list-matrix-average-nested-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/4031706097912478686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/4031706097912478686'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/array-list-matrix-average-nested-for.html' title='Array List | Matrix Average | Nested For Loop | Java Programming'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2S0J4NjVaP9h00cm4vexykFfxOnCuTOHN0PHN9EeJuzUwhSGlnFhmssZPKozpokRqnHLyWHIz_WtMN7j1_hSVCB08LPEvQld4k5SnEAbrZlk3Qix61EaVJLp9m75udBgzaezAl8EyehV0/s72-w640-h360-c/arraylist+nested+forloop+java+programming+eclipse.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-8914531521250118045</id><published>2021-05-17T21:18:00.002-07:00</published><updated>2021-05-17T21:18:36.815-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Java Programming Array List Part 2 | Java Programming Tutorial for Begin...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/ks2ufZgdW8A&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/8914531521250118045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/java-programming-array-list-part-2-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8914531521250118045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8914531521250118045'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/java-programming-array-list-part-2-java.html' title='Java Programming Array List Part 2 | Java Programming Tutorial for Begin...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/ks2ufZgdW8A/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-8492630649492405089</id><published>2021-05-16T05:22:00.002-07:00</published><updated>2021-05-16T05:22:24.064-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Part 1- ArrayList | Java Programming Tutorial for Beginners using Eclips...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/tB4mthT802U&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/8492630649492405089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/part-1-arraylist-java-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8492630649492405089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8492630649492405089'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/part-1-arraylist-java-programming.html' title='Part 1- ArrayList | Java Programming Tutorial for Beginners using Eclips...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/tB4mthT802U/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-918357096812737380</id><published>2021-05-15T17:59:00.002-07:00</published><updated>2021-05-15T17:59:09.216-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Arraylist - Finding Smallest and Largest number of an N numbers</title><content type='html'>&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&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/AVvXsEgvRnRnz0kZA-jk8ZM1EkdO851fbjiz05LS5pdNTWB8_NhQd4Q_jobR2P8sfjABu-PoH0XF55LLxMS3keeUV6tAJLG1UgeWoO6SloOLe8mSk3hYhbu130NMrw4GrVMVP-4Woy_aWZkvXOfp/s1280/ArrayList+%25E2%2580%2593+Finding+the+smallest+and+largest+number.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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvRnRnz0kZA-jk8ZM1EkdO851fbjiz05LS5pdNTWB8_NhQd4Q_jobR2P8sfjABu-PoH0XF55LLxMS3keeUV6tAJLG1UgeWoO6SloOLe8mSk3hYhbu130NMrw4GrVMVP-4Woy_aWZkvXOfp/s320/ArrayList+%25E2%2580%2593+Finding+the+smallest+and+largest+number.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;Finding smallest and largest Number using&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;1. Arraylist&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;2. methods&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.Scanner;
import java.util.ArrayList;

public class read_n_numbers_array_list3
{
public static int find_min(ArrayList&amp;lt;Integer&amp;gt; values)
{
  int result = values.get(0);
  for (int i = 0; i &amp;lt; values.size(); i++)
  {
    if (values.get(i) &amp;lt; result)
    {
      result = values.get(i);
    }
  }
  return result;
}

public static int find_max(ArrayList&amp;lt;Integer&amp;gt; values)
{
  int result = values.get(0);
  for (int i = 0; i &amp;lt; values.size(); i++)
  {
    if (values.get(i) &amp;gt; result)
    {
      result = values.get(i);
    }
  }
  return result;
}

public static ArrayList&amp;lt;Integer&amp;gt; user_integers()
  {
    Scanner in = new Scanner(System.in);
    ArrayList&amp;lt;Integer&amp;gt; result = new ArrayList&amp;lt;Integer&amp;gt;();

    while(true)
    {
      System.out.printf(&quot;Enter a number, or q to quit: &quot;);
      String input = in.next();
      if (input.equals(&quot;q&quot;))
      {
        return result;
      }
      int number = Integer.parseInt(input);
      result.add(number);
    }
  }
&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;public static void main(String[] args) 
{
  ArrayList&amp;lt;Integer&amp;gt; numbers = user_integers();
  int smallest = find_min(numbers);
  int largest = find_max(numbers);
  System.out.printf(&quot;\n&quot;);
  for (int i = 0; i &amp;lt; numbers.size(); i++)
  {
    System.out.printf(&quot;position %d: %d&quot;, i, numbers.get(i));
    if (numbers.get(i) == smallest)
    {
      System.out.printf(&quot; *** smallest value ***\n&quot;);
    }
    else if (numbers.get(i) == largest)
    {
      System.out.printf(&quot; *** largest value ***\n&quot;);
    }
    else
    {
      System.out.printf(&quot;\n&quot;);
    }
  }
}
}  &lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/918357096812737380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/arraylist-finding-smallest-and-largest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/918357096812737380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/918357096812737380'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/arraylist-finding-smallest-and-largest.html' title='Arraylist - Finding Smallest and Largest number of an N numbers'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvRnRnz0kZA-jk8ZM1EkdO851fbjiz05LS5pdNTWB8_NhQd4Q_jobR2P8sfjABu-PoH0XF55LLxMS3keeUV6tAJLG1UgeWoO6SloOLe8mSk3hYhbu130NMrw4GrVMVP-4Woy_aWZkvXOfp/s72-c/ArrayList+%25E2%2580%2593+Finding+the+smallest+and+largest+number.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-8577907346809228797</id><published>2021-05-13T17:58:00.003-07:00</published><updated>2021-05-13T17:58:34.908-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Finding the smallest and the largest number using Array - Java Eclipse</title><content type='html'>&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/AVvXsEhWVUZwOapVExZ5Pfo93FRehZPqo2OYcOuI9o9tWdyElQRRVBT4_8NvLWTGMZghdFKJi-c7hgKKybkeGPkkxs5wbLxVnG_r6Cyenf7lkJeMGYwHZowNDNJive69B0DwDQHth6BujCcIGqKR/s1280/Finding+the+smallest+and+largest+number+using+array.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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWVUZwOapVExZ5Pfo93FRehZPqo2OYcOuI9o9tWdyElQRRVBT4_8NvLWTGMZghdFKJi-c7hgKKybkeGPkkxs5wbLxVnG_r6Cyenf7lkJeMGYwHZowNDNJive69B0DwDQHth6BujCcIGqKR/s320/Finding+the+smallest+and+largest+number+using+array.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.Scanner;

public class read_n_numbers3
{
  public static int[] user_integers()
  {
    Scanner in = new Scanner(System.in);
    System.out.printf(&quot;Enter N: &quot;);
    int N = in.nextInt();
    
    int[] result = new int[N];
    for (int i = 0; i &amp;lt; N; i++)
    {
      System.out.printf(&quot;Enter value %d: &quot;, i);
      result[i] = in.nextInt();
    }

    return result;
  }

  public static int find_min(int[] values)
  {
    int result = values[0];
    for (int i = 0; i &amp;lt; values.length; i++)
    {
      if (values[i] &amp;lt; result)
      {
        result = values[i];
      }
    }
    return result;
  }
  
  public static int find_max(int[] values)
  {
    int result = values[0];
    for (int i = 0; i &amp;lt; values.length; i++)
    {
      if (values[i] &amp;gt; result)
      {
        result = values[i];
      }
    }
    return result;
  }
  
public static void main(String[] args) 
{
  int[] numbers = user_integers();
  int smallest = find_min(numbers);
  int largest = find_max(numbers);
  System.out.printf(&quot;\n&quot;);
  for (int i = 0; i &amp;lt; numbers.length; i++)
  {
    System.out.printf(&quot;numbers[%d] = %d&quot;, i, numbers[i]);
    if (numbers[i] == smallest)
    {
      System.out.printf(&quot; *** smallest value ***\n&quot;);
    }
    else if (numbers[i] == largest)
    {
      System.out.printf(&quot; *** largest value ***\n&quot;);
    }
    else
    {
      System.out.printf(&quot;\n&quot;);
    }
  }
}
}  &lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/8577907346809228797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/finding-smallest-and-largest-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8577907346809228797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8577907346809228797'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/finding-smallest-and-largest-number.html' title='Finding the smallest and the largest number using Array - Java Eclipse'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWVUZwOapVExZ5Pfo93FRehZPqo2OYcOuI9o9tWdyElQRRVBT4_8NvLWTGMZghdFKJi-c7hgKKybkeGPkkxs5wbLxVnG_r6Cyenf7lkJeMGYwHZowNDNJive69B0DwDQHth6BujCcIGqKR/s72-c/Finding+the+smallest+and+largest+number+using+array.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-5923165190528382307</id><published>2021-05-10T21:19:00.002-07:00</published><updated>2021-05-10T21:19:58.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Single Dimensional Array | Java Programming Tutorial for Beginners using...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/JCQ0QxyNAd0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/5923165190528382307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/single-dimensional-array-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5923165190528382307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5923165190528382307'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/single-dimensional-array-java.html' title='Single Dimensional Array | Java Programming Tutorial for Beginners using...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JCQ0QxyNAd0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2329567276558227753</id><published>2021-05-10T00:38:00.003-07:00</published><updated>2021-05-10T00:38:57.577-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Top 5 programming language to learn in 2021</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/cATDvFgYVJ0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2329567276558227753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/top-5-programming-language-to-learn-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2329567276558227753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2329567276558227753'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/top-5-programming-language-to-learn-in.html' title='Top 5 programming language to learn in 2021'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/cATDvFgYVJ0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-8331334192327784239</id><published>2021-05-09T00:40:00.008-07:00</published><updated>2021-05-09T01:10:43.104-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Guesing Java Programming Code</title><content type='html'>&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/AVvXsEiCC37bqpG6AdlxygSMfzMTmBRrojyhEkRkyOXm8a8MfrIATJt9L5R6JHhkPqRuLXs0MIp0HDO9ObZYR4nLfBoS9UgW_vPIBNjKCLaHWje_-88JpDK2n-LVG7ZDhp10IbFQQJfFsjM12eML/s1280/Edmodo+tutorial+for+teachers+2021.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCC37bqpG6AdlxygSMfzMTmBRrojyhEkRkyOXm8a8MfrIATJt9L5R6JHhkPqRuLXs0MIp0HDO9ObZYR4nLfBoS9UgW_vPIBNjKCLaHWje_-88JpDK2n-LVG7ZDhp10IbFQQJfFsjM12eML/s320/Edmodo+tutorial+for+teachers+2021.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;A program that will gues a random numbers&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;/* This program picks a random number, from zero up to and including 100.&lt;/pre&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;   Then, the user tries to guess the number.
   After every guess, the system tells the user if the guess was correct,
   or should be higher or should be lower.
*/
import java.util.*;

public class guessing_game
{

  public static void main(String[] args)
  {
    Scanner in = new Scanner(System.in);
    Random rand = new Random();
    int pick = rand.nextInt(101); // Between 0 and 100.
    int attempt = 1;

    while (true)
    {
      System.out.printf(&quot;Try %d: Guess the number: &quot;, attempt);
      int guess = in.nextInt();
      if (guess == pick)
      {
        System.out.printf(&quot;Correct!!!\n&quot;);
        break;
      } 
      else
      {
        if (guess &amp;lt; pick)
        {
          System.out.printf(&quot;Go higher.\n&quot;);
        } else
        {
          System.out.printf(&quot;Go lower.\n&quot;);
        }
      }
      attempt++;
    }
  }
}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/8331334192327784239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/guesing-java-programming-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8331334192327784239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8331334192327784239'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/guesing-java-programming-code.html' title='Guesing Java Programming Code'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCC37bqpG6AdlxygSMfzMTmBRrojyhEkRkyOXm8a8MfrIATJt9L5R6JHhkPqRuLXs0MIp0HDO9ObZYR4nLfBoS9UgW_vPIBNjKCLaHWje_-88JpDK2n-LVG7ZDhp10IbFQQJfFsjM12eML/s72-c/Edmodo+tutorial+for+teachers+2021.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2949467125357285487</id><published>2021-05-06T21:46:00.003-07:00</published><updated>2021-05-06T21:46:58.723-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Arrays | Array Lists | Java Programming Tutorial for Beginners using Ecl...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/nRaATWRcO2U&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2949467125357285487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/arrays-array-lists-java-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2949467125357285487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2949467125357285487'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/arrays-array-lists-java-programming.html' title='Arrays | Array Lists | Java Programming Tutorial for Beginners using Ecl...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/nRaATWRcO2U/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2633549968472397230</id><published>2021-05-05T18:48:00.001-07:00</published><updated>2021-05-05T18:48:06.084-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Vowels and Consonants | Java Programming Tutorial for Beginners using Ec...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/danFCiLzdsU&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2633549968472397230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/vowels-and-consonants-java-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2633549968472397230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2633549968472397230'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/vowels-and-consonants-java-programming.html' title='Vowels and Consonants | Java Programming Tutorial for Beginners using Ec...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/danFCiLzdsU/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-229143992692744049</id><published>2021-05-04T18:08:00.005-07:00</published><updated>2021-05-04T18:08:49.403-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>hasVowelsl Boolean Return Type | Java Programming Tutorial for Beginners...</title><content type='html'>&lt;iframe frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/UBtrQUFyKFw&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;public class LoopExercise {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;public static void main(String[] args) {&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt; //Counter variable to store the count of vowels and consonant&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int vCount = 0, cCount = 0;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Declare a string&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String str = &quot;This is a really simple sentence&quot;;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Converting entire string to lower case to reduce the comparisons&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; str = str.toLowerCase();&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; str.length(); i++) {&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Checks whether a character is a vowel&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(str.charAt(i) == &#39;a&#39; || str.charAt(i) == &#39;e&#39;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;|| str.charAt(i) == &#39;i&#39; || str.charAt(i) == &#39;o&#39;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;|| str.charAt(i) == &#39;u&#39;) {&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Increments the vowel counter&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vCount++;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Checks whether a character is a consonant&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if(str.charAt(i) &amp;gt;= &#39;a&#39; &amp;amp;&amp;amp; str.charAt(i)&amp;lt;=&#39;z&#39;) {&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Increments the consonant counter&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cCount++;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Number of vowels: &quot; + vCount);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Number of consonants: &quot; + cCount);&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; }&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/229143992692744049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/hasvowelsl-boolean-return-type-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/229143992692744049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/229143992692744049'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/hasvowelsl-boolean-return-type-java.html' title='hasVowelsl Boolean Return Type | Java Programming Tutorial for Beginners...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/UBtrQUFyKFw/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-7762837038407876149</id><published>2021-05-01T15:40:00.002-07:00</published><updated>2021-05-01T15:40:15.807-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>Methods Practice Problem | Java Programming Tutorial for Beginners using...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/cnBWkMeL0XI&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/7762837038407876149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/05/methods-practice-problem-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/7762837038407876149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/7762837038407876149'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/05/methods-practice-problem-java.html' title='Methods Practice Problem | Java Programming Tutorial for Beginners using...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/cnBWkMeL0XI/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-34984848639891729</id><published>2021-04-29T17:22:00.002-07:00</published><updated>2021-04-29T17:22:13.923-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>JAVA PROGRAMMING: hasVowels2 sample code</title><content type='html'>&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/AVvXsEj_wCmuGp98DOJivUtygBDB2fmmrQfBte3qvtMPP1LD7KVrGkxSeSEwgzf4AJsehJa_X-GmTuOl4NyN0HLva6aVCWJ25axeKSksZFG9ENFIUXFG0FFOKRLkIrjq-_oIcy3SZWZc0ksJerkA/s1280/Edmodo+tutorial+for+teachers+2021+%25283%2529.png&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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_wCmuGp98DOJivUtygBDB2fmmrQfBte3qvtMPP1LD7KVrGkxSeSEwgzf4AJsehJa_X-GmTuOl4NyN0HLva6aVCWJ25axeKSksZFG9ENFIUXFG0FFOKRLkIrjq-_oIcy3SZWZc0ksJerkA/s320/Edmodo+tutorial+for+teachers+2021+%25283%2529.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;Definition and Usage&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: Verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;The&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;indexOf()&lt;/code&gt;&amp;nbsp;method returns the position of the first occurrence of specified character(s) in a string.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: Verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;Tip:&lt;/span&gt;&amp;nbsp;Use the&amp;nbsp;&lt;a href=&quot;https://www.w3schools.com/java/ref_string_lastindexof.asp&quot; style=&quot;background-color: transparent; box-sizing: inherit;&quot;&gt;lastIndexOf&lt;/a&gt;&amp;nbsp;method to return the position of the&amp;nbsp;&lt;span style=&quot;box-sizing: inherit; font-weight: bolder;&quot;&gt;last&lt;/span&gt;&amp;nbsp;occurrence of specified character(s) in a string.&lt;/p&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-family: Verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;Syntax&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: Verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;There are 4 indexOf() methods:&lt;/p&gt;&lt;pre class=&quot; language-java&quot; style=&quot;background: rgb(241, 241, 241); box-sizing: inherit; font-family: Consolas, &amp;quot;Source Code Pro&amp;quot;, Menlo, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 15px; hyphens: none; line-height: 1.5; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; tab-size: 2; word-break: normal;&quot;&gt;&lt;code class=&quot; language-java&quot; style=&quot;background: none; box-sizing: inherit; font-family: Consolas, &amp;quot;Source Code Pro&amp;quot;, Menlo, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 1em; hyphens: none; line-height: 1.5; overflow-wrap: normal; tab-size: 2; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;String&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;str&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;String&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;str&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;fromIndex&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token keyword keyword-char&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;char&lt;/em&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token keyword keyword-char&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;char&lt;/em&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;fromIndex&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;Parameter Values&lt;/h2&gt;&lt;table class=&quot;w3-table-all notranslate&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: Verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 804px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 168.667px;&quot;&gt;Parameter&lt;/th&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px; text-align: left; vertical-align: top;&quot;&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #f1f1f1; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;str&lt;/em&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;A&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;String&lt;/code&gt;&amp;nbsp;value, representing the string to search for&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;fromIndex&lt;/em&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;An&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;int&lt;/code&gt;&amp;nbsp;value, representing the index position to start the search from&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;background-color: #f1f1f1; border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; vertical-align: top;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;char&lt;/em&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;An&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;int&lt;/code&gt;&amp;nbsp;value, representing a single character, e.g &#39;A&#39;, or a Unicode value&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;Technical Details&lt;/h2&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;table class=&quot;w3-table-all&quot; style=&quot;background-color: white; border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(204, 204, 204); box-sizing: inherit; color: black; font-family: Verdana, sans-serif; font-size: 15px; margin: 20px 0px; width: 804px;&quot;&gt;&lt;tbody style=&quot;box-sizing: inherit;&quot;&gt;&lt;tr style=&quot;border-bottom: 1px solid rgb(221, 221, 221); box-sizing: inherit;&quot;&gt;&lt;th style=&quot;box-sizing: inherit; padding: 8px 8px 8px 16px; text-align: left; vertical-align: top; width: 168.667px;&quot;&gt;Returns:&lt;/th&gt;&lt;td style=&quot;box-sizing: inherit; padding: 8px; vertical-align: top;&quot;&gt;An&amp;nbsp;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;int&lt;/code&gt;&amp;nbsp;value, representing the index of the first occurrence of the character in the string, or -1 if it never occurs&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;hr style=&quot;background-color: white; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; font-family: Verdana, sans-serif; font-size: 15px; height: 0px; margin: 20px -16px; overflow: visible;&quot; /&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;hasVowels java code Examples&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.Scanner;

public class has_vowels_2
{  
  public static boolean has_vowels(String s)
  {
    for (int i = 0; i &amp;lt; s.length(); i++)
    {
      if (&quot;aeiouAEIOU&quot;.indexOf(s.charAt(i)) &amp;gt;= 0)
      {
        return true;
      }
    }
    
    return false;
  }

  public static void main(String[] args) 
  {
    Scanner in = new Scanner(System.in);
    System.out.printf(&quot;Enter a word: &quot;);
    String word = in.next();
    boolean result = has_vowels(word);
    System.out.printf(&quot;result = %b\n&quot;, result);
  }
}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/34984848639891729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/java-programming-hasvowels2-sample-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/34984848639891729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/34984848639891729'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/java-programming-hasvowels2-sample-code.html' title='JAVA PROGRAMMING: hasVowels2 sample code'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_wCmuGp98DOJivUtygBDB2fmmrQfBte3qvtMPP1LD7KVrGkxSeSEwgzf4AJsehJa_X-GmTuOl4NyN0HLva6aVCWJ25axeKSksZFG9ENFIUXFG0FFOKRLkIrjq-_oIcy3SZWZc0ksJerkA/s72-c/Edmodo+tutorial+for+teachers+2021+%25283%2529.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-3597157595432967582</id><published>2021-04-29T17:01:00.006-07:00</published><updated>2021-04-29T17:12:45.033-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>hasVowels java code</title><content type='html'>&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/AVvXsEhXIJgXUjZ2BrbwqO4KWEHzoNaobN1RpNb13Cl_V-5KmWVGUCFQMVaTh-7ZRkq1x29KqWwlnBIMvLSTaINXgrz-dkIcbXVl7tEYT0mAQJkcaPXacJtPQ3qRZSIQVcAg2wlOfIY7PR_tOY4S/s1280/Edmodo+tutorial+for+teachers+2021+%25281%2529.png&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;720&quot; data-original-width=&quot;1280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXIJgXUjZ2BrbwqO4KWEHzoNaobN1RpNb13Cl_V-5KmWVGUCFQMVaTh-7ZRkq1x29KqWwlnBIMvLSTaINXgrz-dkIcbXVl7tEYT0mAQJkcaPXacJtPQ3qRZSIQVcAg2wlOfIY7PR_tOY4S/s320/Edmodo+tutorial+for+teachers+2021+%25281%2529.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 15px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;w3-codespan&quot; style=&quot;background-color: rgba(222, 222, 222, 0.3); box-sizing: inherit; color: crimson; font-family: Consolas, &amp;quot;courier new&amp;quot;; font-size: 15.75px; padding-left: 4px; padding-right: 4px;&quot;&gt;indexOf()&lt;/code&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; font-size: 15px;&quot;&gt;&amp;nbsp;method returns the position of the first occurrence of specified character(s) in a string.&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: inherit; font-family: &amp;quot;Segoe UI&amp;quot;, Arial, sans-serif; font-size: 32px; font-weight: 400; margin: 10px 0px;&quot;&gt;Syntax&lt;/h2&gt;&lt;p style=&quot;background-color: white; box-sizing: inherit; font-family: Verdana, sans-serif; font-size: 15px; margin-bottom: 1.2em; margin-top: 1.2em;&quot;&gt;There are 4 indexOf() methods:&lt;/p&gt;&lt;pre class=&quot; language-java&quot; style=&quot;background: rgb(241, 241, 241); box-sizing: inherit; font-family: Consolas, &amp;quot;Source Code Pro&amp;quot;, Menlo, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 15px; hyphens: none; line-height: 1.5; margin-bottom: 1em; margin-top: 1em; overflow-wrap: normal; overflow: auto; padding: 1em; tab-size: 2; word-break: normal;&quot;&gt;&lt;code class=&quot; language-java&quot; style=&quot;background: none; box-sizing: inherit; font-family: Consolas, &amp;quot;Source Code Pro&amp;quot;, Menlo, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace; font-size: 1em; hyphens: none; line-height: 1.5; overflow-wrap: normal; tab-size: 2; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;String&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;str&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;String&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;str&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;fromIndex&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token keyword keyword-char&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;char&lt;/em&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword keyword-public&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token function&quot; style=&quot;box-sizing: inherit; color: #dd4a68;&quot;&gt;indexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;token keyword keyword-char&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;&lt;em style=&quot;box-sizing: inherit;&quot;&gt;char&lt;/em&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword keyword-int&quot; style=&quot;box-sizing: inherit; color: #0077aa;&quot;&gt;int&lt;/span&gt; &lt;em style=&quot;box-sizing: inherit;&quot;&gt;fromIndex&lt;/em&gt;&lt;span class=&quot;token punctuation&quot; style=&quot;box-sizing: inherit; color: #999999;&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;==================================&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;fullpost&quot;&gt;&lt;pre style=&quot;overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;import java.util.Scanner;

public class has_vowels 
{  
  public static boolean has_vowels(String s)
  {
    int counter = 0;
    
    for (int i = 0; i &amp;lt; s.length(); i++)
    {
      if (&quot;aeiouAEIOU&quot;.indexOf(s.charAt(i)) &amp;gt;= 0)
      {
        counter++;
      }
    }
    
    return (counter &amp;gt; 0);
  }

  public static void main(String[] args) 
  {
    Scanner in = new Scanner(System.in);
    System.out.printf(&quot;Enter a word: &quot;);
    String word = in.next();
    boolean result = has_vowels(word);
    System.out.printf(&quot;result = %b\n&quot;, result);
  }
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/3597157595432967582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/hasvowel-java-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3597157595432967582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3597157595432967582'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/hasvowel-java-code.html' title='hasVowels java code'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXIJgXUjZ2BrbwqO4KWEHzoNaobN1RpNb13Cl_V-5KmWVGUCFQMVaTh-7ZRkq1x29KqWwlnBIMvLSTaINXgrz-dkIcbXVl7tEYT0mAQJkcaPXacJtPQ3qRZSIQVcAg2wlOfIY7PR_tOY4S/s72-c/Edmodo+tutorial+for+teachers+2021+%25281%2529.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-6656911860528501035</id><published>2021-04-28T06:47:00.005-07:00</published><updated>2021-04-29T19:22:55.464-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Programming"/><title type='text'>The for loop Practice Problems | Java Programming Tutorial for Beginners...</title><content type='html'>&lt;iframe frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/y5Vv0K_Ztfk&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;public class PrintNumbers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i=1; i&amp;lt;=10; i++)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(i);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: monospace;&quot;&gt;&lt;span style=&quot;background-color: #fef4ed; font-size: 13.585px; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/6656911860528501035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-for-loop-practice-problems-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/6656911860528501035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/6656911860528501035'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-for-loop-practice-problems-java.html' title='The for loop Practice Problems | Java Programming Tutorial for Beginners...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/y5Vv0K_Ztfk/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-3945481244737401830</id><published>2021-04-26T20:29:00.003-07:00</published><updated>2021-04-26T20:29:49.420-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Methods | Java Programming Tutorial for Beginners using Eclipse 2021</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/kk5bfGKagy0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/3945481244737401830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/methods-java-programming-tutorial-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3945481244737401830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3945481244737401830'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/methods-java-programming-tutorial-for.html' title='Methods | Java Programming Tutorial for Beginners using Eclipse 2021'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/kk5bfGKagy0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-8261107281061182562</id><published>2021-04-26T04:20:00.003-07:00</published><updated>2021-04-26T04:20:41.964-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>How to Check Student Progress | Edmodo Tutorial for Teachers 2021</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/Ht7oZdOPbio&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/8261107281061182562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/how-to-check-student-progress-edmodo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8261107281061182562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/8261107281061182562'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/how-to-check-student-progress-edmodo.html' title='How to Check Student Progress | Edmodo Tutorial for Teachers 2021'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Ht7oZdOPbio/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2072806420542451646</id><published>2021-04-24T10:37:00.002-07:00</published><updated>2021-04-24T10:37:05.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>The While Loop Prime Numbers | Java Programming Tutorial for Beginners u...</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/NM8i0sTjucg&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2072806420542451646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-while-loop-prime-numbers-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2072806420542451646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2072806420542451646'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-while-loop-prime-numbers-java.html' title='The While Loop Prime Numbers | Java Programming Tutorial for Beginners u...'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/NM8i0sTjucg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-5586259399805051227</id><published>2021-04-22T05:37:00.003-07:00</published><updated>2021-04-22T05:37:21.824-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>The for Loop | Java Programming Tutorial for Beginners using Eclipse 2021</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/XyNxLs2KUBU&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/5586259399805051227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-for-loop-java-programming-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5586259399805051227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/5586259399805051227'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/the-for-loop-java-programming-tutorial.html' title='The for Loop | Java Programming Tutorial for Beginners using Eclipse 2021'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/XyNxLs2KUBU/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2878846901704306827</id><published>2021-04-21T19:40:00.000-07:00</published><updated>2021-04-21T19:40:56.248-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><title type='text'>C++ Activity</title><content type='html'>&lt;h4&gt;Lab Objectives&lt;/h4&gt;To gain experience in &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;implementing simple decisions&lt;/li&gt;
&lt;li&gt;writing expressions with relational operators&lt;/li&gt;
&lt;li&gt;input validation&lt;/li&gt;
&lt;li&gt;simple loops&lt;/li&gt;
&lt;li&gt;using Boolean variables&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;h3&gt;R1. The &lt;b&gt;&lt;tt&gt;if&lt;/tt&gt;&lt;/b&gt; statement &lt;/h3&gt;In C++, decisions to execute or not execute a statement or group of     statements can be made by using the       statement &lt;tt&gt;if (&lt;i&gt;condition&lt;/i&gt;)&lt;/tt&gt;. The &lt;tt&gt;&lt;i&gt;condition&lt;/i&gt;&lt;/tt&gt; must be an expression that can be evaluated as either       &lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;false&lt;/tt&gt;. If it evaluates to &lt;tt&gt;true&lt;/tt&gt;, a       succeeding statement or group of statements enclosed in &lt;tt&gt;{ . . . }&lt;/tt&gt;,       called a &lt;i&gt;block statement&lt;/i&gt; will be executed.&lt;br /&gt;
In the example below:      &lt;br /&gt;
How much money will be added to your account when the initial     starting amount is $100? &lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R1a&quot; width=&quot;200&quot; /&gt;     &lt;br /&gt;
How much money will be added to your account when the initial starting amount is $85? &lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R1a1&quot; width=&quot;200&quot; /&gt; &lt;br /&gt;
&lt;pre&gt;#include &lt;iostream&gt;

int main()
{ 
    
    &lt;pre&gt;double initial_value, final_value;&lt;/pre&gt;&lt;pre&gt;cout &amp;lt;&amp;lt;&quot;Please enter the initial balance: &quot;;&lt;/pre&gt;&lt;pre&gt;cin &amp;gt;&amp;gt; initial_value;&lt;/pre&gt;&lt;pre&gt;if (inital_value &amp;gt; 90 )
    {  &lt;/pre&gt;&lt;pre&gt;final_value = final_value + 10;&lt;/pre&gt;&lt;pre&gt;}

    final_value = final_value + 5;
    cout &amp;lt;&amp;lt;&quot;Final Value&quot; &amp;lt;&lt;final_value; 0;=&quot;&quot; pre=&quot;&quot; return=&quot;&quot; }&lt;=&quot;&quot;&gt;

    
    &lt;hr /&gt;
    
    &lt;/final_value;&gt;&lt;/pre&gt;&lt;h3&gt;R2. Relations and Relational Operators&lt;/h3&gt;The relational operators in C++ are &lt;tt&gt; == != &amp;lt; &amp;gt; &amp;lt;= and &amp;gt;=&lt;/tt&gt;
Formulate the following conditions in C++: 
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td&gt;x is positive&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2a&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;x is zero or negative&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2b&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;x is at least 8&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2c&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;x is less than 8&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2d&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;x and y are both zero&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2e&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Formulate the following conditions for the employee object &lt;tt&gt;e&lt;/tt&gt;.
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td&gt;The last name of &lt;tt&gt;e&lt;/tt&gt; starts with the letter H&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2f&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;The salary of &lt;tt&gt;e&lt;/tt&gt; is at least $75,000&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2g&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Formulate the following conditions on the variable &lt;tt&gt;harrys_birthday&lt;/tt&gt; of type &lt;tt&gt;Time&lt;/tt&gt;.
    
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td&gt;Harry is at least 21 years old.&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2h&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;Harry was born in August.&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2i&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;Harry was born in a leap year (assume his birthday was between 1901         and 2099).&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R2j&quot; width=&quot;30&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;hr /&gt;
    
    &lt;h3&gt;P1. Input validation&lt;/h3&gt;Build and run the following program. Describe what happens when the two points have the same x coordinate?
    
    &lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH4_P1a&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;
&lt;pre&gt;#include &lt;iostream&gt;
using namespace std;
#include &quot;ccc_shap.cpp&quot;
main()
{  double slope;

   double xcoord, ycoord;
   Point p1, p2; 

   cout &amp;lt;&amp;lt; &quot;Input x coordinate of the first point&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; xcoord;
   cout &amp;lt;&amp;lt; &quot;Input y coordinate of the first point&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; ycoord;

   p1 = Point(xcoord, ycoord);

   cout &amp;lt;&amp;lt; &quot;Input x coordinate of the second point&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; xcoord;
   cout &amp;lt;&amp;lt; &quot;Input y coordinate of the second point&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; ycoord;

   p2 = Point(xcoord, ycoord);

   slope = (p2.get_y() - p1.get_y()) / (p2.get_x() - p1.get_x() );

   cout &amp;lt;&amp;lt; &quot;The slope of the line between Points 1 and 2 is &quot; &amp;lt;&amp;lt; slope &amp;lt;&amp;lt; &quot;\n&quot;;
   return 0;
}&lt;/iostream&gt;&lt;/pre&gt;Correct and rebuild the program to disallow a vertical line
        (denominator = 0).
    
    
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH4_P1b&quot; rows=&quot;20&quot;&gt;/* paste program here */&lt;/textarea&gt;
What are the results when point1=(4,2) and point2 = (4,2) ?
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH4_P1c&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;
What are the results when when point1=(4,2.5) and point2 = (3,1.5) ?
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH4_P1d&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;
&lt;hr /&gt;

    &lt;h3&gt;P2. Additional Input Validation Exercise&lt;/h3&gt;Build and run the following program. Describe what happens when
    the salaries from the first and second years are equal.
    
    &lt;textarea cols=&quot;80&quot; name=&quot;S1&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;
&lt;pre&gt;#include &lt;iostream&gt;
    using namespace std;
    int main()
    {&amp;nbsp;
   double fyear_sal, syear_sal,tyear_sal;

   cout &amp;lt;&amp;lt; &quot;Input the first year&#39;s salary:&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; fyear_sal;;
   cout &amp;lt;&amp;lt;&amp;nbsp; &quot;Input the second year&#39;s salary:&quot; &amp;lt;&amp;lt;&amp;nbsp; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; syear_sal;
   cout &amp;lt;&amp;lt; &quot;Input the third year&#39;s salary:&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; tyear_sal;
   cout &amp;lt;&amp;lt;&amp;nbsp; &quot;The difference between the third and second year salary and second and first is:&quot;
   cout &amp;lt;&amp;lt; ((tyear_sal-syear_sal)/(syear_sal-fyear_sal))*100 &amp;lt;&amp;lt; &quot;%&quot;;
   return 0;
    }
    &lt;/iostream&gt;&lt;/pre&gt;Correct and rebuild the program to not allow for case where both
        the first and second year salaries are the same.
    

What are the results when fyear_salary = 100000 and syear_salary =
        100000?
    

    
    &lt;h3&gt;P3. The &lt;tt&gt;if/else&lt;/tt&gt; Statement&lt;/h3&gt;In the previous examples, your program probably responded to user input
      by ignoring cases that would result in a divide by zero. Instead, you can
      use the &lt;tt&gt;if/else&lt;/tt&gt; format to explicitly specify the action to be
      taken.
&lt;pre&gt;if (&lt;i&gt;condition&lt;/i&gt;)
   /* do something ... */
else
   /* do something different ... */
&lt;/pre&gt;The electric company gives a discount on electricity based upon
    usage. The normal rate is $.60 per Kilowatt Hour (KWH). If the
    number of KWH is above 1,000, then the rate is $.45 per KWH. Write a
    program that prompts the user for the number of Kilowatt Hours used and then
    calculates and prints the total electric bill.&amp;nbsp;&lt;/iostream&gt;&lt;/pre&gt;&lt;pre&gt;&lt;iostream&gt;
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH4_P2a&quot; rows=&quot;40&quot;&gt;/* paste program here */&lt;/textarea&gt;
According to your program, how much will it cost for:
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td&gt;900 KWH?&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_P2b&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;1,754 KWH?&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_P2c&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;10,000 KWH?&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_P2d&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;hr /&gt;
    
    &lt;h3&gt;P4. Simple Loops&lt;/h3&gt;Frequently a decision needs to be made whether or not to do something
      again. Here is a program that computes the number of digits needed to
      represent a number in base 10, just like the function &lt;tt&gt;digits()&lt;/tt&gt;
      from the preceding lab. But instead of using recursion it uses multiple
      &lt;tt&gt;if&lt;/tt&gt; statements. 
&lt;pre&gt;/* PURPOSE:  Count number of digits needed to express an integer in base 10
             using multiple if statements
   REMARKS:  Compare to Ch.5 digits()
*/

#include &lt;iostream&gt;
using namespace std;

int main()
{  int input;

   cout &amp;lt;&amp;lt; &quot;Input an integer between 1 and 9999: &quot;;
   cin &amp;gt;&amp;gt; input;

   int temp = input;
   int d = 1;

   assert ( input &amp;gt;= 1 and input &amp;lt;= 9999 );
    
   if (temp &amp;gt; 9)
   {  temp = temp / 10;
      d++;
   }
      
   if (temp &amp;gt; 9)
   {  temp = temp / 10;
      d++;
   }

   if (temp &amp;gt; 9)
   {  temp = temp / 10;
      d++;
   }

   if (temp &amp;gt; 9)
   {  temp = temp / 10;
      d++;
   }
   
   cout &amp;lt;&amp;lt; input &amp;lt;&amp;lt; &quot; can be expressed in &quot; &amp;lt;&amp;lt; d &amp;lt;&amp;lt; &quot; digits&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   
   return 0;
}

&lt;/iostream&gt;&lt;/pre&gt;But having to write
&lt;pre&gt;if (temp &amp;gt; 9)
   {   temp = temp / 10;
       d++;
   }
&lt;/pre&gt;four times, even using copy/paste, is clearly repetitive! It also only
      works for input &amp;lt;= 9999. One would like to have a way of testing that
      the input is still greater than 1 and executing the succeeding control
      block if it is. Replacing &lt;tt&gt; if &lt;/tt&gt; with &lt;tt&gt; while &lt;/tt&gt; does it.
    
&lt;pre&gt;/* PURPOSE:  Count number of digits needed to express an integer in base 10
             using while loop
*/

#include &lt;iostream&gt;
using namespace std;

int main()
{  int input;
  
   cout &amp;lt;&amp;lt; &quot;Input an integer: &quot;;
   cin &amp;gt;&amp;gt; input;
   int d = 1;
   int temp = input;

   &lt;i&gt;while (temp &amp;gt; 9)&lt;/i&gt;
   {  temp = temp / 10;
      d++;
   }

   cout &amp;lt;&amp;lt; input &amp;lt;&amp;lt; &quot; can be expressed in &quot; &amp;lt;&amp;lt; d &amp;lt;&amp;lt; &quot; digits&quot; &amp;lt;&amp;lt; &quot;\n&quot;;   
}
&lt;/iostream&gt;&lt;/pre&gt;The fractions 1/2, 1/4, 1/8, ... get closer and closer to 0. Change the
      previous program to count the number of divisions by two needed to be
      within 0.0001 of zero.
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH6_P1a&quot; rows=&quot;20&quot;&gt;/* paste program here */&lt;/textarea&gt;
    

&lt;hr align=&quot;center&quot; /&gt;
    &lt;h3&gt;P5. Loop Termination&lt;/h3&gt;Which values of &lt;tt&gt;nyear&lt;/tt&gt; cause the following loops to terminate?
&lt;pre&gt;/* PURPOSE: Count number of year between a user-input year and the
            year 2000.
*/            

int main()
{  int nyear;
   millennium = 2000;
   
   cout &amp;lt;&amp;lt; &quot;Please enter the current year&quot;;
   cin &amp;gt;&amp;gt; nyear;
   
   while (nyear != millennium)
   {  nyear++;
   }
   
   cout &amp;lt;&amp;lt; &quot; Another &quot;&amp;lt;&amp;lt; millenium - nyear &amp;lt;&amp;lt; &quot;years to the millenium.&quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   return 0;
}
   
&lt;/pre&gt;&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH6_P2a&quot; rows=&quot;2&quot;&gt;&lt;/textarea&gt;
    
    Re-write the preceding program so that the while loop will terminate for
      any integer input.
&lt;textarea cols=&quot;80&quot; name=&quot;CCC_CH6_P2b&quot; rows=&quot;20&quot;&gt;/* paste program here */&lt;/textarea&gt;
    
    
    

&lt;hr align=&quot;center&quot; /&gt;
    
    &lt;h3&gt;P6. Processing a Sequence of Inputs&lt;/h3&gt;Modify the electricity rate program to allow the user to enter data for any
    number of months.&amp;nbsp; The user should be able to enter a -1 when
    finished. The program should then compute the cost using the same
    formulas as above.
&lt;textarea cols=&quot;80&quot; name=&quot;S4&quot; rows=&quot;40&quot;&gt;/* paste program here */&lt;/textarea&gt;
&lt;hr /&gt;
    
    &lt;h3&gt;R3. Using Boolean Variables&lt;/h3&gt;According to the following program, what color is the resulting mixture
      under the following inputs? 
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;         &lt;td&gt;&lt;tt&gt;Y N Y&lt;/tt&gt;&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R3a&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;&lt;tt&gt;Y Y N&lt;/tt&gt;&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R3b&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;tr&gt;         &lt;td&gt;&lt;tt&gt;N N N&lt;/tt&gt;&lt;/td&gt;         &lt;td&gt;&lt;input align=&quot;MIDDLE&quot; name=&quot;CCC_CH4_R3c&quot; width=&quot;200&quot; /&gt;&lt;/td&gt;       &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;pre&gt;#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{  string mixture;      
   bool red, green, blue;
   string string_bool;

   cout &amp;lt;&amp;lt; &quot;Include red in mixture? (y/n) &quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; string_bool;
   if (string_bool == &quot;y&quot;)
      red = true;
   cout &amp;lt;&amp;lt; &quot;Include green in mixture? (y/n) &quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; string_bool;
   if (string_bool == &quot;y&quot;)
      green = true;
   cout &amp;lt;&amp;lt; &quot;Include blue in mixture? (y/n) &quot; &amp;lt;&amp;lt; &quot;\n&quot;;
   cin &amp;gt;&amp;gt; string_bool;
   if (string_bool == &quot;y&quot;)
      blue = true;

   if (not blue and not green)     
      mixture = &quot;RED&quot;;
   else if (not red and not blue)     
      mixture = &quot;GREEN&quot;;
   else if (not red and not green)     
      mixture = &quot;BLUE&quot;;
   else if (red)
   {  if (green or blue)
      {  if (green and blue)
            mixture = &quot;BLACK&quot;;
         else if (green) 
            mixture = &quot;YELLOW&quot;;
         else
            mixture = &quot;PURPLE&quot;;
      }
   }
   else
   {  if (blue and green)
         mixture = &quot;CYAN&quot;;
      else
         mixture = &quot;WHITE&quot;;
   }
   cout &amp;lt;&amp;lt; &quot;Your mixture is &quot; &amp;lt;&amp;lt; mixture &amp;lt;&amp;lt; &quot;\n&quot;;

   return 0;
}
&lt;/string&gt;&lt;/iostream&gt;&lt;/pre&gt;&lt;/iostream&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2878846901704306827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/c-activity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2878846901704306827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2878846901704306827'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/c-activity.html' title='C++ Activity'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-3841056197290282442</id><published>2021-04-21T07:06:00.001-07:00</published><updated>2021-04-21T07:06:01.518-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>If Statements | Java Programming Tutorial for Beginners using Eclipse</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/0PP2FnuQZ7w&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/3841056197290282442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/if-statements-java-programming-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3841056197290282442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/3841056197290282442'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/if-statements-java-programming-tutorial.html' title='If Statements | Java Programming Tutorial for Beginners using Eclipse'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/0PP2FnuQZ7w/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-162850788350934027.post-2564331341013614236</id><published>2021-04-19T17:47:00.003-07:00</published><updated>2021-04-19T17:47:41.203-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java  JOptionPane Class | Java Tutorial for Beginners using Eclipse</title><content type='html'>&lt;iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://youtube.com/embed/sanbW_YzhMM&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://jda-insite.blogspot.com/feeds/2564331341013614236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jda-insite.blogspot.com/2021/04/java-joptionpane-class-java-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2564331341013614236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/162850788350934027/posts/default/2564331341013614236'/><link rel='alternate' type='text/html' href='http://jda-insite.blogspot.com/2021/04/java-joptionpane-class-java-tutorial.html' title='Java  JOptionPane Class | Java Tutorial for Beginners using Eclipse'/><author><name>jdArcos</name><uri>http://www.blogger.com/profile/08381164869647233660</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNvp3LePSm8ZZooLxVGSuW1ETHKzYrwSu1Xcd5wYTSaS_eMMLHtG1qyYUBSiGq3-lQPnDxdEr4AGdDGnjFQ2yM4OSDRGK-71BQcjLYqs9_VyDks1kHScG174NAS1YhXs/s220/me.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/sanbW_YzhMM/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>