<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Nhóm 3-Sợ Lập Trình-Java 13/10 by bryan trần</title>
      <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2021-10-13 06:48:06 UTC</pubDate>
      <lastBuildDate>2026-01-26 04:53:28 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Câu 1: Cấu trúc điều kiện If(các dạng đơn giản và phức tạp)</title>
         <author>tranthanhvu7939</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813109163</link>
         <description><![CDATA[<div>**Cấu trúc điều khiển if<br><br></div><div>+++++if đơn giản++++++<br><br></div><div>Lệnh <strong>if</strong> đơn giản kiểm tra nếu điều kiện là đúng thì thi hành khối lệnh thích hợp.<br><br></div><pre>if (condition) {
    //thi hành nếu điều kiện condition là true
}</pre><div>Ví dụ: Kiểm tra số cầu thủ được đăng kí thi đấu có hợp lệ hay không (24 người là hợp lệ)<br><br></div><pre>int socauthu = sc.nextInt();
if(socauthu==24) {
    System.out.println("So cau thu thi dau hop le");
}</pre><div><br><br></div><div>++++if ... else ...++++++<br><br></div><div>Nếu điều kiện đúng thi hành khối lệnh thứ nhất, nếu sai thi hành khối lệnh sau else<br>Ví dụ: Kiểm tra xem số cầu thủ ra sân có hợp lệ (Mỗi đội 11 cầu thủ)<br><br></div><pre>int so_cau_thu_ra_san = sc.nextInt();
if(so_cau_thu_ra_san==22) {
    System.out.println("So cau thu ra san hop le");
}
else{
    System.out.println("So cau thu ra san khong hop le");
}</pre><div><br><br>++++Câu lệnh else if+++++<br><br></div><div>Kiểm tra nhiều điều kiện, điều kiện nào đúng thì thi hành khối lệnh tương ứng<br>Ví dụ: Kiểm tra sô áo cầu thủ có hợp lệ (chỉ nằm trong[0-100])<br><br></div><pre>        int so_ao = sc.nextInt();
        <strong>if(so_ao &lt;0) {
            System.out.println("Khong hop le");
        }else if(so_ao &gt; 100) {
            System.out.println("Khong hop le");
        } else {
            System.out.println("Hop le");
        }</strong></pre><div><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1037620434/ca2e1c2cc2ffda6dfeff9d6335279344/images.jpg" />
         <pubDate>2021-10-13 06:56:46 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813109163</guid>
      </item>
      <item>
         <title>4. Cấu trúc lặp While, Do...While</title>
         <author>thaihoc2le2</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813122578</link>
         <description><![CDATA[<div>Cách dùng của vòng lặp là ta muốn một vài dòng code được chạy đi chạy lại nhiều lần đến một điều kiện nào đó sẽ kết thúc.<br><strong>WHILE </strong>sẽ kiểm tra điều kiện lặp trước rồi thực hiện, còn <strong>DO WHILE </strong>là thực hiện trước đã rồi mới kiểm tra.<br><strong>&nbsp;Cấu trúc while</strong>:<br><br><strong>while </strong>(<strong>&lt;Biểu thức điều kiện&gt;</strong>) {<br><br></div><div>&nbsp; &nbsp; &lt;Khối lệnh lặp lại&gt;<br><br></div><div>}<br><br><strong>VD: Nhập số tiền lương để trả cho 5 cầu thủ<br><br>int</strong> i=1;<br><strong>int</strong> tien_luong;<strong><br>While</strong> ( i&lt;=5) {<strong><br>&nbsp; &nbsp; &nbsp; </strong>System.out.println("Nhap tien luong:");<br>&nbsp; &nbsp; &nbsp;tien_luong=sc.nextInt()<br>&nbsp; &nbsp; &nbsp;i++;<br>}<br><br></div><div><strong>Cấu trúc do...while &nbsp;<br></strong><br></div><div><strong>do </strong>{<br><br></div><div>&nbsp; &nbsp; &lt;Khối lệnh lặp lại&gt;<br><br></div><div>} <strong>while </strong>(<strong>&lt;Biểu thức điều kiện&gt;</strong>)<br><br><strong>VD</strong>: <strong>Yêu cầu nhập tiền lương của các cầu thủ xem có đạt chỉ tiêu hay không (&gt;=100tr)</strong><br><br><strong>int </strong>tien_luong;<br><strong>do </strong>{<br>&nbsp; &nbsp; &nbsp;System.out.println("Nhap tien luong:");<br>&nbsp; &nbsp; &nbsp;tien_luong=sc.nextInt();<br>} <strong>while</strong>(tien_luong&gt;=100);</div><div><br><br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1037620434/fd0dbc12dba5f5ff820dc697b09d64ec/vong_lap_while_va_do_while_trong_php.gif" />
         <pubDate>2021-10-13 07:04:25 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813122578</guid>
      </item>
      <item>
         <title>CÂU 3: CẤU TRÚC LẶP FOR</title>
         <author>thienlala67</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813141353</link>
         <description><![CDATA[<div>*Cú pháp của vòng lặp for là:<br>for (initialization; testExpression; update)<br>{<br>&nbsp; &nbsp; // mã bên trong phần thân của vòng lặp&nbsp;<br>}</div><div><br></div><div><br>*Cách dùng vòng lặp for:</div><ol><li>Biểu thức khởi tạo(initialization) chỉ được thực hiện một lần.</li><li>Sau đó, biểu thức kiểm tra được đánh giá. Ở đây, biểu thức kiểm tra(testExpression) là một biểu thức boolean.</li><li>Nếu biểu thức kiểm tra trả kết quả là true,<ul><li>Phần code trong thân vòng lặp for được thực hiện.</li><li>Sau đó, biểu thức cập nhật(update) được thực hiện.</li><li>Một lần nữa, biểu thức kiểm tra được đánh giá.</li><li>Nếu biểu thức kiểm tra trả kết quả là true, phần code bên trong thân vòng lặp for được thực hiện và biểu thức cập nhật được thực hiện.</li><li>Quá trình này diễn ra cho đến khi biểu thức kiểm tra được cho kết quả false.</li></ul></li><li>Nếu biểu thức kiểm tra được ước tính false, vòng lặp for chấm dứt.</li></ol><div>*Ví dụ: Đếm số cầu thủ trẻ (&lt;=20 được gọi là trẻ)<br>int dem=0;<br>for(int i=0;i&lt;danhsach.size();i++){<br>&nbsp; &nbsp;if(danhsach.get(i).getAge()&lt;=20){<br>&nbsp; &nbsp; &nbsp; &nbsp;dem++;<br>&nbsp; &nbsp;}<br>}</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361625382/e036f2215931b1df2efcdad8089bf592/image.png" />
         <pubDate>2021-10-13 07:14:54 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813141353</guid>
      </item>
      <item>
         <title>Câu 5. Nếu cú pháp, cách dùng và cho ví dụ về cách sử dụng của break và continue :</title>
         <author>truyennguyendinh278</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813142954</link>
         <description><![CDATA[<div><strong>Cách hoạt động break:</strong><br>&nbsp; &nbsp; &nbsp; &nbsp; - Một vòng lặp đang thực hiện nếu gặp lệnh break sẽ thoát vòng lặp ngay lập tức. <br><strong>Cách hoạt động continue:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - </strong>Nếu một vòng lặp đang chạy mà gặp lệnh continue, tất cả các lệnh trong thân vòng lặp nằm phía dưới lệnh continue sẽ bị bỏ qua ở lần lặp hiện tại. Vòng lặp sẽ chuyển sang kiểm tra điều kiện và tiếp tục lặp(nếu điều kiện lặp còn thỏa mãn).<br><strong>Cú pháp câu lệnh break:<br></strong><br></div><div><strong>break;<br></strong><br></div><div><strong>Cú pháp câu lệnh continue:<br><br>continue;<br></strong><mark><br></mark><strong>Ví dụ break:</strong></div><div>&nbsp; case 1:<br>&nbsp; &nbsp; &nbsp; &nbsp; System.<em>out</em>.println("Nhap so&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bong can them: ");<br>&nbsp; &nbsp; &nbsp; &nbsp; n =&nbsp; &nbsp; Integer.<em>parseInt</em>(sc.nextLine());<br><br>&nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; n; i++) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bong bong = new Bong();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bong.input();<br><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bong</em>List.add(bong)<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<strong>;</strong><br>&nbsp; &nbsp; case 2:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<strong> </strong><br>&nbsp; &nbsp; &nbsp;default:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.<em>err</em>.println("Nhap sai");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<strong><br>Ví dụ continue:Đếm số áo thi đấu của cầu thủ có hợp lệ, nếu&nbsp; hợp lệ thì chương trình bỏ qua dòng in cuối.<br></strong><br></div><pre>for (int i = 0; i &lt;= ds.size(); i++) {

            if (ds.get(i).getSoAo() &gt; 0 &amp;&amp; ds.get(i).getSoAo() &lt; 100) {
                dem++;
                continue;
            }      
            System.out.println("Khong hop le");
        }   </pre><div><strong><br></strong><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361633763/87df143b7d2d1efd53b809e60a664221/image.png" />
         <pubDate>2021-10-13 07:15:47 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813142954</guid>
      </item>
      <item>
         <title>Câu 2: Cấu trúc Switch...Case</title>
         <author>MinhChuong</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813158933</link>
         <description><![CDATA[<div>1. Mô tả cú pháp rẽ nhánh switch - case<br>&nbsp; &nbsp;- Vậy khi nào chúng ta nên sử dụng cấu trúc rẽ nhánh switch - case thay thế cho cấu trúc điều khiển if - else if - else?&nbsp;<br>&nbsp; &nbsp;- Khi mà chúng ta có số trường hợp cần xử lý lớn hơn 3 thì khi đó chúng ta nên sử dụng switch - case để dễ dàng kiểm tra và xử lý, giúp cho chương trình dễ quan sát hơn.<br>&nbsp; &nbsp;- Cú pháp:&nbsp;<br>	&nbsp; &nbsp; switch (biểu_thức)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; 		case giá_trị_1:<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; Lệnh 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; break;<br>&nbsp; &nbsp; 		case giá_trị_2:<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; Lệnh 2;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; break;<br>&nbsp; &nbsp; 		...<br>&nbsp; &nbsp; 		case giá_trị_n:<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; Lệnh n;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; &nbsp; break;<br>&nbsp; &nbsp; 		[default: Lệnh 0;]<br>	&nbsp; &nbsp; &nbsp;}<br><br>&nbsp; &nbsp; - trong đó: . Biểu_thức phải trả về kết quả là một số nguyên, chuỗi hoặc một ký tự.<br>	&nbsp; &nbsp; &nbsp; &nbsp;. Giá_trị_1, giá_trị_2,..., giá_trị_n là các biểu thức hằng, nguyên hoặc ký tự và chúng phải khác nhau.<br>	&nbsp; &nbsp; &nbsp; &nbsp;. Lệnh 1, Lệnh 2, ..., Lệnh n, Lệnh 0 là các lệnh trong thân của switch. Các bạn thấy sau mỗi lệnh này chúng ta có từ khóa break;, từ khóa này có thể có hoặc không có tùy theo từng trường hợp.<br><br>- Lưu ý: . Lệnh break là để nhảy ra khỏi lệnh switch, nếu không có lệnh này cấu trúc switch sẽ duyệt cả các trường hợp phía dưới cho đến khi gặp dấu đóng switch (dấu }) (vì chưa gặp break coi như chưa ra khỏi lệnh switch).<br>&nbsp; &nbsp; &nbsp; &nbsp;. Khi sử dụng lệnh switch có thể xảy ra nhiều giá trị trả về cho một trường hợp (một khả năng xảy ra của biểu thức).<br><br>2. Ví dụ switch đơn giản.<br>&nbsp; &nbsp; - ví dụ:&nbsp;Menu quản lí đội bóng, nhập lựa chọn.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;switch(chon)<br>&nbsp; &nbsp; 	&nbsp; &nbsp; &nbsp;{<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; case 1:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;quanlydoibong();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; case 2:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;quanlycauthu();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; case 3:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;		 quanlyketquathidau ();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;		 break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; case 4:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thongke ();<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	&nbsp; case 0:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;default :<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Lua chon khong hop le. Moi ban chon lai!");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361625445/c0171c3ac8691bd970fce93012a2da28/cau_truc_switch_trong_java.jpg" />
         <pubDate>2021-10-13 07:24:48 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813158933</guid>
      </item>
      <item>
         <title>Đề tài:Quản lí đội bóng</title>
         <author>tranthanhvu7939</author>
         <link>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813276571</link>
         <description><![CDATA[<div>Câu 1:Trần Thanh Vũ<br>Câu 2:Hạ Minh Chương<br>Câu 3:Nguyễn Ngọc Thiện<br>Câu 4:Nguyễn Thái Học<br>Câu 5:Nguyễn Đình Truyện</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-10-13 08:27:03 UTC</pubDate>
         <guid>https://padlet.com/tranthanhvu7939/pu8bh8sn8h7qgbn4/wish/1813276571</guid>
      </item>
   </channel>
</rss>
