logo

Restoran menyusi va narxlarni ko’rsatadigan ilovani loyihalash

Загружено в:

12.08.2023

Скачано:

0

Размер:

253.81640625 KB
Restoran menyusi va narxlarni ko’rsatadigan ilovani
loyihalash  
NAZARIY QISM ......................................................................... 5
XULOSA ................................................................................... 32
KIRISH…………………………………………………………………………..
NAZARIY  QISM……………… ………........…………………………………
1. “Mobil ilovalar yaratish texnologiyasi” fanining maqsadi va umumiy 
ma'lumotlar……………………………………………………………….
2. Restoran menyusi inson hayotidagi  ahamiyati va maqsadi…………..
ASOSIY QISM………………………………………………………………….
1. Restoran menyusi mobil ilovasining mantiqiy strukturasi va uni 
shakllantirish………………………………………………………………
2. Restoran menyusi mobil ilovasining ko’rinishi, ekran sur’atlari va 
tegishli dastur 
kodlari……………………………………………………………………..
XULOSA…………………………………………………………………………
FOYDALANILGAN ADOBIYOTLAR VA MANBALAR ………………….  KIRISH
“Buyuk   ajdodimiz   Muhammad   Xorazmiyning   bir   hikmati   bor:   “So‘z   –   gul,
ish – meva”. O‘ylaymanki, bugun belgilab oladigan rejalaringiz qanchalik pishiq-
puxta   bo‘lsa,   ishingiz   ham   shunchalik   yaxshi   samara   beradi.   Sizlar   ko‘p   kitob
o‘qigan,   bilimli   avlod   sifatida   yurtimiz   o‘tmishda   jahon   sivizilizatsiyasi
beshiklaridan   biri   bo‘lganini   yaxshi   bilasiz.   Siz   Xorazmiylar,   Farg‘oniylar,
Beruniy   va   Ibn   Sino,   Ulug‘bek,   Navoiy   va   Boburlar,   Buxoriylar,   Termiziylar
avlodisiz.   Ana   shunday   buyuk   vatandoshlarimiz   yaratgan   bebaho   bilim   va
kashfiyotlar bugun ham butun insoniyatga xizmat qilmoqda. Ulug‘ allomalarimiz,
o‘zlarining olamshumul kashfiyot va ixtirolarini sizning yoshingizda – ayni kuchga
to‘lgan navqiron chog‘larida amalga oshirganlar. Siz ham, buyuk ajdodlardan ibrat
olib,   hayotda   mo‘’jizalar   yaratishga   astoydil   intilishingiz   kerak.”   –   dedi   Shavkat
Mirziyoyev .
Android ilovalari  asosan  JAVA tilida Android SDK (Software Development
Kit)   yordamida   ishlab   chiqilgan.   Android   ilovasini   ishlab   chiqish   uchun   C,   C++,
Scala   va   boshqalar   kabi   boshqa   tillardan   ham   foydalanish   mumkin,   biroq   JAVA
Android   ilovalarini   ishlab   chiqish   uchun   eng   ko p   qo llaniladigan   dasturlash   tiliʻ ʻ
hisoblanadi. Shunday qilib, agar siz Android-da yangi boshlovchi bo'lsangiz, unda
JAVA   tili   va   OOPS   tushunchalarini   to'liq   bilish   Android-ni   ishlab   chiqishni
boshlashdan   oldin   o'rganishingiz   kerak   bo'lgan   birinchi   narsadir.   AVA   -   bu
Android   ilovalarini   ishlab   chiqishda   ishlatiladigan   dasturlash   tili.   Bu   sinfga
asoslangan   va   ob'ektga   yo'naltirilgan   dasturlash   bo'lib,   sintaksisi   C++   tilidan
ta'sirlanadi.   JAVA   ning   asosiy   maqsadlari   oddiy,   ob'ektga   yo'naltirilgan,
mustahkam,   xavfsiz   va   yuqori   darajadagi   bo'lishdir.   JAVA   ilovasi   JVM   (JAVA
Virtual   Machine)   da   ishlaydi,   ammo   Androidda   mobil   qurilmalar   uchun
optimallashtirilgan   Dalvik   Virtual   Machine   (DVM)   deb   nomlangan   o'z   virtual
mashinasi   mavjud.   JAVA   dasturchisi   sifatida   sizga   kodlash   va   ishga   tushirish
uchun   ba'zi   vositalar   yoki   dasturlar   kerak   bo'ladi.   Internetda   ko'plab   vositalar
mavjud,   ammo   biz   sizga   JAVA-ni   o'rganish   uchun   Eclipse-dan   foydalanishni tavsiya   qilamiz,   chunki   u   Android   Studio   bilan   bir   qatorda   Androidni   ishlab
chiqishda ishlatiladigan eng keng tarqalgan vositadir. NAZARIY QISM
“Mobil ilovalar yaratish texnologiyasi” fanining maqsadi va umumiy
ma'lumotlar .
“Mobil ilovalar yaratish texnologiyasi” fanining maqsadi, mobil ilovalarni yaratish
va ulardan foydalanishning asosiy texnologik usullarini o'rgatishdir. Bu fan, mobil
ilovalarni   yaratishda   zarur   bo'lgan   dasturlash   tillari,   interfeyslar   va   platformalar
haqida   tushuncha   beradi.   Bu   texnologiya   yuqori   sifatli   mobil   ilovalarni   ishlab
chiqarishga imkon beradi va ularni muvaffaqiyatli bo'lishiga yordam beradi. 
Bu fan ta'lim dasturiga muvofiq, o'quvchilar mobil ilovalarni ishlab chiqish
jarayonida   kerakli   bo'lgan   qadamlarni   o'rganadilar.   Bu   qadamlar   orasida,   proyekt
tuzish,   dasturlash   tillari   bilan   ishlash,   interfeyslarni   tuzish   va   test   qilish   kabi
amallar kiritiladi. 
“Mobil ilovalar yaratish texnologiyasi” fanini o'qigan o'quvchilar uchun bir
necha   sohalarda   ish   olib   borishi   mumkin.   Masalan,   ular   mobil   ilovalarni
tayyorlashga   xizmat   ko'rsatuvchi   kompaniyalarda,   markazlarda   yoki   reklama
agentliklarida ishlashlari mumkin.
Bu fan talabalariga kerakli asosiy ko'makchi vositalar quyidagilardir:
- Mobil qurilmalar va ularning muammolari to'g'risida tushuncha
- Dasturlash tillari (Java, Swift, C ++, Python va boshqalar) bilan ishlash
- Interfeyslarni tuzish va test qilish uchun xususiy vositalarni o'rganish
-   Android   va   iOS   platformalari   uchun   ilovalar   yaratishga   oid   qonuniyatlarni
o'rganish.
“Mobil   ilovalar   yaratish   texnologiyasi”   fanining   umumiy   ma'lumotlari
asosan   dasturiy   ta'minotni   tahlil   qilish,   muharrirlik,   xatlar   ko'rinishini   yangilash
kabi   mavzularni   o'z   ichiga   oladi.   Bu   fan   orqali   talabalar   mobil   ilovalarni   ishlab
chiqish   jarayonida   keng   ko'lamli   o'zlashtirish,   yaxshi   fikrlarni   to'g'rilash   va
qo'shimcha imkoniyatlardan foydalanish qobiliyatini oshirishadi. Restoran menyusi inson hayotidagi  ahamiyati va maqsadi
Restoran   biznesida   restoran   boshqaruvining   integratsiyalashgan   dasturiy
ta'minot tizimlarining ahamiyati ko'pincha e'tibordan chetda qoladi. Ba'zida ushbu
dastur o'ziga xos mobil kassir sifatida ko'riladi va boshqa hech narsa yo'q. Biroq,
restoran boshqaruvi dasturiy ta'minot tizimlari bundan ham ko'proq narsani qiladi.
Ular   operatsiyalarni   soddalashtiradi,   kutish   vaqtlarini   qisqartiradi   va
mijozlaringizning   mamnuniyatiga   katta   ta'sir   qiladi,   bu   sizning   restoraningiz
muvaffaqiyatiga   bevosita   ta'sir   qiladi.   Asosiy   afzalliklardan   ba'zilari
quyidagilardir:
1.   Tashkil   etilgan   operatsiyalar   -   Restoran   boshqaruvi   dasturiy   ta'minot
tizimlari   inventarizatsiyani   boshqaradi,   menyuni   o'zgartirishni   osonlashtiradi,
rejalashtirishda   yordam   beradi   va   boshqa   ko'plab   muhim   vazifalarni   bajarishda
yordam beradi.
2. Mijozlarning sodiqligini oshirish - Ba'zi  tizimlar kuponlar kabi qimmatli
xususiyatlardan,   shuningdek,   hadya   qilishning   keng   imkoniyatlaridan   foydalanish
imkoniyatiga ega.
3. Muvaffaqiyatli server stantsiyalari - ular server samaradorligini oshirishga
yordam   beradi,   shuningdek,   kichikroq   va   samaraliroq   stantsiyalar   bilan   bo'sh
hisoblagich maydoniga hissa qo'shadi.
4.   Tezroq   xizmat   ko'rsatish   -   bu   xatolik   xavfini   kamaytirish   bilan   birga
stolning   tezroq   aylanishini,   shuningdek,   uyning   old   va   orqa   qismlari   (FOH   va
BOH) orqali yaxshilangan aloqani anglatadi.
5. Avtomatik to'lovlar - Tez, ishonchli va xavfsiz to'lovlarni qayta ishlash -
bu   restoranni   boshqarish   uchun   yaxshi   dasturiy   ta'minotsiz   bo'lishi   mumkin
bo'lmagan narsadir.  Restaurant ilovasini yaratishning asoslari
Bu   Restoranlar   menyusi   va   narxlarni   ko’rsatadigan   ilova.   Ushbu   ilova
foydalanuvchilarga   oldindan   boradigan   restoranlaridagi   narxlar   bilan   taom
turlarini bilish va ilova orqali buyurtma berishlari mumkin.
Yechim
Birinchi qadam 1: Yangi proyekt ochamiz 
Chapdagi eng yuqori burchakdagi Fayl opsiyasini bosing.
Keyin   yangi   tugmasini   bosing   va   yangi   loyihani   oching   va   loyihaga   nom
bering.
Endi Java tili bilan bo'sh faoliyatni tanlang. Unga Palov nomini beramiz. 2-qadam: activity_main.xml bilan foydalanuvchi interfeysini loyihalash
Quyidagi kodni activity_main.xml fayliga qo'shing. Bu erda asosiy tartib - bu
yo'nalishi vertikalga o'rnatilgan LinearLayout. Uning ichida bitta ImageView, bitta
TextView,   ikkita   tugma   va   ikkita   ImageButton   mavjud.   Tugma   va   ImageButton
gorizontal   yo'naltirish   uchun   LinearLayout   bolasi   ichida   joylashgan.   ImageView
tasvirni   ko'rsatish   uchun,   TextView   esa   savolni   ko'rsatish   uchun   ishlatiladi   va
tugma rost/noto'g'ri ko'rsatish uchun va ImageButton keyingi/oldingi savolga o'tish
uchun ishlatiladi.
Chiziladigan papkaga rasmlar qo'shish:
Quyida ushbu loyihada ishlatiladigan barcha chizilgan fayllar uchun havolalar
berilgan.
Taom tasvirlari uchun (f1/f2/f3/f4/f5/f6/f7): Bunga qarang.
Keyingi belgi uchun: Bunga qarang.
Oldingi belgi uchun: Bunga qarang.
Emoji uchun: Bunga qarang.
Quyida activity_main.xml faylining to liq kodi keltirilgan.ʻ activity_main.xml
<?xml version="1.0" encoding="utf-8"?><!--
   Sample backup rules file; uncomment and customize as necessary.
   See https://developer.android.com/guide/topics/data/autobackup
   for details.
   Note: This file is ignored for devices older that API 31
   See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
    <!--
   <include domain="sharedpref" path="."/>
   <exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
