<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Nhóm 11 by Nguyễn Trọng Thanh Vinh</title>
      <link>https://padlet.com/thvinh2001/Java</link>
      <description>Made with big dreams</description>
      <language>en-us</language>
      <pubDate>2021-09-25 00:32:00 UTC</pubDate>
      <lastBuildDate>2024-05-26 09:28:47 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>3. Cấu trúc lặp For</title>
         <author>3120220055</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803468112</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2021-10-09 00:25:55 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803468112</guid>
      </item>
      <item>
         <title>Phân chia công việc:</title>
         <author>thvinh2001</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803469154</link>
         <description><![CDATA[<div>1.&nbsp; Nguyễn Văn Hoàng<br>2. Nguyễn Đô<br>3. Nguyễn Lê Triệu Vỹ<br>4. Nguyễn Hồng Thức<br>5. Nguyễn Trọng Thanh Vinh<br><br><br><br>
</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-10-09 00:27:25 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803469154</guid>
      </item>
      <item>
         <title></title>
         <author>nguyendocht2000</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803469727</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1367533341/a24702b0164ed3136ed7679963f1ce1d/MicrosoftTeams_image.png" />
         <pubDate>2021-10-09 00:28:11 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803469727</guid>
      </item>
      <item>
         <title>4.cấu trúc  lặp while,Do...while</title>
         <author>nguyenhongthuctk</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803483560</link>
         <description><![CDATA[<div>-Cú pháp:<br>while (điều kiện lặp){<br>//các lệnh<br>}<br>// lệnh kế tiếp<br><br>-Cách dùng:<br>Đầu tiên, vòng lặp while sẽ tính giá trị của biểu thức điều_kiện_lặp. Khi biểu thức này có giá trị đúng (true) thì những lệnh nằm trong thân của vòng lặp sẽ được thực hiện; sau khi thực hiện xong các lệnh này thì biểu thức điều_kiện_lặp được kiểm tra lại để quyết định có lặp tiếp hay không.<br><br>Ví dụ:<br>while(flag) {<br>&nbsp; &nbsp; &nbsp; &nbsp; if((productID.matches("^\\.$")))&nbsp;<br>break;<br>if(!(productID.matches("^\\d+$"))){<br>System.out.println("Nhập sai mã món");<br>productID = "";<br>flag = false;<br>continue;<br>}<br><br>Vòng lặp do...while<br>-Cú pháp:<br>do{<br>&nbsp; &nbsp;// các lệnh<br>}while( điều kiện lặp)<br>// các câu lệnh kế tiếp<br><br>-Cách dùng<br>Đầu tiên, các lệnh nằm trong thân của vòng lặp do - while sẽ được thực hiện. Sau khi thực hiện xong các lệnh này thì biểu thức điều_kiện_lặp sẽ được kiểm tra: nếu biểu thức này có giá trị đúng (true) thì tiếp tục quay lại thực hiện các lệnh trong thân vòng lặp. Nếu đến một lúc nào đó biểu thức điều_kiện_lặp có giá trị sai (false) thì các lệnh trong thân vòng lặp sẽ không được thực hiện và vòng lặp do - while sẽ kết thúc.<br><br>-Ví dụ:<br>boolean flag = true;<br>do {<br>&nbsp; &nbsp; &nbsp; &nbsp;if((productID.matches("^\\.$")))&nbsp;<br>break;<br>if(!(productID.matches("^\\d{1,2}$"))){<br>System.out.println("Nhập sai mã món");<br>productID = "";<br>flag = false;<br>}while(flag)<br><br><br><br><br><br><br><br><br><br><br><br>
</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1367502649/a56171cc60f25ce5539a8f1ba18bc7c2/1.png" />
         <pubDate>2021-10-09 00:46:52 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803483560</guid>
      </item>
      <item>
         <title>2.Cấu trúc Switch...Case</title>
         <author>nguyendocht2000</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803485027</link>
         <description><![CDATA[<div>
<strong><em>Cú pháp:</em></strong><br>switch ( <em>điều kiện</em> ) {</div><div>&nbsp; &nbsp; case '<em>x_1'</em>:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<em>trường hợp 1</em>&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; case&nbsp; '<em>x_2'</em>:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<em>trường hợp 2</em>&gt;;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; break;<br>.......<br>&nbsp; &nbsp; case '<em>x_n'</em>:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;<em>trường hợp thứ n</em>&gt;;</div><div>&nbsp; &nbsp; default:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<em>trường hợp k tồn tại các kết quả trên</em>&gt;;</div><div>}<br><strong>Cách dùng:</strong><br>&nbsp; &nbsp; &nbsp; &nbsp;Switch sẽ kiểm tra giá trị của biến "<em>điều kiện</em>" (nằm trong ngoặc đơn sau switch), và so sánh biến với từng giá trị khác nhau, lần lượt từ trên xuống dưới, mỗi giá trị cần so sánh gọi là một case<br>&nbsp; &nbsp; &nbsp; &nbsp; Ở đoạn code trên, các giá trị để so sánh với biến "<em>điều kiện</em>"là <em>x_1, x_2,...,x_n.</em> Khi một trường hợp đúng (true), khối lệnh ở trong case đó sẽ được thực thi.<br>&nbsp; &nbsp; &nbsp; &nbsp;Nếu tất cả các trường hợp đều sai (tức là các "<em>x_n</em>" ở case không bằng với biến "<em>điều kiện</em>"), thì khối lệnh ở trong default sẽ được thực thi.<br>&nbsp; &nbsp; &nbsp; &nbsp;Lưu ý là khối default là không bắt buộc có ở cấu trúc switch case trong Java, tức là bạn có thể viết cũng được mà không viết cũng không bị lỗi.<br><strong>ví dụ:<br></strong>public class Order{</div><div>&nbsp; &nbsp; public static void main(String[] args) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; system.out.print("nhập thức uống:&nbsp; ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; string order = sc.nextLine();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; switch (order) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'ca_phe':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Cà phê");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'nuoc_cam':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Nước Cam");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'viet_quat':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Vệt Quất");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 'bac_xiu':</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Bạc Xỉu");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("không tồn tại thức uống");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div>}</div>]]></description>
         <enclosure url="https://niithanoi.edu.vn/pic/News/cau-truc-switch-trong-java.jpg" />
         <pubDate>2021-10-09 00:48:49 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803485027</guid>
      </item>
      <item>
         <title>Câu 5: Break, Continue</title>
         <author>thvinh2001</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803488417</link>
         <description><![CDATA[<div>
<br><br><strong>Điểm giống nhau</strong> : &nbsp; Keyword<strong> break, continue</strong> chủ yếu xuất hiện trong cấu trúc vòng lặp.<br><strong>Điểm khác biệt</strong>: <br>Từ khóa <strong>break</strong> được dùng để kết thúc Loop, hoặc cấu trúc switch case.<br>Từ khóa <strong>continue</strong> thường được sử dụng trong vòng lặp  để chuyển đến bước cuối cùng trong 1 lần lặp.<br><strong>Cụ thể: <br>- break:<br>&nbsp; &nbsp; </strong>+ Trong cấu trúc <strong>switch case </strong>từ khóa break thường được đặt tại cuối mỗi khối lệnh mỗi nhãn case.<br>&nbsp; &nbsp; + Khi sử dụng trong các dạng vòng lặp khác nhau, từ khóa break đều có cùng mục đích là kết thúc sớm quá trình thực thi của vòng lặp.</div><div>
<br><br><strong>- continue:<br>&nbsp; &nbsp; </strong>+ Giống với break trong cấu trúc vòng lặp.<br><strong>VÍ DỤ:<br>Break:</strong><br>switch (categoryId)<br>		{<br>			case '1':<br>				System.out.println("Nước ép");<br>				break;<br>			case '2':<br>				System.out.println("Đồ ăn kèm");<br>				break;<br>			case '3':<br>				System.out.println("Yogurt");<br>				break;<br>			case '4':<br>				System.out.println("Cafe");<br>				break;<br>		&nbsp; &nbsp; &nbsp; &nbsp; default:<br>		&nbsp; &nbsp; 	&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Sai mã sản phẩm");<br>		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>		}<br><strong>Continue:<br></strong>boolean flag = true;<br>Scanner sc = new Scanner(System.in);<br>String productID ;<br>		System.out.println("Nhập mã món:");<br>		productID = sc.nextLine();<br>		while(flag) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if((productID.matches("^\\.$")))&nbsp;<br>				break;<br>			if(!(productID.matches("^\\d{1,2}$"))){<br>				System.out.println("Nhập sai mã món");<br>				productID = "";	<br>				flag = false;<br>				continue;<br>			}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>			System.out.println("Đã order sản phẩm với id" + productID);<br>		}</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1367503046/27eaebc21bf3adcfe34755e840025186/Break_and_continue.jpg" />
         <pubDate>2021-10-09 00:53:14 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803488417</guid>
      </item>
      <item>
         <title>1. Cấu trúc điều kiện IF :</title>
         <author>3120220226</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1803494315</link>
         <description><![CDATA[<div>&nbsp;Câu lệnh if - else</div><div>Lệnh <strong>if-else</strong> cũng được sử dụng để kiểm tra một điều kiện. Nó sẽ thực thi (execute) khối lệnh <strong>if</strong> nếu điều kiện là đúng, nếu điều kiện sai thì khối lệnh <strong>else </strong>sẽ được thực thi.</div><div>
<br>Cú pháp:<br><strong>if</strong> (condition) {</div><div>&nbsp; &nbsp; // khối lệnh này được thực thi</div><div>&nbsp; &nbsp; // nếu condition = true</div><div>} <strong>else</strong> {</div><div>&nbsp; &nbsp; // khối lệnh này được thực thi</div><div>&nbsp; &nbsp; // nếu condition = false</div><div>}</div><div>
<br>Ví dụ:<br><br>public class IfElseDemo <strong>{</strong><br><br><br><br>
</div><div><br></div><div>&nbsp; public static void main<strong>(</strong>String<strong>[]</strong> args<strong>)</strong> <strong>{</strong><br><br><br><br>
</div><div>&nbsp; &nbsp; boolean flag = true;<br>&nbsp; &nbsp; ...<br>&nbsp; &nbsp; ...</div><div>&nbsp; &nbsp; if<strong>(flag)</strong><br><br><br><br>
</div><div>&nbsp; &nbsp; &nbsp; System.out.println<strong>(</strong>" Khách mang về"<strong>)</strong>;</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; System.out.println<strong>(</strong>" Khách ngồi tại quán"<strong>)</strong>;</div><div>&nbsp; &nbsp;&nbsp;</div><div><br></div><div>&nbsp; <strong>}</strong><br><br><br><br>
</div><div><br></div><div><strong>}</strong></div><div><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1367542032/8d08c89573611114913374bbbb089395/image.png" />
         <pubDate>2021-10-09 01:00:39 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1803494315</guid>
      </item>
      <item>
         <title>Dự án của nhóm:</title>
         <author>nguyenhongthuctk</author>
         <link>https://padlet.com/thvinh2001/Java/wish/1820675913</link>
         <description><![CDATA[<div>Quản lí quán cà phê</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-10-16 02:54:04 UTC</pubDate>
         <guid>https://padlet.com/thvinh2001/Java/wish/1820675913</guid>
      </item>
   </channel>
</rss>
