<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Nhóm 4 - Five dreamy boys - Java 13/10 by Hồ Trần Quốc Huy</title>
      <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy</link>
      <description>Được tạo ra từ giấc mơ</description>
      <language>en-us</language>
      <pubDate>2021-10-13 06:47:03 UTC</pubDate>
      <lastBuildDate>2026-02-03 20:19:34 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Dự án: Quản lí nhân viên khu nghĩ dưỡng</title>
         <author>hotranquochuy0306</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813104502</link>
         <description><![CDATA[<div><strong>Danh sách thành viên:</strong></div><ul><li>Ngô Hoàng Thiện(nhóm trưởng)</li><li>Đoàn Công Danh</li><li>Hoàng Công Duy Hyy</li><li>Hồ Trần Quốc Huy</li><li>Trần Nhật Long&nbsp;</li></ul><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2021-10-13 06:54:18 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813104502</guid>
      </item>
      <item>
         <title>câu 5 : Break , Continue </title>
         <author>danhdoan19999</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813108401</link>
         <description><![CDATA[<div><mark>Từ khoá break :</mark><br><strong>Từ khóa break trong java</strong> được sử dụng để dừng thực thi lệnh trong vòng lặp hoặc trong mệnh đề switch tại điều kiện đã được chỉ định. Đối với vòng lặp bên trong vòng lặp khác, thì nó chỉ stop vòng lặp bên trong đó.<br><br><strong><em>Ví dụ cho chức năng đăng nhập sử dụng từ khoá break :</em></strong><br><br>public static void main(String[] args){<br>&nbsp; &nbsp; &nbsp; &nbsp; Scanner scanner = new Scanner(System.in);<br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Xin nhập vào tên");<br>&nbsp; &nbsp; &nbsp; &nbsp; String name = scanner.nextLine();<br>&nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Xin nhập vào mật khẩu");<br>&nbsp; &nbsp; &nbsp; &nbsp; String pass = scanner.nextLine();<br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; String truePass = "123";<br>&nbsp; &nbsp; &nbsp; &nbsp; <br>&nbsp; &nbsp; &nbsp; &nbsp; switch (name) {<br>&nbsp; &nbsp; &nbsp; &nbsp; case "admin":<br>&nbsp; &nbsp; &nbsp; &nbsp; 	if(pass.equals(truePass)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; 		System.out.println("Xin chào admin");<br>&nbsp; &nbsp; &nbsp; &nbsp; 		break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	}<br>&nbsp; &nbsp; &nbsp; &nbsp; case "user":<br>&nbsp; &nbsp; &nbsp; &nbsp; 	if(pass.equals(truePass)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; 		 System.out.println("Xin chào user");<br>&nbsp; &nbsp; &nbsp; &nbsp; 		 break;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	}<br>&nbsp; &nbsp; &nbsp; &nbsp; default:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println("Vui lòng nhập đúng tên tài khoản và mật khẩu");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>&nbsp; &nbsp; }<br><mark>Từ khoá continue : </mark><br><strong>Từ khóa continue trong java</strong> được sử dụng để tiếp tục vòng lặp tại điều kiện đã được xác định. Với điều kiện đó khối lệnh phía sau từ khóa continue sẽ không được thực thi. Đối với vòng lặp bên trong một vòng lặp khác, continue chỉ có tác dụng với vòng lặp bên trong đó.<br><br><strong><em>Ví dụ cho chức năng hiển thị danh sách user sử dụng từ khoá continue :<br><br></em></strong>public static void main(String[] args){<br>		<br>		String arr[] = {"admin","user1","user2","user3" };<br>		<br>		 System.out.println("danh sách các tài khoản của user");<br>		 <br>&nbsp; &nbsp; &nbsp; &nbsp; for (String i : arr) {<br>&nbsp; &nbsp; &nbsp; &nbsp; 	if(i.equals("admin")) {<br>&nbsp; &nbsp; &nbsp; &nbsp; 		continue;<br>&nbsp; &nbsp; &nbsp; &nbsp; 	}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.print(" " +i);<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>	}<strong><em><br><br></em></strong><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361624694/ed0e6fdeac5b907cb3fceead54404936/image.png" />
         <pubDate>2021-10-13 06:56:21 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813108401</guid>
      </item>
      <item>
         <title>Câu 3: vòng lặp for.</title>
         <author>tranlong4163</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813122434</link>
         <description><![CDATA[<div>Nếu số lần lặp biết rõ, nên sử dụng vòng lặp for với các cú pháp:<br>Initialization : biểu thức thi hành một lần khi bắt đầu vòng lặp<br>Condition : mỗi lần kiểm tra điều kiện này là true thì khối lệnh thi hành, nếu false sẽ thoát khỏi vòng lặp.<br>Increment/Decrement : thi hành mỗi lần đến cuỗi vòng lặp<br>for(int x = 1; x &lt;=5; x++) {<br>&nbsp; System.out.println(x);<br>}<br><br>/* Xuất ra<br>1<br>2<br>3<br>4<br>5<br>*/<br>Ví dụ trên vòng lặp for hoạt động như sau: lần đầu gán x = 1; tiếp theo kiểm tra (x &lt;=5) nếu sai thoát ngay khỏi vòng lặp, nếu đúng thi hành khối lệnh, đến cuỗi thi hành x++ và lại bắt đầu lại từ kiểm tra (x &lt;= 5)<br><br>Ví dụ in các số chẵn từ 0 đến 10<br><br>for(int x=0; x&lt;=10; x=x+2) {<br>&nbsp; &nbsp; System.out.println(x);<br>}</div>]]></description>
         <enclosure url="http://zeptosystems.com/wp-content/uploads/2018/10/java-1.jpg" />
         <pubDate>2021-10-13 07:04:20 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813122434</guid>
      </item>
      <item>
         <title>Câu 1 : Cú pháp , cách dùng và ví dụ về câu lệnh điều kiện if-else:</title>
         <author>thienngohoang99</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813152279</link>
         <description><![CDATA[<div>- Cú pháp :&nbsp;<br>+ Cú pháp cơ bản if:<br>if(điều kiện) // thực hiện nếu điều kiện đúng;<br>+ Cú pháp cơ bản if - else:<br>if ( biểu thức điều kiện ) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// thực hiện nếu điều kiện đúng;<br>}<br>else // thực hiện nếu điều kiện sai;<br>+ Cú pháp rút gọn: (điều kiện)? //thực hiện nếu điều kiện đúng : //thực hiện nếu điều kiện sai;<br>+ Cú pháp phức tạp:&nbsp;<br>if (điều kiện 1) {<br>&nbsp; &nbsp; &nbsp; &nbsp; //thực hiện nếu điều kiện 1 đúng;<br>} else if (điều kiện 2) {<br>&nbsp; &nbsp; &nbsp; &nbsp;// thực hiện nếu điều kiện 2 đúng;<br>} else // thực hiện nếu 2 điều kiện trên không đúng;<br><br>- Cách dùng : Câu lệnh if else được sử dụng để đưa ra quyết định dựa trên việc kiểm tra đúng/sai của mệnh đề điều kiện, từ đó thuật toán sẽ đưa ra những hành động hoặc quyết định dựa trên kết quả của mệnh đề ấy.<br><br>Ví dụ : Nhập 3 mã số&nbsp; nhân viên , in ra các mã số nhân viên từ bé đến lớn.<br><br><br></div><pre>import java.util.Scanner;

public class Lesson1 {
    public static void main(String[] args) {
        int a,b,c;
        Scanner input = new Scanner(System.<em>in</em>);
        System.<em>out</em>.println("Nhập a :");
        a = input.nextInt();
        input.nextLine();
        System.<em>out</em>.println("Nhập b :");
        b = input.nextInt();
        input.nextLine();
        System.<em>out</em>.println("Nhâp c :");
        c = input.nextInt();
        input.nextLine();
        int max, min;
        max = (a&gt;b) ? ((a&gt;c)? a : c) : ((b&gt;c) ? b : c);
        min = (a&lt;b) ? ((a&lt;c)? a : c) : ((b&lt;c) ? b : c);
        System.<em>out</em>.println(" Thứ tự các mã số nhân viên là "+ min +"," + (a + b + c -max - min) + ", "+ max );
    }
}</pre><div><br>&nbsp;</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361624753/115d7b3d49da2a6fa591de18954bb6cd/OIP__1_.jpg" />
         <pubDate>2021-10-13 07:21:10 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813152279</guid>
      </item>
      <item>
         <title>Câu 4: Cấu trúc lặp while, Do.......while</title>
         <author>hotranquochuy0306</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813168163</link>
         <description><![CDATA[<div><strong><br></strong><strong><mark>Vòng lặp While</mark></strong><strong><br></strong><br></div><div><strong>Vòng lặp while trong java</strong> được sử dụng để lặp một phần của chương trình một vài lần. Nếu số lần lặp không được xác định trước thì vòng lặp lặp while được khuyến khích sử dụng trong trường hợp này.<br><br><strong>Cú pháp:</strong></div><pre>while(Điều kiên) {  
    // Khối lệnh được lặp lại cho đến khi điều kiện = False
}</pre><div><br><strong>Ví dụ minh hoạ:</strong></div><pre>public class DSNhanVien {
    int i = 1;
    <strong>public</strong> <strong>static</strong> Scanner scanner = <strong>new </strong>Scanner(System.in);
    <strong>public</strong> <strong>static</strong> <strong>void</strong> main(String[] args) {
        System.out.print("Nhập số lượng nhân viên: ");
        <strong>int</strong> n = scanner.nextInt();
        <strong>int</strong>[] arr = <strong>new</strong> <strong>int</strong>[n];
        System.out.print("Nhập tên các nhân viên trong khu nghỉ dưỡng: \n");
        <strong>while</strong> (i &lt;= n) {
            System.out.printf("Nhân viên thứ %d : \n ", i);
            arr[i] = scanner.nextInt();
            i++;
        }
        System.out.print("Danh sách nhân viên : \n ");
        show(arr);
    }
    <strong>public</strong> <strong>static</strong> <strong>void</strong> show(<strong>int</strong>[] arr) {
        <strong>while</strong> (i &lt;= n) {
            System.out.print(arr[i] + " ");
            i++;
        }
    }
}</pre><div><strong><br></strong><strong><mark>Vòng lặp do-while trong java</mark></strong><strong><br></strong><br></div><div><strong>Vòng lặp do-while trong java</strong> được sử dụng để lặp một phần của chương trình một vài lần. Tương tự như vòng lặp while, ngoại trừ do-while thực hiện lệnh ít nhất một lần ngay cả khi điều kiện là False.<br><br></div><div><strong>Cú pháp:</strong></div><pre>do {  
    // Khối lệnh được thực thi
} while(điều kiện);</pre><div><br><strong>Ví dụ minh hoạ:</strong></div><pre>public class TDTtoithieu extends DSNhanVien{
    public static void main(String[] args) {
        int SLNV = 1, sum = 0;
        do {
            sum += SLNV;
            SLNV++;
        } while (SLNV &lt;= n);
        System.out.println("Tổng doang thu tối thiểu mà tất cả nhân viên cần đạt được là: " + sum);
    }
}</pre><div><strong><br><br></strong><br><br></div><div><br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361625307/86f784895b08bb8bc8f923be6347b7b5/while_and_dowhile.png" />
         <pubDate>2021-10-13 07:29:53 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813168163</guid>
      </item>
      <item>
         <title>Câu 2 : Cấu trúc switch ... case :</title>
         <author>thienngohoang99</author>
         <link>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813178153</link>
         <description><![CDATA[<div>- Cú pháp :&nbsp;<br>switch ( biến){<br>case (giá trị 1 của biến) : (câu lệnh thực hiện);<br>break;<br>case(giá trị 2 của biến) : (câu lệnh thực hiện)<br>break;<br>....<br>default : ( câu lệnh thực hiện)&nbsp; &nbsp; &nbsp;&nbsp;<br>}<br>-&nbsp; Ví dụ : Chọn các phím chức năng để đến phần bạn mong muốn.<br><br></div><pre>import java.util.Scanner;

public class Lesson1 {
    public static void main(String[] args) {
        int a;
        Scanner input = new Scanner(System.<em>in</em>);
        System.<em>out</em>.println("Nhập vào đường dẫn bạn muốn truy cập  :");
        System.<em>out</em>.println(" 1 : Thêm nhân viên ");
        System.<em>out</em>.println(" 2 : Xóa nhân viên ");
        System.<em>out</em>.println(" 3 : Sửa nhân viên  ");
        a = input.nextInt();
        switch (a){
            case 1 :
                System.<em>out</em>.println("Bạn đã chọn mục thêm nhân viên!");
                break;
            case 2 :  System.<em>out</em>.println("Bạn đã chọn mục xóa nhân viên!");
                break;
            case 3 : System.<em>out</em>.println("Bạn đã chọn mục sửa nhân viên!");
                break;
            default:
                System.<em>out</em>.println("Bạn nhập không đúng!");
        }

    }
}</pre><div><br><br></div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1361624753/3b46df5afb0069d1ec3c6ae85df7dae1/R__5_.png" />
         <pubDate>2021-10-13 07:35:14 UTC</pubDate>
         <guid>https://padlet.com/hotranquochuy0306/ake7lqrkcq43z1wy/wish/1813178153</guid>
      </item>
   </channel>
</rss>