<?xml version="1.0" encoding="utf-8"?><!--
   Sample data extraction rules file; uncomment and customize as necessary.
      See   https://developer.android.com/about/versions/12/backup-restore#xml-
changes
   for details.
-->
<data-extraction-rules>
    <cloud-backup>
        <!-- TODO: Use <include> and <exclude> to control what is backed up.
        <include .../>
        <exclude .../>
        -->
    </cloud-backup>
    <!--
    <device-transfer>
        <include .../>         <exclude .../>
    </device-transfer>
    -->
</data-extraction-rules>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
    android:height="108dp"
    android:viewportWidth="108"
    android:viewportHeight="108">
    <path
        android:fillColor="#3DDC84"
        android:pathData="M0,0h108v108h-108z" />
    <path
        android:fillColor="#00000000"
        android:pathData="M9,0L9,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,0L19,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,0L29,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"         android:pathData="M39,0L39,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,0L49,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,0L59,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,0L69,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,0L79,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M89,0L89,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"         android:pathData="M99,0L99,108"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,9L108,9"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,19L108,19"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,29L108,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,39L108,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,49L108,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"         android:pathData="M0,59L108,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,69L108,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,79L108,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,89L108,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M0,99L108,99"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,29L89,29"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"         android:pathData="M19,39L89,39"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,49L89,49"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,59L89,59"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,69L89,69"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M19,79L89,79"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M29,19L29,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"         android:pathData="M39,19L39,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M49,19L49,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M59,19L59,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M69,19L69,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
    <path
        android:fillColor="#00000000"
        android:pathData="M79,19L79,89"
        android:strokeWidth="0.8"
        android:strokeColor="#33FFFFFF" />
