Min ta moduldan iborat dastur tuzing(dasturlash tili va mavzu erkin)



Download 432,8 Kb.
bet1/3
Sana31.12.2021
Hajmi432,8 Kb.
#234192
  1   2   3
Bog'liq
DTST



Topshiriq .

1. Min 3 ta moduldan iborat dastur tuzing(dasturlash tili va mavzu erkin)

2. Unit test

3. Integration test

4. Sistem

Bu kalkulyatorni kodi bu yerda bir nechta funsiyalar va modullr mavjud va shu boyicha yuqoridagi topshiriqlarni bajarib chiqaman

package uz.azn.calculate

import android.annotation.SuppressLint


import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.view.View
import uz.azn.calculate.databinding.ActivityMainBinding
import java.lang.StringBuilder
import kotlin.math.log

class MainActivity : AppCompatActivity() {

val stringBuilder: StringBuilder = StringBuilder()
var tempStringBuilder: StringBuilder = StringBuilder()
private var value1: Double = 0.0
private var value2: Double = 0.0
private var operation: String = ""
private var finalResult: Double = 0.0
val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)
binding.oneButton.setOnClickListener { onClick(binding.oneButton) }
binding.twoButton.setOnClickListener { onClick(binding.twoButton) }
binding.threeButton.setOnClickListener { onClick(binding.threeButton) }
binding.fourButton.setOnClickListener { onClick(binding.fourButton) }
binding.fiveButton.setOnClickListener { onClick(binding.fiveButton) }
binding.sixButton.setOnClickListener { onClick(binding.sixButton) }
binding.sevenButton.setOnClickListener { onClick(binding.sevenButton) }
binding.eightButton.setOnClickListener { onClick(binding.eightButton) }
binding.nineButton.setOnClickListener { onClick(binding.nineButton) }
binding.zeroButton.setOnClickListener { onClick(binding.zeroButton) }
binding.pointButton.setOnClickListener { onClick(binding.pointButton) }
binding.cButton.setOnClickListener { onClick(binding.cButton) }
binding.deleteButton.setOnClickListener { onClick(binding.deleteButton) }

//Math operation buttons
binding.plusButton.setOnClickListener { btnMath(binding.plusButton) }
binding.minusButton.setOnClickListener { btnMath(binding.minusButton) }
binding.multiplyButton.setOnClickListener { btnMath(binding.multiplyButton) }


Download 432,8 Kb.

Do'stlaringiz bilan baham:
  1   2   3




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish