<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Edanur Gurgen on Medium]]></title>
        <description><![CDATA[Stories by Edanur Gurgen on Medium]]></description>
        <link>https://medium.com/@edanurgurgen94?source=rss-7097585245b7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*--k_zEm1bFKasVLf5aQolA.jpeg</url>
            <title>Stories by Edanur Gurgen on Medium</title>
            <link>https://medium.com/@edanurgurgen94?source=rss-7097585245b7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 18:20:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@edanurgurgen94/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ArrayList vs LinkedList in Java]]></title>
            <link>https://medium.com/@edanurgurgen94/arraylist-vs-linkedlist-in-java-1ce0929f38dd?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ce0929f38dd</guid>
            <category><![CDATA[arraylist-vs-linkedlist]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Fri, 15 Mar 2024 07:27:02 GMT</pubDate>
            <atom:updated>2024-03-15T07:27:02.707Z</atom:updated>
            <content:encoded><![CDATA[<p>ArrayList ve LinkedList, Java’daki iki popüler veri yapısıdır. Her ikisi de nesne koleksiyonlarını depolamak ve yönetmek için kullanılır, ancak farklı güçlü ve zayıf yönleri vardır.</p><p>ArrayList ve LinkedList, nesne gruplarını depolamak ve değiştirmek için bir mimari sunan bir sistem olan Java’nın Koleksiyon arayüzünün bir parçasıdır. Bu koleksiyon, verileri arama, sıralama, ekleme, değiştirme ve silme gibi işlemleri kolaylaştırır. Daha hızlı arama, ekleme ve silme yetenekleri sunarak hem insan çabasını hem de hesaplama süresi karmaşıklığını azaltır.</p><p>Hem ArrayList hem de LinkedList verileri doğrusal olarak depolarken ve aynı veri türünü barındırırken, karmaşık ayrıntıları ve kullanımları onları önemli ölçüde farklılaştırır. Dosya işleme yoluyla bu veri yapıları, verileri dosya sistemlerinde de depolayabilir ve sistemin çökmesi durumunda veri kurtarmayı garanti edebilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*A7ME6yTztEX4Q-rihJ4jHQ.png" /></figure><p><strong>Arraylist</strong>, Java’daki Koleksiyon arayüzünğn bir parçası olan bir sınıftır. List arayüzünü uygular, dolayısıyla List sınıfının tüm yöntemleri burada kullanılabilir. Arraylist sınıfını kullanabilmek için java.util paketini import etmemiz gerekmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZ4Bo0xeAi0BJF8EbKPqiQ.png" /></figure><p><strong>LinkedList</strong> de ArrayList gibi doğrusal veri yapılarıdır. Burada herhangi bir boyut belirtmemize gerek yoktur. Burada saklanan nesneler ArrayList gibi bitişik bellek konumlarında saklanmaz. LinkedList ‘düğümlerden’ oluşur. Bu düğümler, tıpkı bir dizinin hücreleri gibi LinkedList’in yapı taşlarıdır. Bir düğüm, nesne verilerini ve bir sonraki düğümün adresini kendi p adres alanında saklar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*dm2MZeBchQx-mj8labssUg.jpeg" /></figure><p><strong>2 tür LinkedList vardır:</strong></p><p><strong>Singly LinkedList —</strong> Burada her düğüm, listedeki yalnızca bir sonraki düğümün adresini saklar. Listeyi yalnızca tek bir yönde (baştan sona) geçebiliriz.</p><p><strong>Double Linked List—</strong> Burada her düğüm, listedeki önceki ve sonraki düğümün adresini saklar. Listeyi yalnızca her iki yönde de dolaşabiliriz (baştan sona ve sondan başlangıca).</p><p><strong>ArrayList ve LinkedList Arasındaki Temel Fark</strong></p><p>Java’da ArrayList ve LinkedList arasındaki temel fark, kullandıkları temel veri yapısı ve performans özellikleridir.</p><p>ArrayList, hızlı rastgele erişime ancak yavaş ekleme ve silmeye izin veren bir dizi kullanır. LinkedList, hızlı ekleme ve silmeye izin veren ancak yavaş rastgele erişime izin veren çift bağlantılı bir liste kullanır.</p><p>Ayrıca en büyük farklardan biri erişim süresinde yatmaktadır. ArrayList, indeks tabanlı erişim için O(1) zaman karmaşıklığı sağlar, ancak listeye ekleme ve çıkarmalar için O(n) sağlar. Buna karşılık LinkedList, ekleme ve kaldırma işlemleri için O(1) zaman karmaşıklığı sunarken, listede gezinmeyi gerektirdiğinden dizin tabanlı erişim için O(n) karmaşıklığını sunar.</p><p><strong>ArrayList veya LinkedList’i Ne Zaman Kullanmalıyız?</strong></p><p>ArrayList ve LinkedList, nesne koleksiyonlarını depolamak ve yönetmek için kullanılabilecek güçlü veri yapılarıdır. Kullanılacak en iyi veri yapısı uygulamanızın özel ihtiyaçlarına bağlıdır.</p><p>Hızlı rastgele erişime ihtiyaç duyduğunuzda ve çok fazla ekleme ve silme işlemi yapmanız gerekmediğinde ArrayList’i kullanın.</p><p>Hızlı ekleme ve silmeye ihtiyaç duyduğunuzda ve çok fazla rastgele erişim yapmanız gerekmediğinde LinkedList’i kullanın.</p><p>Sonuçta seçim, erişim kalıpları, veri değişiklikleri ve bellek kısıtlamaları arasında bir denge kurarak özel kullanım durumunuza ve performans önceliklerinize uygun olmalıdır.</p><p><em>Destekleriniz ve geri bildirimleriniz için teşekkür ederim.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ce0929f38dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ATM Project in Java]]></title>
            <link>https://medium.com/@edanurgurgen94/atm-project-in-java-04a045a4932e?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/04a045a4932e</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 06:51:36 GMT</pubDate>
            <atom:updated>2024-02-22T06:51:36.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1CL7h_NmxxisdJnR9m2OQ.jpeg" /></figure><p>We are creating an ATM project where the users can manage their bank accounts using Java loops.</p><pre>// create variables to use<br>String userName, password;<br>        Scanner scan = new Scanner(System.in);<br>        int right = 3;<br>        int balance = 1500;<br>        int select, amount;</pre><p>We can start the remaining trial by placing it in a while loop.</p><pre>while (right &gt; 0) {<br>            System.out.println(&quot;Enter your username :&quot;);<br>            userName = scan.nextLine();<br>            System.out.println(&quot;Enter your password : &quot;);<br>            password = scan.nextLine();</pre><p>If the user enters the information correctly, they will log in; if they cannot, they will be given the right to try 3 times and a notification for each incorrect answer.</p><pre> if (userName.equals(&quot;edanur&quot;) &amp;&amp; password.equals(&quot;developer2024&quot;)) {<br>                System.out.println(&quot;Hello Edanur .How can I help you today ?&quot;);</pre><pre>else {<br>      right--;<br>      System.out.println(&quot;You entered an incorrect username or password. Try again.&quot;);<br>                if (right == 0) {<br>                    System.out.println(&quot;Your account has been blocked. Please contact the bank.&quot;);<br>                } else {<br>                    System.out.println(&quot; your remaining right :&quot; + right);         </pre><p>If the user enters the information correctly. We will take the options as input and continue to query their selections with the Switch-Case structure.</p><pre>switch (select){<br><br>                        case 1:<br>                                System.out.print(&quot;amount of money to be loaded: &quot;);<br>                                amount = scan.nextInt();<br>                                balance += amount;<br>                                break;<br>                        case 2:<br>                                System.out.print(&quot;amount of money to be withdrawn :&quot;);<br>                                amount = scan.nextInt();<br>                                if (amount&gt;balance){<br>                                    System.out.println(&quot;insufficient funds.&quot;);<br>                                }<br>                                balance -= amount;<br>                                break;<br>                        case 3:<br>                                System.out.println(&quot;your balance : &quot;+ balance);<br>                                break;<br><br>                        default:<br>                                System.out.println(&quot;You have made an invalid action.&quot;);</pre><p>I chose to use the do-while structure so that the person can see the same options until they press the exit button.</p><pre>do {<br>                    System.out.println(&quot;Please select the option you want to do.\n : &quot;);<br>                    System.out.println(&quot;1-top up money\n&quot; + &quot;2-withdraw money\n&quot; + &quot;3-balance inquiry\n&quot; + &quot;4-exit&quot;);<br>                    select = scan.nextInt();</pre><pre>while (select != 4);<br>                System.out.println(&quot;Have a good day Edanur. See you again !&quot;);<br>                break;</pre><p>Since the codes have a nested structure, I broke them apart without proper alignment while explaining, but you can examine how the codes work as a whole on <a href="https://github.com/Runadee/Week-1/tree/main/ATMproject">GitHub</a>.</p><p><strong><em>Your support and feedback are greatly appreciated.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04a045a4932e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculate flight ticket prices according to distance and conditions in Java.]]></title>
            <link>https://medium.com/@edanurgurgen94/calculate-flight-ticket-prices-according-to-distance-and-conditions-in-java-784a685610e3?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/784a685610e3</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Sun, 18 Feb 2024 12:57:05 GMT</pubDate>
            <atom:updated>2024-02-18T12:57:05.519Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwWYnneUPBub2sSkHRoejQ.jpeg" /><figcaption>Plane flight sunset</figcaption></figure><p>Dear Medium readers, today I would like to share a program that calculates flight ticket prices under certain conditions. Let’s examine the codes one by one.</p><p>First, we can examine the conditions required from us and think a little to create the algorithm.</p><p>Get Distance (KM), age, and trip type (One Way, Round Trip) from the user. Get the price per distance as 0.10 TL / km. First, calculate the total price of the flight and then apply the following discounts to the customer according to the conditions;</p><ul><li>The values ​​received from the user must be valid (distance and age values ​​must be positive numbers, and the trip type must be 1 or 2). Otherwise, the user will be told “You have entered incorrect data!” A warning should be given.</li><li>If the person is under 12 years old, a 50% discount is applied to the ticket price.</li><li>If the person is between the ages of 12–24, a 10% discount is applied to the ticket price.</li><li>If the person is over 65 years old, a 30% discount is applied to the ticket price.</li><li>If the person has selected the “Trip Type” round trip, a 20% discount is applied to the ticket price.</li></ul><p>First, we define the required values ​​and import Scanner from the java util library so that the user can enter data.</p><pre>import java.util.Scanner;<br><br>public class Main {<br>    public static void main(String[] args) {<br><br>        // create values <br>        int age;<br>        double km, price, totalPrice;<br>        boolean isOneWayTicket ;<br><br>        Scanner input = new Scanner(System.in);<br><br>        // take values from user<br>        System.out.print(&quot;Please enter your age : &quot;);<br>        age=input.nextInt();<br><br>        System.out.print(&quot;Please enter the distance as KM : &quot;);<br>        km = input.nextInt();<br><br>        System.out.print(&quot;Please select the flight way. 1-one way or 2-round trip: &quot;);<br>        int ticketType= input.nextInt();<br>        isOneWayTicket = ticketType == 1 ;</pre><p>Now let’s set up our codes with the if-else structure to meet the conditions. If you wish, you can do it with switch-case or compile the codes by trying other methods.</p><pre> // calculating for each conditions with if-else structure<br>        if (km &gt;0 &amp;&amp; age&gt;0){<br>            if (age&lt;12){<br>                price = ((km*0.10)-(km*0.10)*0.5);<br>                totalPrice = isOneWayTicket ? price : ((price-(price*0.2))*2);<br>                System.out.println(totalPrice+&quot; $&quot;);<br>            } else if (age&lt;=12 &amp;&amp; age&lt;24) {<br>                price = ((km*0.10)-(km*0.10)*0.10);<br>                totalPrice = isOneWayTicket ? price : ((price-(price*0.20))*2);<br>                System.out.println(totalPrice + &quot; $&quot;);<br>            } else if (age &gt;= 65) {<br>                price = ((km*0.10)-(km*0.10)*0.30);<br>                totalPrice = isOneWayTicket ? price : ((price-(price*0.20))*2);<br>                System.out.println(totalPrice + &quot; $&quot;);<br>                <br>            } else {<br>                price = (km*0.10);<br>                totalPrice = isOneWayTicket ? price : (price*2);<br>                System.out.println(totalPrice+&quot; $&quot;);<br>            }<br><br>        } else {<br>            System.out.print(&quot;Invalid values !&quot;);<br>        }</pre><p>For more coding, you can visit my <a href="https://github.com/Runadee/Week-1/tree/main/flightTicketProject">GitHub</a> account and help me learn new and correct methods with your feedback.</p><p>Thanks to <a href="https://www.patika.dev/tr">Patika.dev </a>for the practice examples .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=784a685610e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is your horoscope?]]></title>
            <link>https://medium.com/@edanurgurgen94/what-is-your-horoscope-4c639df4f859?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c639df4f859</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 07:19:42 GMT</pubDate>
            <atom:updated>2024-02-16T07:19:42.452Z</atom:updated>
            <content:encoded><![CDATA[<p>We are writing a horoscope determination program in Java.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xr67geNhUOlazSGrbnnlwQ.jpeg" /></figure><p>We continue to improve our coding skills while thinking in daily life. I used the if-else structure in this work, but you can try it with a switch case.</p><p>The horoscope dates we will use in coding are attached.</p><pre>Aries ♈️: March 21 - April 19<br>Taurus ♉️: April 20 - May 20<br>Gemini ♊️: May 21 - June 20<br>Cancer ♋️: June 21 - July 22<br>Leo ♌️: July 23 - August 22<br>Virgo ♍️: August 23 - September 22<br>Libra ♎️: September 23 - October 22<br>Scorpio ♏️: October 23 - November 21<br>Sagittarius ♐️: November 22 - December 21<br>Capricorn ♑️: December 22 - January 19<br>Aquarius ♒️: January 20 - February 18<br>Pisces ♓️: February 19 - March 20</pre><p>First, let’s create a new Java project and then import the Scanner class from the Java util library, which will allow us to get the month and day of birth information from the user.</p><pre>import java.util.Scanner;</pre><p>Let’s define the values ​​we will use and assign the Scanner class.</p><pre>        int month , day ;<br>        String horoscope = &quot; &quot;;<br>        boolean isError = false;<br><br>        Scanner input = new Scanner(System.in);</pre><p>Let’s ask the user to enter the month and day of birth.</p><pre>        System.out.print(&quot;your birth month: &quot;);<br>        month = input.nextInt();<br><br>        System.out.print(&quot;your birth day: &quot;);<br>        day = input.nextInt();</pre><p>Now let’s write the conditions to evaluate our data in a way that meets the conditions. Here, we first start by restricting the month value to be entered between 1 and 12. Otherwise, we declare that you will have made an invalid entry.</p><pre>if ((month &gt;= 1) &amp;&amp; (month &lt;= 12)){<br><br>            if (month == 1) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Capricorn&quot;;<br>                    } else {<br>                        horoscope = &quot;Aquarius&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 2) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 28) {<br>                    if (day &lt; 20) {<br>                        horoscope = &quot;Aquarius&quot;;<br>                    } else {<br>                        horoscope = &quot;Pisces&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 3) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 30) {<br>                    if (day &lt; 20) {<br>                        horoscope = &quot;Pisces&quot;;<br>                    } else {<br>                        horoscope = &quot;Aries&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 4) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 30) {<br>                    if (day &lt; 20) {<br>                        horoscope = &quot;Aries&quot;;<br>                    } else {<br>                        horoscope = &quot;Taurus&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 5) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 20) {<br>                        horoscope = &quot;Taurus&quot;;<br>                    } else {<br>                        horoscope = &quot;Gemini&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 6) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 30) {<br>                    if (day &lt; 20) {<br>                        horoscope = &quot;Gemini&quot;;<br>                    } else {<br>                        horoscope = &quot;Cancer&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }</pre><p>We restrict the entered day values ​​according to how many days each month contains and how the rule in the horoscopes states it. Otherwise, we create an error message for the user.</p><pre> if (month == 7) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Cancer&quot;;<br>                    } else {<br>                        horoscope = &quot;Leo&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 8) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 30) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Leo&quot;;<br>                    } else {<br>                        horoscope = &quot;Virgo&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 9) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 30) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Virgo&quot;;<br>                    } else {<br>                        horoscope = &quot;Libra&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 10) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Libra&quot;;<br>                    } else {<br>                        horoscope = &quot;Scorpio&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 11) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 22) {<br>                        horoscope = &quot;Scorpio&quot;;<br>                    } else {<br>                        horoscope = &quot;Sagittarius&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>            if (month == 12) {<br>                if (day &gt;= 1 &amp;&amp; day &lt;= 31) {<br>                    if (day &lt; 21) {<br>                        horoscope = &quot;Sagittarius&quot;;<br>                    } else {<br>                        horoscope = &quot;Capricorn&quot;;<br>                    }<br>                } else {<br>                    isError = true;<br>                }<br>            }<br><br>        }else {<br>            isError = true ;<br>        }</pre><p>To make our codes more organized and to avoid unnecessary repetition, we defined the error message and horoscope notification screen together.</p><pre>if (isError){<br>            System.out.print(&quot;Invalid values! Please try again.&quot;);<br>        }else {<br>            System.out.print(&quot;Your Horoscope : &quot; + horoscope);<br>        }</pre><p>If you wish, you can review the codes on my <a href="https://github.com/Runadee/Week-1/tree/main/horoscopeFinder">GitHub</a> account.</p><p><strong><em>Thank you very much for your support and feedback.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c639df4f859" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Suggesting activities based on air temperature in Java]]></title>
            <link>https://medium.com/@edanurgurgen94/suggesting-activities-based-on-air-temperature-in-java-84b90c619ad0?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/84b90c619ad0</guid>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 07:04:55 GMT</pubDate>
            <atom:updated>2024-02-14T07:04:55.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3-cui3c5dfn9BAsygurtg.jpeg" /><figcaption>skiing man</figcaption></figure><p><strong>Dear Medium readers</strong>, I enjoy regularly sharing with you what I have learned and the codes I have written. I hope you enjoy it too.</p><p>Let’s write a program that will make activity suggestions <em>according to the air temperature.</em> The conditions are as follows :</p><ul><li>Suggest “Skiing” if the temperature is less than 5 degrees.</li><li>If the temperature is between 5 and 15 degrees, suggest the “Cinema” activity.</li><li>If the temperature is between 15 and 25 degrees, suggest the “Picnic” activity.</li><li>If the temperature is greater than 25 degrees, recommend the “Swimming” activity.</li></ul><p>First, we start by creating a <strong>new Java project</strong>. We import Scanner from the <strong>Java Util library,</strong> which will allow us to receive data from the user.</p><pre>// activity according to air temperature with if-else structure<br>import java.util.Scanner;<br><br>public class Main {<br>    public static void main(String[] args) {</pre><p>We define the value we use. Here we will only need the temperature value.</p><pre>        // create values<br>        int heat ;<br><br>        // defined Scanner class<br>        Scanner input = new Scanner(System.in);<br>        System.out.print(&quot;Please enter the heat : &quot;);<br>        heat = input.nextInt();</pre><p>We start organizing our conditional propositions with the<strong> if-else structure</strong> according to the degree of temperature entered by the user.</p><pre> // evaluate the conditions with activities<br>        if (heat &lt; 5){<br>            System.out.print(&quot;the weather is cold, but you can have a pleasant time skiing.&quot;);<br>        } else if (heat &lt;= 5 &amp;&amp; heat &lt;= 15) {<br>            System.out.print(&quot;It&#39;s a pretty nice day to go to the movies .&quot;);<br>        } else if (heat &gt;=15 &amp;&amp; heat &lt;=25 ) {<br>            System.out.print(&quot;It would be very enjoyable to go on a picnic.&quot;);<br>        } else {<br>            System.out.print(&quot;The weather is quite warm, suitable for swimming.&quot;);<br>        }</pre><p>In this way, we complete the program. The codes may have <em>different ways</em> and conditions. <a href="https://github.com/Runadee/Week-1/tree/main/activityAirTemp">GitHub Repo</a>.</p><p><strong><em>Thank you for your support. Your feedback is very valuable.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84b90c619ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculating passing grades with If - Else structure in Java]]></title>
            <link>https://medium.com/@edanurgurgen94/calculating-passing-grades-with-if-else-structure-in-java-64f34d4fbfa1?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/64f34d4fbfa1</guid>
            <category><![CDATA[if-else]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[java-development]]></category>
            <category><![CDATA[java-basics]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2024 11:59:00 GMT</pubDate>
            <atom:updated>2024-02-13T11:59:00.370Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fPw3lr9jiKgPbXHBE8FBTQ.png" /><figcaption>education way template</figcaption></figure><p>Greetings Medium readers. We will write a GPA program in which the course grades entered must be between 0 and 100.</p><p>Let’s start by creating a new project and importing the Scanner class from the util library, allowing us to receive user data.</p><pre>import java.util.Scanner;</pre><p>Let’s continue by defining the data we will use. We will need course names, results, and a denominator to divide them.</p><pre> // create valuables ; lessons and the denominator to divide<br>        float math , music, history , physic , chemic , result;<br>        int divisor = 0 ;<br><br>        // defined Scanner class<br>        Scanner input = new Scanner(System.in);</pre><p>Now we will ask the user to enter lecture notes.</p><p>Meanwhile, let’s create a condition based on whether the entered values ​​are within the appropriate range for the course grades, and if not, give an error message.</p><pre>// get the values from the user and evaluate with conditions<br>        System.out.print(&quot;Please enter your math grade: &quot;);<br>        math = input.nextFloat();<br>        if (0&lt;math &amp;&amp; math&lt;=100){<br>            divisor += 1;<br>        } else {// If an invalid grade is entered<br>            System.out.println(&quot;Invalid grade !&quot;);<br>        }</pre><p>Let’s apply this to all courses respectively, while the dividing denominator will increase one by one as long as the course grade meets the conditions.</p><pre>System.out.print(&quot;Please enter your music grade: &quot;);<br>        music = input.nextFloat();<br>        if (0&lt;music &amp;&amp; music&lt;=100){<br>            divisor += 1;<br>        } else {// If an invalid grade is entered<br>            System.out.println(&quot;Invalid grade !&quot;);<br>        }<br>        System.out.print(&quot;Please enter your history grade: &quot;);<br>        history = input.nextFloat();<br>        if (0&lt;history &amp;&amp; history&lt;=100){<br>            divisor += 1;<br>        } else {// If an invalid grade is entered<br>            System.out.println(&quot;Invalid grade !&quot;);<br>        }<br><br>        System.out.print(&quot;Please enter your physic grade: &quot;);<br>        physic = input.nextFloat();<br>        if (0&lt;physic &amp;&amp; physic&lt;=100){<br>            divisor += 1;<br>        } else {// If an invalid grade is entered<br>            System.out.println(&quot;Invalid grade !&quot;);<br>        }<br><br>        System.out.print(&quot;Please enter your chemic grade: &quot;);<br>        chemic = input.nextFloat();<br>        if (0&lt;chemic &amp;&amp; chemic&lt;=100){<br>            divisor += 1;<br>        } else { // If an invalid grade is entered<br>            System.out.println(&quot;Invalid grade !&quot;);<br>        }</pre><p>Now let’s calculate the GPA and print the result by evaluating it over 55, which is the passing grade.</p><pre>// print result and set passing average<br>        result = (math+music+history+physic+chemic) / divisor; //GPA calculation<br>        if (result &gt;= 55){<br>            System.out.println(&quot;Average : &quot;+ result);<br>            System.out.print(&quot;Congratulations ! You Passed !&quot;);<br>        }else{// If grade is less than 55<br>            System.out.println(&quot;Average : &quot;+ result);<br>            System.out.print(&quot;Sorry ! you haven&#39;t passed yet , but keep going :)&quot;);<br>        }</pre><p>I hope the content has been useful to you so far. You can also review the codes on <a href="https://github.com/Runadee/Week-1/tree/main/passingClass">GitHub</a>.</p><p><strong><em>Thank you for your support. Your feedback is very valuable.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64f34d4fbfa1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating User Login with Java]]></title>
            <link>https://medium.com/@edanurgurgen94/creating-user-login-with-java-3272197fe507?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3272197fe507</guid>
            <category><![CDATA[learn-java-basics]]></category>
            <category><![CDATA[java-learning-resouces]]></category>
            <category><![CDATA[java-backend]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Mon, 12 Feb 2024 19:00:38 GMT</pubDate>
            <atom:updated>2024-02-12T19:00:38.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bx1Rr-NeyAu8DicbintIpg.png" /></figure><p>Hello, dear <strong>Medium</strong> readers.<br>In this article, I will be sharing with you my first attempt at how to<strong> verify username and password in Java.</strong></p><p>First, let’s create a <em>new project</em> and import the <em>Scanner class</em> from the util library, which will allow us to receive data from the user.</p><pre>import java.util.Scanner;<br><br>public class Main {<br>    public static void main(String[] args) {<br>        // create values<br>        String userName, password, newPassword;<br>        int answer ;<br><br>        // defined Scanner class<br>        Scanner input = new Scanner(System.in);</pre><p>We continue by adding the codes where we ask the user to enter the <strong>username </strong>and <strong>password</strong>.</p><pre>  // take values from users<br>        System.out.print(&quot;Your Username : &quot;);<br>        userName = input.nextLine();<br><br>        System.out.print(&quot;Your Password: &quot;);<br>        password = input.nextLine();</pre><p>Then we start by checking whether the <strong>existing </strong>username and password <strong>match</strong>.</p><pre>  // conditions to check the accuracy of user information<br>        if (userName.equals(&quot;developerEdanur&quot;) &amp;&amp; password.equals(&quot;fullstack123&quot;)){<br>            System.out.print(&quot;Successfully logged in ! &quot;);<br>        } </pre><p>If the user logged in incorrectly, we ask whether would like to <em>create a new password</em>, considering the possibility that may not remember it after giving <em>an error message.</em></p><pre>else {<br>       System.out.println(&quot;Login Failed ! Do you want to reset your password ? &quot;);<br>       System.out.println(&quot;1-Yes\n2-No&quot;);<br>       answer = input.nextInt();<br>       input.nextLine();</pre><p>If the user selects 1, they are directed to create a new password.</p><pre>// Selected 1-Yes<br>            if (answer == 1) {<br>                System.out.print(&quot;Please enter your new password : &quot;);<br>                newPassword = input.nextLine(); // created new password</pre><p>But here we give an <em>error message</em> stating that the user cannot enter the same password as the previous one and that must create a different password.</p><pre>// check for same password<br>                if (newPassword.equals(&quot;fullstack123&quot;)){<br>                    System.out.println(&quot;Don&#39;t use your previous password !&quot;);// cannot use previous password<br>                    // request again a new password<br>                    System.out.print(&quot;The password could not be created, please enter another password: &quot;);<br>                    newPassword = input.nextLine();<br>                    if(newPassword != password){<br>                        System.out.print(&quot;Password created ! &quot;);<br>                    }<br>                } else{<br>                    System.out.print(&quot;Password created ! &quot;);<br>                }</pre><p>If the user says 2 in her first selection, we will directly indicate the error message she will encounter with the else structure.</p><pre>else {<br>        System.out.print(&quot;Login Failed ! &quot;);<br><br>     }</pre><p>In this way, we have seen how to write steps such as verifying the user’s login and creating a new password.</p><p>If you wish, you can review the codes on my <a href="https://github.com/Runadee/Week-1/tree/main/createUserLogin">GitHub</a>.</p><p>As I learn <strong>clean code </strong>and connect with big data, I will continue to share it with you.</p><p><strong><em>Your feedback is very valuable. Thanks for your support.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3272197fe507" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Calculator application with Java]]></title>
            <link>https://medium.com/@edanurgurgen94/calculator-application-with-java-7a51b26cae62?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a51b26cae62</guid>
            <category><![CDATA[switch-case-in-java]]></category>
            <category><![CDATA[java-learning-resouces]]></category>
            <category><![CDATA[calculator-apps]]></category>
            <category><![CDATA[if-else-condition]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Mon, 12 Feb 2024 09:07:49 GMT</pubDate>
            <atom:updated>2024-02-12T09:07:49.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_lu7MhDMI2R-YbPEaOrwBQ.jpeg" /><figcaption>mathematical operations</figcaption></figure><p><strong>Greetings my dear readers</strong>. I continue to progress with exercises in my <strong>Java learning </strong>adventure.</p><p>Today, I would like to share a calculator application I prepared using the <strong>switch-case structure.</strong></p><p>Let’s examine the codes in order.</p><p>First, let’s import the <strong>Scanner </strong>structure, which is necessary for the user to enter data, from the <strong>util library</strong>.</p><pre>import java.util.Scanner;</pre><p>We will ask the person to enter two numbers and choose the action they want to perform. Let’s define the <strong>values ​​</strong>we need at this stage.</p><pre>// create values<br>        int n1 , n2 , select ;</pre><p>Let’s define our <strong>scanner class</strong></p><pre>// defined Scanner Class<br>        Scanner input = new Scanner(System.in);</pre><p>Now let’s direct the user with our messages and enable them to enter the necessary data.</p><pre>  // take values for n1, n2 from users<br>        System.out.print(&quot;Enter the first number : &quot;);<br>        n1 = input.nextInt();<br><br>        System.out.print(&quot;Enter the second number : &quot;);<br>        n2 = input.nextInt();</pre><p>Then, let’s give the necessary commands for them to choose the action they want to perform.</p><pre> // enter the operator selection  to use.<br>        System.out.println(&quot;1-Addition\n2-subtraction\n3-multiplication\n4-division&quot;);<br>        System.out.print(&quot;Your selection : &quot;);<br>        select = input.nextInt();<br>        input.close();</pre><p><strong>Thanks to</strong> <a href="https://medium.com/u/2049fc353093">Kaan Kaçar</a> who gave his<strong> feedback</strong> here and informed me that I should close the scanner class when I reach the end. I hope I used it correctly. ( input.close();).</p><p>With the <strong>switch-case structure, </strong>we start writing the codes that compile the conditions for each case. Here we will need to warn the user about some mathematical situations. For example, a number cannot be divided by 0. For this situation, I add the<strong> if-else structure</strong> to my codes and send an error message to the user.</p><pre>        // Let&#39;s compile our conditional codes with the Switch-Case structure<br>        switch (select){<br>            case 1:<br>                System.out.print(&quot;Addition : &quot; + (n1 +n2));<br>                break;<br>            case 2:<br>                System.out.print(&quot;subtraction : &quot; + (n1 - n2));<br>                break;<br>            case 3:<br>                System.out.print(&quot;multiplication : &quot; + (n1 * n2));<br>                break;<br>            case 4:<br>                // A number cannot be divided by 0.<br>                if (n2 != 0){<br>                System.out.print(&quot;division : &quot; + (n1 / n2));<br>                break;<br><br>            }else{ //  If the person gives a value of 0, the answer that will be returned is.<br>                    System.out.print(&quot;A number cannot be divided by 0. Please make a valid transaction.\n&quot;);<br>                    break;<br>                }<br><br>            //default response if person makes wrong choice<br>            default:<br>                System.out.print(&quot;You entered an incorrect value! Please try again.\n&quot;);<br>        }</pre><p>When the user makes any<strong> undefined selection</strong>, the user will receive the error message we have prepared by <strong>default</strong>.</p><p>Thank you for reading this far. I am always open to <strong>improving</strong> myself and <strong>learning</strong>.</p><p><strong><em>Thank you for your feedback.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a51b26cae62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Grocery store program in Java]]></title>
            <link>https://medium.com/@edanurgurgen94/grocery-store-program-in-java-9d2bc0b1bda5?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d2bc0b1bda5</guid>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[learn-java]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-basics]]></category>
            <category><![CDATA[kodluyoruz]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Sun, 11 Feb 2024 15:45:14 GMT</pubDate>
            <atom:updated>2024-02-11T15:45:14.635Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9uAvCxjr3Rv7QE5_M6TYg.jpeg" /><figcaption>grocery store fruits &amp; vegetables</figcaption></figure><p>Let’s write a program in Java that prints the total amount of the products purchased by users from the grocery store according to their kilogram values.</p><p>First, we open the IDE we are using and create a new Java project.</p><p>In order to get the data we want from the user, we will need to use the Scanner feature from the Java util library.</p><pre><br>import java.util.Scanner;</pre><p>Then we will need to define the fruits and vegetables we want. Here I will assign a value to allow decimal numbers to be entered. Therefore, I will assign the data type double instead of integer.</p><pre> // Create values<br> double p,a,t,b,e; //  represents how many kg the customer wants to buy.</pre><pre>// defined Scanner class<br>        Scanner input = new Scanner(System.in);</pre><p>After defining our Scanner class, we write codes to determine which product and how many kg the customer wants to buy.</p><pre>  // take values per kg for each fruit and vegetable from the customer .<br>        System.out.print(&quot;How Many Kilos of pears ? : &quot;);<br>        p = input.nextDouble();<br><br>        System.out.print(&quot;How Many Kilos of apple ? :&quot;);<br>        a = input.nextDouble();<br><br>        System.out.print(&quot;How Many Kilos of tomato ? :&quot;);<br>        t = input.nextDouble();<br><br>        System.out.print(&quot;How Many Kilos of banana ? :&quot;);<br>        b = input.nextDouble();<br><br>        System.out.print(&quot;How Many Kilos of eggplant ? :&quot;);<br>        e = input.nextDouble();</pre><p>We have received our data, now we move on to the calculation part according to the price list per kg. The values ​​given here are random kg values ​​assigned to each product.</p><pre>// the final amount the customer will pay<br>double total = (p * 2.14)+(a * 3.67)+(t * 1.11)+(b * 0.95)+(e *5.00);</pre><p>Now let’s print the total amount to be paid.</p><pre>// let&#39;s print the result<br> System.out.print(&quot;total amount :  &quot; + total);</pre><p>I hope it was a useful content. Thank you very much in advance for your feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d2bc0b1bda5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taximeter Program in JAVA]]></title>
            <link>https://medium.com/@edanurgurgen94/taximeter-program-in-java-b01a2fcbe1c7?source=rss-7097585245b7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b01a2fcbe1c7</guid>
            <category><![CDATA[learn-java-basics]]></category>
            <category><![CDATA[java-programming]]></category>
            <category><![CDATA[java-learning-resouces]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kodluyoruz]]></category>
            <dc:creator><![CDATA[Edanur Gurgen]]></dc:creator>
            <pubDate>Sat, 10 Feb 2024 10:58:43 GMT</pubDate>
            <atom:updated>2024-02-10T10:58:43.547Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzICtv9JRvHSsvsatuPHWQ.jpeg" /><figcaption>taximeter</figcaption></figure><p>I continue to share my exercises while continuing my Java101 training with the <a href="https://medium.com/u/9ed172d44ff">Patika.dev</a> and <a href="https://medium.com/u/2c53aca6142e">kodluyoruz</a>. Thanks for the great lectures and exercises.</p><p>Let’s write a program in Java that prints the taximeter amount on the screen according to the distance traveled (KM).</p><p>Some of the conditions required from us for taximeters are as follows:</p><p>- Taximeter costs 2.20 TL per KM.<br>- The minimum payable amount is 20 TL. For fares under 20 TL, 20 TL will still be charged.<br>- Taximeter opening fee is 10 TL.</p><p><strong>Let’s do some coding :)</strong></p><p>I chose IntelliJ as the IDE, first, we created a new project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BMO-FcQ1BTTPtpA46J3FIQ.png" /><figcaption>creating a new project with IJ IDE</figcaption></figure><p>Afterward, we import the Scanner class from the Java util library to get the distance traveled from the user.</p><pre>import java.util.Scanner;</pre><p>Let’s define some values ​​that we will use in line with the conditions required of us. We will need new ones in the future, but for now, I will go with the order I have in mind.</p><pre> // create variables<br>        double pathTaken , taximeterRate= 2.20 , openingFee= 10.0 ;</pre><p>Let’s also define the Scanner class, which will allow us to receive data from the user. Since the user will enter data, I chose to name it input.</p><pre> // defined our Scanner class<br>        Scanner input = new Scanner(System.in);</pre><p>Now let’s ask the user to enter the distance traveled in km and print it with the nextDouble method.</p><pre>// take values from user<br>        System.out.print(&quot;distance traveled in km :  &quot;);<br>        pathTaken = input.nextDouble();</pre><p>It’s time to calculate the taximeter according to the conditions. To start, let’s calculate the 10 TL added and the 2.20 TL written per km.</p><pre>// create  total fee value and conditional results<br>       double total = ((pathTaken * 2.20 ) + openingFee);<br>       double result1 = 20.0;<br>       double result2 = total;</pre><p>Since our program is set to receive 20 TL from the customer for the amount below 20 TL, we will write a conditional code and determine which of the results should be selected according to the amount.</p><pre>// defined our condition for taximetre<br>       double condition = (total &lt;= 20.0) ? result1 : result2 ;</pre><p>and finally, we get our output :)</p><pre> // print taximeter amount<br>       System.out.print(&quot;Your taximeter amount : &quot; + condition );</pre><p>Some sample outputs based on km-based distances entered by the user:</p><pre>distance traveled in km :  4<br>Your taximeter amount : 20.0<br>Process finished with exit code 0</pre><pre>distance traveled in km :  20<br>Your taximeter amount : 54.0<br>Process finished with exit code 0</pre><p>I hope it was a useful work. If you wish, you can also review the project on my <a href="https://github.com/Runadee/Week-1/tree/main/taximeter">GitHub</a> account. I’m just learning Java so I’m open to your suggestions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b01a2fcbe1c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>