</vector>
Endi   MainActivity.java-ga   quyidagi   kodni   qo'shing.   Bu   yerda   ma'lumotlarni
olish va o'rnatish uchun getters va setters usulidan foydalaning.
isAnswerTrue()   usuli   Question   Constructor-da   allaqachon   berilganidek,
javobTrue-ni qaytaradi.
MainActivity.java
package com.sdk.foddy import android.app.Application
import dagger.hilt.android.HiltAndroidApp
@HiltAndroidApp
class PalovApp : Application()
package com.sdk.foddy
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.Modifier
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.compose.rememberNavController
import com.sdk.foddy.ui.bottom.settings.SettingsViewModel
import com.sdk.foddy.ui.screen.RootNavigation
import com.sdk.foddy.ui.theme.FooddyTheme
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            val viewModel: SettingsViewModel = hiltViewModel()             val theme = when (viewModel.themeState.collectAsState().value) {
                1 -> false
                2 -> true
                else -> isSystemInDarkTheme()
            }
            FooddyTheme(
                darkTheme = theme
            ) {
                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    RootNavigation(navHostController = rememberNavController())
                }
            }
        }
    }
}
4-qadam:   Data_extractions.xml   fayli   bilan   ishlash   strings.xml   faylida   biz
savollar bankini taqdim etishimiz kerak. Ushbu faylga ko'plab savollar qo'shilishi
mumkin.
Data_extractions.xml
<?xml version="1.0" encoding="utf-8"?><!--
   Sample data extraction rules file; uncomment and customize as necessary.
      See   https://developer.android.com/about/versions/12/backup-restore#xml-
changes
   for details.
-->
<data-extraction-rules>     <cloud-backup>
        <!-- TODO: Use <include> and <exclude> to control what is backed up.
        <include .../>
        <exclude .../>
        -->
    </cloud-backup>
    <!--
    <device-transfer>
        <include .../>
        <exclude .../>
    </device-transfer>
    -->
</data-extraction-rules>  
5-qadam: ModelCourse.java bilan ishlash
Ilova   ishga   tushirilganda   birinchi   navbatda   onCreate()   usuli   chaqiriladi.
Question[]   massivi   savol   identifikatori   va   savolga   to'g'ri   javob   bilan   yaratilgan.
SetOnClickListener()   usuli   har   doim   Button/ImageButton   bosilganda   chaqiriladi,
shuning   uchun   foydalanuvchi   tugmani   bosganida   getId()   usuli   orqali   o zʻ
identifikatorini   tekshiradi   va   bizning   mantiqqa   muvofiq   amallarni   bajaradi.
updateQuestion()   TextView   ning   settext()   usuli   bo yicha   savolni   yangilaydi   va	
ʻ
savol   raqamini   kuzatish   orqali   tasvirlarni   o zgartiradi.   checkAnswer()   usuli	
ʻ
tugmani   bosgan   holda   asl   javobni   tekshiradi   va   matnni   mos   ravishda   ko'rsatish
uchun Toast dan foydalanadi. ModelCourse.java
package com.sdk.foddy.ui
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color
import androidx.navigation.compose.rememberNavController
import com.sdk.foddy.ui.component.BottomBar
import com.sdk.foddy.ui.screen.MainNavGraph
@Composable
fun MainScreen() {
    val navHostController = rememberNavController()
    Scaffold(
        bottomBar = {
            BottomBar(navController = navHostController)
        }
    ) { paddingValues ->
        Column(modifier = Modifier.padding(paddingValues)) {
            MainNavGraph(navHostController = navHostController)
        }
    }
}
package com.sdk.foddy.ui.bottom.settings
sealed class SettingsEvent {
    data class OnChangeTheme(val index: Int): SettingsEvent()
} package com.sdk.foddy.ui.bottom.settings
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.material.Text
import androidx.compose.material.TopAppBar
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import com.sdk.foddy.ui.component.ThemeItem
import com.sdk.foddy.ui.theme.AppFont
import com.sdk.foddy.ui.theme.ItimFont
@Composable
fun SettingsScreen() {
    val themeList = listOf("Automatic", "Light", "Dark")
    val viewModel: SettingsViewModel = hiltViewModel()
    val state = viewModel.themeState.collectAsState().value
    Column(
        modifier = Modifier
            .fillMaxSize()
            .background(                 color = MaterialTheme.colorScheme.secondaryContainer
            )
    ) {
        TopAppBar(
            title = {
                Text(
                    text = "Settings",
                    fontFamily = AppFont,
                    color = MaterialTheme.colorScheme.onSecondary
                )
            },
            backgroundColor = MaterialTheme.colorScheme.primary,
        )
        LazyColumn(
            contentPadding = PaddingValues(10.dp)
        ) {
            item {
                Text(
                    text = "Theme",
                    fontSize = 22.sp,
                    color = MaterialTheme.colorScheme.onSecondary,
                    fontFamily = ItimFont
                )
            }
            itemsIndexed(themeList) { index, item ->
                ThemeItem(isEnable = state == index, title = item) {
                    viewModel.onEvent(SettingsEvent.OnChangeTheme(index))
                }
            }
        }    UI QISMI BN ISHLASH
 package com.sdk.foddy.ui.bottom.settings
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.State
import androidx.compose.runtime.mutableStateOf
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.sdk.domain.use_case.base.AllUseCases
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import javax.inject.Inject
@HiltViewModel
class SettingsViewModel @Inject constructor(
    private val useCases: AllUseCases
) : ViewModel() {
    private val _themeState: MutableStateFlow<Int> = MutableStateFlow(0)
    val themeState: StateFlow<Int> get() = _themeState
    init {
        viewModelScope.launch {
            useCases.getThemeUseCase(Unit).collectLatest { theme ->
                _themeState.update {
                    theme
                }             }
        }
    }
    fun onEvent(event: SettingsEvent) {
        if (event is SettingsEvent.OnChangeTheme) {
            viewModelScope.launch {
                useCases.saveThemeUseCase(event.index)
            }
        }
    }
}
package com.sdk.foddy.ui.screen
import androidx.compose.runtime.Composable
import androidx.navigation.*
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.sdk.domain.model.Food
import com.sdk.foddy.ui.bottom.favorite.FavoriteScreen
import com.sdk.foddy.ui.bottom.recipes.RecipesScreen
import com.sdk.foddy.ui.bottom.settings.SettingsScreen
import com.sdk.foddy.ui.detail.main.DetailScreen
import com.sdk.foddy.ui.onboarding.MainPager
import com.sdk.foddy.ui.splash.SplashScreen
import com.sdk.foddy.util.Graph
fun   NavGraphBuilder.splashNavGraph(navHostController:
NavHostController) {
    navigation(         route = Graph.SPLASH,
        startDestination = "SPLASH"
    ) {
        composable(
            route = "SPLASH"
        ) {
            SplashScreen(navHostController)
        }
        composable(route = "ON_BOARDING") {
            MainPager(navHostController = navHostController)
        }
    }
}
@Composable
fun MainNavGraph(navHostController: NavHostController) {
    NavHost(
        navController = navHostController,
        route = Graph.MAIN,
        startDestination = BottomBarScreen.Recipes.route
    ) {
        composable(route = BottomBarScreen.Recipes.route) {
            RecipesScreen(navHostController)
        }
        composable(route = BottomBarScreen.Favorites.route) {
            FavoriteScreen(navHostController)
        }
        composable(route = BottomBarScreen.Settings.route) {
            SettingsScreen()
        }         detailsNavGraph(navHostController)
    }
}
fun   NavGraphBuilder.detailsNavGraph(navHostController:
NavHostController) {
    navigation(
        route = Graph.DETAIL,
        startDestination = "detail"
    ) {
        composable(
            route = "detail"
        ) {
            val food =
                navHostController.previousBackStackEntry?.savedStateHandle?.ge
t<Food>("food")
            DetailScreen(navHostController = navHostController, food = food)
        }
    }
} package com.sdk.foddy.ui.screen
import androidx.compose.runtime.Composable
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.sdk.foddy.ui.MainScreen
import com.sdk.foddy.util.Graph
@Composable
fun RootNavigation(navHostController: NavHostController) {     NavHost(
        navController = navHostController,
        route = Graph.ROOT,
        startDestination = Graph.SPLASH
    ) {
        splashNavGraph(navHostController = navHostController)
        composable(route = Graph.MAIN) {
            MainScreen()
        }
    }
}
DATABASE BILAN ISHLASH
package com.sdk.foddy.di
import android.content.Context
import androidx.room.Room
import com.sdk.data.local.database.FoodDao
import com.sdk.data.local.database.FoodDatabase
import com.sdk.data.local.manager.DataStoreManager
import com.sdk.data.repository.LocalRepositoryImpl
import com.sdk.domain.repository.LocalRepository
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class) object DatabaseModule {
    @[Provides Singleton]
        fun   provideDataStoreManager(@ApplicationContext   context:   Context):
DataStoreManager {
        return DataStoreManager(context)
    }
    @[Provides Singleton]
       fun provideLocalRepository(manager: DataStoreManager,dao:  FoodDao):
LocalRepository {
        return LocalRepositoryImpl(manager, dao)
    }
    @[Provides Singleton]
    fun provideFoodDatabase(
        @ApplicationContext context: Context
    ): FoodDatabase {
        return Room.databaseBuilder(
            context,
            FoodDatabase::class.java,
            "Food.db"
        ).build()
    }
    @[Provides Singleton]
    fun providesFoodDao(database: FoodDatabase): FoodDao {
        return database.dao
    }
}
package com.sdk.foddy.di import android.content.Context
import com.sdk.data.local.manager.DataStoreManager
import com.sdk.data.remote.network.FoodService
import com.sdk.data.repository.LocalRepositoryImpl
import com.sdk.data.repository.RemoteRepositoryImpl
import com.sdk.data.util.Constants
import com.sdk.domain.repository.LocalRepository
import com.sdk.domain.repository.RemoteRepository
import com.sdk.domain.use_case.base.AllUseCases
import com.sdk.domain.use_case.local.data_store.*
import com.sdk.domain.use_case.local.room.*
import com.sdk.domain.use_case.remote.GetAllRecipesUseCase
import com.sdk.foddy.util.NetworkHelper
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
import javax.inject.Singleton
@Module()
@InstallIn(SingletonComponent::class)
object NetworkModule {
    @[Provides Singleton]     fun provideOkhttp(): OkHttpClient {
        return OkHttpClient.Builder()
            .connectTimeout(30, TimeUnit.SECONDS)
            .readTimeout(30, TimeUnit.SECONDS)
            .build()
    }
    @[Provides Singleton]
    fun provideFoodService(
        okHttpClient: OkHttpClient
    ): FoodService {
        return Retrofit.Builder()
            .baseUrl(Constants.BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .client(okHttpClient)
            .build()
            .create(FoodService::class.java)
    }
    @[Provides Singleton]
    fun provideRemoteRepository(service: FoodService): RemoteRepository {
        return RemoteRepositoryImpl(service)
    }
    @[Provides Singleton]
    fun provideAllUseCases(
        remoteRepository: RemoteRepository,
        localRepository: LocalRepository
    ): AllUseCases {
        return AllUseCases(             getAllRecipesUseCase = GetAllRecipesUseCase(remoteRepository),
            saveFoodTypeUseCase = SaveFoodTypeUseCase(localRepository),
            getFoodTypeUseCase = GetFoodTypeUseCase(localRepository),
                        getFavoriteFoodByIdUseCase   =
GetFavoriteFoodByIdUseCase(localRepository),
                        getFavoriteFoodsUseCase   =
GetFavoriteFoodsUseCase(localRepository),
                        saveFavoriteFoodUseCase   =
SaveFavoriteFoodUseCase(localRepository),
                        deleteFavoriteFoodUseCase   =
DeleteFavoriteFoodUseCase(localRepository),
                        deleteAllFavoriteFoodsUseCase   =
DeleteAllFavoriteFoodsUseCase(localRepository),
            saveThemeUseCase = SaveThemeUseCase(localRepository),
            getThemeUseCase = GetThemeUseCase(localRepository),
            getUserVisitingUseCase = GetUserVisitingUseCase(localRepository),
                        saveUserVisitingUseCase   =
SaveUserVisitingUseCase(localRepository)
        )
    }
    @[Provides Singleton]
        fun   provideNetworkHelper(@ApplicationContext   context:   Context):
NetworkHelper {
        return NetworkHelper(context)
    }
} XULOSA
Ushbu   material   mobil   ilovalar   yaratish   texnologiyasi   sohasida   mustaqil   ish
uchun   nazariy   materialni   taqdim   etadi.   Mobil   ilovalar,   bugungi   kunda   aholining
hayotida   katta   ahamiyatga   ega   bo'lgan   sohalardan   biridir.   Mobil   ilovalar   yaratish
sohasi,   o'ziga   xosliklari   va   imkoniyatlari   bilan   mustaqil   ish   uchun   eng   qiziqarli
sohalardan biri hisoblanadi.
Dasturda   JSON   formati   yordamida   ma'lumotlar   va   funksiyalar   saqlanadi.
JSON formati ma'lumotlar va funksiyalar qatorlaridan iborat bo'lib, ularga qulaylik
bilan murojaat qilish imkonini beradi.
Dasturning ko'rinishi  esa GridLayout  va CardViewdan foydalanilgan. Bosh
sahifada   GridLayout   tarkibida   bo'limlar   joylashgan.   Har   bir   bo'lim
MaterialCardViewga   o'girilgan,   bu   CardViewning   shaklini   tahrirlash   va
ma'lumotlarni ko'rsatish imkonini beradi.
Dasturda "Resources" va "Prepositions" kabi bo'limlarda MaterialCardView
va   LinearLayoutlar   ishlatilgan.   Har   bir   bo'limda   asosiy   ma'lumotlar   va   mavzular
ko'rsatilgan. Tasvirlar  va matnlar  orqali  dastur  foydalanuvchiga ilovaning qanday
ko'rinishda bo'lganligini va qanday funksiyalarga ega bo'lganligini tushuntiradi.
Shu   bilan   birga,   dasturda   NestedScrollView   va   MaterialCardView   kabi
vidjetlar   ham   ishlatilgan,   bu   esa   ilovada   vizual   ravishni   osonlashtiradi   va
foydalanuvchiga yorqin tajribani taqdim etadi. Foydalanilgan adabiyotlar
1.   "Android   Programming:   The   Big   Nerd   Ranch   Guide"   -   Bill   Phillips   va   Brian
Hardy   Bu   kitob   Android   ilovalarini   o'rganish   uchun   eng   yaxshi   qo'llanma
hisoblanadi. Android Studio'dan foydalanish, interfeys tuzish, ma'lumotlar bazasini
boshqarish va boshqa muhim mavzular haqida qisqacha tushuntirishlar mavjud
 2. "Android Studio Development Essentials" - Neil Smyth Neil Smyth tomonidan
yaratilgan   bu   kitob   Android   Studio'da   mobil   ilovani   tuzishni   o'rganishga   yo'l
qo'ymoqda.   Uning   ichida   o'quvchi   yozuvi,   interfeys   tuzish,   foydalanuvchi
kiritishni qabul qilish va ilova testlash bo'yicha ma'lumotlar mavjud. 
3. "Professional  Android Studio" - Adam Gerber, Clifton Craig va et al. Bu kitob
Android   Studio'da   ilova   tuzishni   o'rganish   uchun   yuqori   darajadagi   tajribaga   ega
dasturchilar uchun mo'ljallangan. Uning ichida proyekt boshlash, kod yozish, tahlil
qilish, ilova to'plash, ma'lumotlar bazasi ishlash va boshqa ko'p muhim mavzularni
o'rganishingiz mumkin. 
4. "Android Application Development All-in-One For Dummies" - Barry Burd Bu
kitob   Android   Studio   va   Kotlin   tilini   ishlatish   orqali   mobil   ilova   yaratishni
o'rganishga   yo'l   qo'yadi.   Uning   ichida   Android   ilovalarini   tuzishning   asosiy
aspektlari,   interfeys   qurish,   foydalanuvchi   kiritishni   qabul   qilish,   ma'lumotlar
bazasini boshqarish va ilova testlash to'g'risida ma'lumotlar mavjud. 
5.   "Head   First   Android   Development"   -   Dawn   Griffiths   va   David   Griffiths   Bu
kitob   o'quv   markazida   ham   foydalanish   uchun   mo'ljallangan.   Uning   ichida
Android   Studio'da   mobil   ilova   yaratishning   asosiy   aspektlarini   tushuntirilgan,
uningdiki   interfeys   tuzish,   ma'lumotlar   bazasini   ishlash,   animatsiyalar,   ilovalarni
to'plash va boshqa ko'p mavzularni tushuntiradigan jarayoniy o'qituvchi mavjud.

Restoran menyusi va narxlarni ko’rsatadigan ilovani loyihalash NAZARIY QISM ......................................................................... 5 XULOSA ................................................................................... 32 KIRISH………………………………………………………………………….. NAZARIY QISM……………… ………........………………………………… 1. “Mobil ilovalar yaratish texnologiyasi” fanining maqsadi va umumiy ma'lumotlar………………………………………………………………. 2. Restoran menyusi inson hayotidagi ahamiyati va maqsadi………….. ASOSIY QISM…………………………………………………………………. 1. Restoran menyusi mobil ilovasining mantiqiy strukturasi va uni shakllantirish……………………………………………………………… 2. Restoran menyusi mobil ilovasining ko’rinishi, ekran sur’atlari va tegishli dastur kodlari…………………………………………………………………….. XULOSA………………………………………………………………………… FOYDALANILGAN ADOBIYOTLAR VA MANBALAR ………………….

KIRISH “Buyuk ajdodimiz Muhammad Xorazmiyning bir hikmati bor: “So‘z – gul, ish – meva”. O‘ylaymanki, bugun belgilab oladigan rejalaringiz qanchalik pishiq- puxta bo‘lsa, ishingiz ham shunchalik yaxshi samara beradi. Sizlar ko‘p kitob o‘qigan, bilimli avlod sifatida yurtimiz o‘tmishda jahon sivizilizatsiyasi beshiklaridan biri bo‘lganini yaxshi bilasiz. Siz Xorazmiylar, Farg‘oniylar, Beruniy va Ibn Sino, Ulug‘bek, Navoiy va Boburlar, Buxoriylar, Termiziylar avlodisiz. Ana shunday buyuk vatandoshlarimiz yaratgan bebaho bilim va kashfiyotlar bugun ham butun insoniyatga xizmat qilmoqda. Ulug‘ allomalarimiz, o‘zlarining olamshumul kashfiyot va ixtirolarini sizning yoshingizda – ayni kuchga to‘lgan navqiron chog‘larida amalga oshirganlar. Siz ham, buyuk ajdodlardan ibrat olib, hayotda mo‘’jizalar yaratishga astoydil intilishingiz kerak.” – dedi Shavkat Mirziyoyev . Android ilovalari asosan JAVA tilida Android SDK (Software Development Kit) yordamida ishlab chiqilgan. Android ilovasini ishlab chiqish uchun C, C++, Scala va boshqalar kabi boshqa tillardan ham foydalanish mumkin, biroq JAVA Android ilovalarini ishlab chiqish uchun eng ko p qo llaniladigan dasturlash tiliʻ ʻ hisoblanadi. Shunday qilib, agar siz Android-da yangi boshlovchi bo'lsangiz, unda JAVA tili va OOPS tushunchalarini to'liq bilish Android-ni ishlab chiqishni boshlashdan oldin o'rganishingiz kerak bo'lgan birinchi narsadir. AVA - bu Android ilovalarini ishlab chiqishda ishlatiladigan dasturlash tili. Bu sinfga asoslangan va ob'ektga yo'naltirilgan dasturlash bo'lib, sintaksisi C++ tilidan ta'sirlanadi. JAVA ning asosiy maqsadlari oddiy, ob'ektga yo'naltirilgan, mustahkam, xavfsiz va yuqori darajadagi bo'lishdir. JAVA ilovasi JVM (JAVA Virtual Machine) da ishlaydi, ammo Androidda mobil qurilmalar uchun optimallashtirilgan Dalvik Virtual Machine (DVM) deb nomlangan o'z virtual mashinasi mavjud. JAVA dasturchisi sifatida sizga kodlash va ishga tushirish uchun ba'zi vositalar yoki dasturlar kerak bo'ladi. Internetda ko'plab vositalar mavjud, ammo biz sizga JAVA-ni o'rganish uchun Eclipse-dan foydalanishni

tavsiya qilamiz, chunki u Android Studio bilan bir qatorda Androidni ishlab chiqishda ishlatiladigan eng keng tarqalgan vositadir.

NAZARIY QISM “Mobil ilovalar yaratish texnologiyasi” fanining maqsadi va umumiy ma'lumotlar . “Mobil ilovalar yaratish texnologiyasi” fanining maqsadi, mobil ilovalarni yaratish va ulardan foydalanishning asosiy texnologik usullarini o'rgatishdir. Bu fan, mobil ilovalarni yaratishda zarur bo'lgan dasturlash tillari, interfeyslar va platformalar haqida tushuncha beradi. Bu texnologiya yuqori sifatli mobil ilovalarni ishlab chiqarishga imkon beradi va ularni muvaffaqiyatli bo'lishiga yordam beradi. Bu fan ta'lim dasturiga muvofiq, o'quvchilar mobil ilovalarni ishlab chiqish jarayonida kerakli bo'lgan qadamlarni o'rganadilar. Bu qadamlar orasida, proyekt tuzish, dasturlash tillari bilan ishlash, interfeyslarni tuzish va test qilish kabi amallar kiritiladi. “Mobil ilovalar yaratish texnologiyasi” fanini o'qigan o'quvchilar uchun bir necha sohalarda ish olib borishi mumkin. Masalan, ular mobil ilovalarni tayyorlashga xizmat ko'rsatuvchi kompaniyalarda, markazlarda yoki reklama agentliklarida ishlashlari mumkin. Bu fan talabalariga kerakli asosiy ko'makchi vositalar quyidagilardir: - Mobil qurilmalar va ularning muammolari to'g'risida tushuncha - Dasturlash tillari (Java, Swift, C ++, Python va boshqalar) bilan ishlash - Interfeyslarni tuzish va test qilish uchun xususiy vositalarni o'rganish - Android va iOS platformalari uchun ilovalar yaratishga oid qonuniyatlarni o'rganish. “Mobil ilovalar yaratish texnologiyasi” fanining umumiy ma'lumotlari asosan dasturiy ta'minotni tahlil qilish, muharrirlik, xatlar ko'rinishini yangilash kabi mavzularni o'z ichiga oladi. Bu fan orqali talabalar mobil ilovalarni ishlab chiqish jarayonida keng ko'lamli o'zlashtirish, yaxshi fikrlarni to'g'rilash va qo'shimcha imkoniyatlardan foydalanish qobiliyatini oshirishadi.