Guruh: 214-17. Toshev Osmon 4-Amaliy ish. Mavzu. Teskari zanjir usuli. Ishdan maqsad


Download 335.13 Kb.
Sana10.12.2020
Hajmi335.13 Kb.
#163586
Bog'liq
SI 4-amaliy Toshev


Guruh: 214-17. Toshev Osmon

4-Amaliy ish.

Mavzu. Teskari zanjir usuli.

Ishdan maqsad: Qoidalarning teskari zanjiri tushunchasi o’rganish va qoidalarning teskari zanjir usuli asosida o’quv markazi daromadini oshirishga yo’naltirilgan dastur ishlab chiqish.

Masalaning qo’yilishi: O’quv markazining yillik soffoydasiga qarab tahlil qiluvchi va holatdan kelib chiqgan holda foydani qanday sabablarga ko’ra kelganligi yoki nima sababdan foyda ko’rilmaganligini ko’rsatib beruvchi dastur tuzilsin.
FOYDA=DAROMAD-XARAJAT

Agar DAROMAD=XARAJAT bo’lsa, unda FOYDA=0 bo’ladi.

Agar DAROMAD

Agar DAROMAD>XARAJAT bo’lsa, unda FOYDA>0 bo’ladi.

Baliqchilikdan foyda ko’rgan holat uchun teskari zanjir usuli

  1. Chunki siz baliqchilikka ko’proq investitsiya kiritdingiz.

  2. Chunki siz baliq boqish uchun qulay joy tanladingiz.

  3. Chunki siz baliq boqishda to’g’ri yo’l tanladingiz.

Baliqchilikdanfoyda ko’rmagan hoalt ucun teskari zanjir usuli

1.Chunki siz yetarlicha investetsiya kiritnadingiz.

2.Chunki siz baliq boqish uchun qulay joy tanlamadingiz.

3.Chunki siz baliq boqishda no’to’g’ri yondoshingiz.



Xulosa


Ushbu amaliy ishni bajarish davomida men, teskari zanjir usuli haqida amaliy va nazariy bilimlarga ega bo’lib, uni amaliyotda qo’lladim.

Ilova:

Java ko’rinishi:

package com.uzandroid.si_4_amaliy_ish;



import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;
import static java.lang.Integer.parseInt;

public class MainActivity extends AppCompatActivity {

private EditText inputText;
private Button nateja;
private int sum;
private LinearLayout ijobiy;
private LinearLayout salbiy;

@Override


protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//get ids
salbiy = findViewById(R.id.salbiyNatijaId);
ijobiy = findViewById(R.id.ijobiyNatijaId);
inputText = findViewById(R.id.inputTextId);
nateja = findViewById(R.id.buttonId);

nateja.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

sum = Integer.parseInt(inputText.getText().toString());

if (sum >= 10000000) {
ijobiy.setVisibility(View.VISIBLE);
salbiy.setVisibility(View.GONE);
} else if (sum < 1000000) {
salbiy.setVisibility(View.VISIBLE);
ijobiy.setVisibility(View.GONE);
} else {
Toast.makeText(MainActivity.this, "Ma'lumot yuq", Toast.LENGTH_SHORT).show();
}

}
});


}


}

XML ko’rinishi:

xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFEB0B"
android:orientation="vertical"
tools:context=".MainActivity">

<Space
android:layout_width="match_parent"
android:layout_height="16dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/dars_4"
android:textColor="#000"
android:textSize="24sp"
android:textStyle="bold" />

<Space
android:layout_width="match_parent"
android:layout_height="16dp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/baliqchilik"
android:textColor="#FF5722"
android:textSize="24sp"
android:textStyle="italic" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text="@string/hisobot"
android:textColor="#C4000000"
android:textSize="18sp"
android:textStyle="normal" />

<Space
android:layout_width="match_parent"
android:layout_height="8dp" />

<EditText
android:id="@+id/inputTextId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:hint="@string/hisob"
android:inputType="numberDecimal"
android:padding="16dp"
android:textSize="18sp"
android:typeface="serif"
tools:ignore="Autofill" />

<Space
android:layout_width="match_parent"
android:layout_height="16dp" />

<Button
android:id="@+id/buttonId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:background="@drawable/buttonbackground"
android:padding="10dp"
android:text="@string/hisobotButton"
android:textColor="#FFEB3B"
android:textSize="20sp" />


<Space
android:layout_width="match_parent"
android:layout_height="24dp" />

<LinearLayout
android:id="@+id/ijobiyNatijaId"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="6dp"
android:background="#00BCD4"
android:orientation="vertical"
android:visibility="gone">


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob1"
android:textColor="#000"
android:textSize="18sp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob2"
android:textColor="#000"
android:textSize="18sp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob3"
android:textColor="#000"
android:textSize="18sp" />


LinearLayout
>

<LinearLayout
android:id="@+id/salbiyNatijaId"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="6dp"
android:background="#F74B3F"
android:orientation="vertical"
android:visibility="gone">


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob1_1"
android:textColor="#FFEB3B"
android:textSize="18sp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob2_1"
android:textColor="#FFEB3B"
android:textSize="18sp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="@string/hisob3_1"
android:textColor="#FFEB3B"
android:textSize="18sp" />

LinearLayout>

LinearLayout>
Download 335.13 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling