SlideShare a Scribd company logo
Please complete the following App using Parallel Arrays:
//
// ContentView.swift
// 2023-16-02-FoodImage-With-If-else
//
// Created by JPL-ST-SPRING2022 on 2/16/23.
//Andrew Dariush Sedigh
//Food Images
import SwiftUI
struct ContentView: View {
//declare 2 state variables
@State private var imageName = "pizza"
@State private var priceString = "Pizza: $12.99"
var body: some View {
VStack {
Image(imageName)
.resizable()
.frame(width:300, height:200, alignment: .center)
.scaledToFill()
.padding()
.border(.orange,width:2)
.imageScale(.large)
.foregroundColor(.accentColor)
Text(priceString)
.font(.largeTitle)
.fontWeight(.heavy)
.minimumScaleFactor(0.5)
.foregroundColor(.red)
.padding()
//.frame(width:300, height:150)
//.border(.orange, width:2)
Button("Next Dish") {
if imageName=="pizza"{
imageName = "burger"
priceString = "Burger: 15.99"
}
else if imageName == "burger" {
imageName = "noodle"
priceString = " Noodle: $13.99"
}
else if imageName == "noodle"{
imageName = "steak"
priceString = "Steak: 25.99"
}
else {
imageName = "pizza"
priceString = "Pizza: $12.99"
}
}
.buttonStyle(.borderedProminent)
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}

More Related Content

Similar to Please complete the following App using Parallel Arrays- -- -- Conte.pdf

Android UI
Android UI Android UI
Android UI
mailalamin
 
Android Ui
Android UiAndroid Ui
Android Ui
Jetti Chowdary
 
Canvas
CanvasCanvas
Canvas
Rajon
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
Jiaxuan Lin
 
SE2016 Android Mikle Anokhin "Speed up application development with data bind...
SE2016 Android Mikle Anokhin "Speed up application development with data bind...SE2016 Android Mikle Anokhin "Speed up application development with data bind...
SE2016 Android Mikle Anokhin "Speed up application development with data bind...
Inhacking
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data Binding
Radek Piekarz
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenes
Binary Studio
 
The Future of CSS with Web components
The Future of CSS with Web componentsThe Future of CSS with Web components
The Future of CSS with Web components
devObjective
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
ColdFusionConference
 
Android - Api & Debugging in Android
Android - Api & Debugging in AndroidAndroid - Api & Debugging in Android
Android - Api & Debugging in Android
Vibrant Technologies & Computers
 
Web Technology Record
Web Technology RecordWeb Technology Record
Web Technology Record
Lakshmi Sarvani Videla
 
Vigneshram murugan cloud project_documentation
Vigneshram murugan cloud project_documentationVigneshram murugan cloud project_documentation
Vigneshram murugan cloud project_documentation
Vigneshram Murugan
 
Evrone.ru / BEM for RoR
Evrone.ru / BEM for RoREvrone.ru / BEM for RoR
Evrone.ru / BEM for RoRDmitry KODer
 
Android For All The Things
Android For All The ThingsAndroid For All The Things
Android For All The Things
Paul Trebilcox-Ruiz
 
What's great in Appcelerator Titanium 0.8
What's great in Appcelerator Titanium 0.8What's great in Appcelerator Titanium 0.8
What's great in Appcelerator Titanium 0.8
Jeff Haynie
 
Building Reusable SwiftUI Components
Building Reusable SwiftUI ComponentsBuilding Reusable SwiftUI Components
Building Reusable SwiftUI Components
Peter Friese
 
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataForge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Autodesk
 
#JavaFX.forReal()
#JavaFX.forReal()#JavaFX.forReal()
#JavaFX.forReal()
Thierry Wasylczenko
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
SriKGangadharRaoAssi
 

Similar to Please complete the following App using Parallel Arrays- -- -- Conte.pdf (20)

Android UI
Android UI Android UI
Android UI
 
Android Ui
Android UiAndroid Ui
Android Ui
 
Canvas
CanvasCanvas
Canvas
 
Developer Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for BeginnersDeveloper Student Clubs NUK - Flutter for Beginners
Developer Student Clubs NUK - Flutter for Beginners
 
SE2016 Android Mikle Anokhin "Speed up application development with data bind...
SE2016 Android Mikle Anokhin "Speed up application development with data bind...SE2016 Android Mikle Anokhin "Speed up application development with data bind...
SE2016 Android Mikle Anokhin "Speed up application development with data bind...
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data Binding
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenes
 
The Future of CSS with Web components
The Future of CSS with Web componentsThe Future of CSS with Web components
The Future of CSS with Web components
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
Pengenalan blaast platform sdk
Pengenalan blaast platform sdkPengenalan blaast platform sdk
Pengenalan blaast platform sdk
 
Android - Api & Debugging in Android
Android - Api & Debugging in AndroidAndroid - Api & Debugging in Android
Android - Api & Debugging in Android
 
Web Technology Record
Web Technology RecordWeb Technology Record
Web Technology Record
 
Vigneshram murugan cloud project_documentation
Vigneshram murugan cloud project_documentationVigneshram murugan cloud project_documentation
Vigneshram murugan cloud project_documentation
 
Evrone.ru / BEM for RoR
Evrone.ru / BEM for RoREvrone.ru / BEM for RoR
Evrone.ru / BEM for RoR
 
Android For All The Things
Android For All The ThingsAndroid For All The Things
Android For All The Things
 
What's great in Appcelerator Titanium 0.8
What's great in Appcelerator Titanium 0.8What's great in Appcelerator Titanium 0.8
What's great in Appcelerator Titanium 0.8
 
Building Reusable SwiftUI Components
Building Reusable SwiftUI ComponentsBuilding Reusable SwiftUI Components
Building Reusable SwiftUI Components
 
Forge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design DataForge - DevCon 2016: Visual Reporting with Connected Design Data
Forge - DevCon 2016: Visual Reporting with Connected Design Data
 
#JavaFX.forReal()
#JavaFX.forReal()#JavaFX.forReal()
#JavaFX.forReal()
 
Android App Dev Manual-1.doc
Android App Dev Manual-1.docAndroid App Dev Manual-1.doc
Android App Dev Manual-1.doc
 

More from Ian5L3Allanm

Please write a C++ program to (1) Generate the following pattern using.pdf
Please write a C++ program to (1) Generate the following pattern using.pdfPlease write a C++ program to (1) Generate the following pattern using.pdf
Please write a C++ program to (1) Generate the following pattern using.pdf
Ian5L3Allanm
 
please solve part (C) only- Thanks The following information was taken.pdf
please solve part (C) only- Thanks The following information was taken.pdfplease solve part (C) only- Thanks The following information was taken.pdf
please solve part (C) only- Thanks The following information was taken.pdf
Ian5L3Allanm
 
Please provide a short answer to the image! Analyze this Karyotype as.pdf
Please provide a short answer to the image!  Analyze this Karyotype as.pdfPlease provide a short answer to the image!  Analyze this Karyotype as.pdf
Please provide a short answer to the image! Analyze this Karyotype as.pdf
Ian5L3Allanm
 
Please illustrate the differences between Variable Costing system vers.pdf
Please illustrate the differences between Variable Costing system vers.pdfPlease illustrate the differences between Variable Costing system vers.pdf
Please illustrate the differences between Variable Costing system vers.pdf
Ian5L3Allanm
 
please follow all instructions and answer the inbedded questions- and.pdf
please follow all instructions and answer the inbedded questions- and.pdfplease follow all instructions and answer the inbedded questions- and.pdf
please follow all instructions and answer the inbedded questions- and.pdf
Ian5L3Allanm
 
Please complete and post the screenshots here- I can be reached at pra.pdf
Please complete and post the screenshots here- I can be reached at pra.pdfPlease complete and post the screenshots here- I can be reached at pra.pdf
Please complete and post the screenshots here- I can be reached at pra.pdf
Ian5L3Allanm
 
Please answer it appropriately- I have already uploaded and the expert.pdf
Please answer it appropriately- I have already uploaded and the expert.pdfPlease answer it appropriately- I have already uploaded and the expert.pdf
Please answer it appropriately- I have already uploaded and the expert.pdf
Ian5L3Allanm
 
please answer these two questions briefly thank you Examine Figures 1.pdf
please answer these two questions briefly  thank you Examine Figures 1.pdfplease answer these two questions briefly  thank you Examine Figures 1.pdf
please answer these two questions briefly thank you Examine Figures 1.pdf
Ian5L3Allanm
 
Phonology- infants start to produce sounds as soon as they are born (c.pdf
Phonology- infants start to produce sounds as soon as they are born (c.pdfPhonology- infants start to produce sounds as soon as they are born (c.pdf
Phonology- infants start to produce sounds as soon as they are born (c.pdf
Ian5L3Allanm
 
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdfPhenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
Ian5L3Allanm
 
Please answer the following questions- Question #1- Which of the follo.pdf
Please answer the following questions- Question #1- Which of the follo.pdfPlease answer the following questions- Question #1- Which of the follo.pdf
Please answer the following questions- Question #1- Which of the follo.pdf
Ian5L3Allanm
 
Please help me solve this problem entirely - I really appreciate it- T (5).pdf
Please help me solve this problem entirely - I really appreciate it- T (5).pdfPlease help me solve this problem entirely - I really appreciate it- T (5).pdf
Please help me solve this problem entirely - I really appreciate it- T (5).pdf
Ian5L3Allanm
 
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdf
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdfPlease help me solve the above 2 questions- I will drop a thumbs up fo.pdf
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdf
Ian5L3Allanm
 
Please help me i will give good rating Hanan works for a Korean multi.pdf
Please help me i will give good rating  Hanan works for a Korean multi.pdfPlease help me i will give good rating  Hanan works for a Korean multi.pdf
Please help me i will give good rating Hanan works for a Korean multi.pdf
Ian5L3Allanm
 
Please answer the following questions thoroughly- 1) What are the m.pdf
Please answer the following questions thoroughly-    1) What are the m.pdfPlease answer the following questions thoroughly-    1) What are the m.pdf
Please answer the following questions thoroughly- 1) What are the m.pdf
Ian5L3Allanm
 
photosythesis - chromatography paper- separation of photosynthetic pig.pdf
photosythesis - chromatography paper- separation of photosynthetic pig.pdfphotosythesis - chromatography paper- separation of photosynthetic pig.pdf
photosythesis - chromatography paper- separation of photosynthetic pig.pdf
Ian5L3Allanm
 
Please follow the instructions carefully as there are some specific co (1).pdf
Please follow the instructions carefully as there are some specific co (1).pdfPlease follow the instructions carefully as there are some specific co (1).pdf
Please follow the instructions carefully as there are some specific co (1).pdf
Ian5L3Allanm
 
Please follow the instructions carefully as there are some specific co.pdf
Please follow the instructions carefully as there are some specific co.pdfPlease follow the instructions carefully as there are some specific co.pdf
Please follow the instructions carefully as there are some specific co.pdf
Ian5L3Allanm
 
Please explain what this means -The overall model was statistically si.pdf
Please explain what this means -The overall model was statistically si.pdfPlease explain what this means -The overall model was statistically si.pdf
Please explain what this means -The overall model was statistically si.pdf
Ian5L3Allanm
 
Please draw an evolutionary tree dthe information given- 3- A new or.pdf
Please draw an evolutionary tree dthe information given-   3- A new or.pdfPlease draw an evolutionary tree dthe information given-   3- A new or.pdf
Please draw an evolutionary tree dthe information given- 3- A new or.pdf
Ian5L3Allanm
 

More from Ian5L3Allanm (20)

Please write a C++ program to (1) Generate the following pattern using.pdf
Please write a C++ program to (1) Generate the following pattern using.pdfPlease write a C++ program to (1) Generate the following pattern using.pdf
Please write a C++ program to (1) Generate the following pattern using.pdf
 
please solve part (C) only- Thanks The following information was taken.pdf
please solve part (C) only- Thanks The following information was taken.pdfplease solve part (C) only- Thanks The following information was taken.pdf
please solve part (C) only- Thanks The following information was taken.pdf
 
Please provide a short answer to the image! Analyze this Karyotype as.pdf
Please provide a short answer to the image!  Analyze this Karyotype as.pdfPlease provide a short answer to the image!  Analyze this Karyotype as.pdf
Please provide a short answer to the image! Analyze this Karyotype as.pdf
 
Please illustrate the differences between Variable Costing system vers.pdf
Please illustrate the differences between Variable Costing system vers.pdfPlease illustrate the differences between Variable Costing system vers.pdf
Please illustrate the differences between Variable Costing system vers.pdf
 
please follow all instructions and answer the inbedded questions- and.pdf
please follow all instructions and answer the inbedded questions- and.pdfplease follow all instructions and answer the inbedded questions- and.pdf
please follow all instructions and answer the inbedded questions- and.pdf
 
Please complete and post the screenshots here- I can be reached at pra.pdf
Please complete and post the screenshots here- I can be reached at pra.pdfPlease complete and post the screenshots here- I can be reached at pra.pdf
Please complete and post the screenshots here- I can be reached at pra.pdf
 
Please answer it appropriately- I have already uploaded and the expert.pdf
Please answer it appropriately- I have already uploaded and the expert.pdfPlease answer it appropriately- I have already uploaded and the expert.pdf
Please answer it appropriately- I have already uploaded and the expert.pdf
 
please answer these two questions briefly thank you Examine Figures 1.pdf
please answer these two questions briefly  thank you Examine Figures 1.pdfplease answer these two questions briefly  thank you Examine Figures 1.pdf
please answer these two questions briefly thank you Examine Figures 1.pdf
 
Phonology- infants start to produce sounds as soon as they are born (c.pdf
Phonology- infants start to produce sounds as soon as they are born (c.pdfPhonology- infants start to produce sounds as soon as they are born (c.pdf
Phonology- infants start to produce sounds as soon as they are born (c.pdf
 
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdfPhenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
Phenylketonuria (PKU) is a autosomal recessive disorder in which a per.pdf
 
Please answer the following questions- Question #1- Which of the follo.pdf
Please answer the following questions- Question #1- Which of the follo.pdfPlease answer the following questions- Question #1- Which of the follo.pdf
Please answer the following questions- Question #1- Which of the follo.pdf
 
Please help me solve this problem entirely - I really appreciate it- T (5).pdf
Please help me solve this problem entirely - I really appreciate it- T (5).pdfPlease help me solve this problem entirely - I really appreciate it- T (5).pdf
Please help me solve this problem entirely - I really appreciate it- T (5).pdf
 
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdf
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdfPlease help me solve the above 2 questions- I will drop a thumbs up fo.pdf
Please help me solve the above 2 questions- I will drop a thumbs up fo.pdf
 
Please help me i will give good rating Hanan works for a Korean multi.pdf
Please help me i will give good rating  Hanan works for a Korean multi.pdfPlease help me i will give good rating  Hanan works for a Korean multi.pdf
Please help me i will give good rating Hanan works for a Korean multi.pdf
 
Please answer the following questions thoroughly- 1) What are the m.pdf
Please answer the following questions thoroughly-    1) What are the m.pdfPlease answer the following questions thoroughly-    1) What are the m.pdf
Please answer the following questions thoroughly- 1) What are the m.pdf
 
photosythesis - chromatography paper- separation of photosynthetic pig.pdf
photosythesis - chromatography paper- separation of photosynthetic pig.pdfphotosythesis - chromatography paper- separation of photosynthetic pig.pdf
photosythesis - chromatography paper- separation of photosynthetic pig.pdf
 
Please follow the instructions carefully as there are some specific co (1).pdf
Please follow the instructions carefully as there are some specific co (1).pdfPlease follow the instructions carefully as there are some specific co (1).pdf
Please follow the instructions carefully as there are some specific co (1).pdf
 
Please follow the instructions carefully as there are some specific co.pdf
Please follow the instructions carefully as there are some specific co.pdfPlease follow the instructions carefully as there are some specific co.pdf
Please follow the instructions carefully as there are some specific co.pdf
 
Please explain what this means -The overall model was statistically si.pdf
Please explain what this means -The overall model was statistically si.pdfPlease explain what this means -The overall model was statistically si.pdf
Please explain what this means -The overall model was statistically si.pdf
 
Please draw an evolutionary tree dthe information given- 3- A new or.pdf
Please draw an evolutionary tree dthe information given-   3- A new or.pdfPlease draw an evolutionary tree dthe information given-   3- A new or.pdf
Please draw an evolutionary tree dthe information given- 3- A new or.pdf
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
amberjdewit93
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
amberjdewit93
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 

Please complete the following App using Parallel Arrays- -- -- Conte.pdf

  • 1. Please complete the following App using Parallel Arrays: // // ContentView.swift // 2023-16-02-FoodImage-With-If-else // // Created by JPL-ST-SPRING2022 on 2/16/23. //Andrew Dariush Sedigh //Food Images import SwiftUI struct ContentView: View { //declare 2 state variables @State private var imageName = "pizza" @State private var priceString = "Pizza: $12.99" var body: some View { VStack { Image(imageName) .resizable() .frame(width:300, height:200, alignment: .center) .scaledToFill() .padding() .border(.orange,width:2) .imageScale(.large) .foregroundColor(.accentColor) Text(priceString) .font(.largeTitle) .fontWeight(.heavy) .minimumScaleFactor(0.5) .foregroundColor(.red) .padding() //.frame(width:300, height:150) //.border(.orange, width:2) Button("Next Dish") { if imageName=="pizza"{ imageName = "burger" priceString = "Burger: 15.99" } else if imageName == "burger" { imageName = "noodle" priceString = " Noodle: $13.99" } else if imageName == "noodle"{ imageName = "steak"
  • 2. priceString = "Steak: 25.99" } else { imageName = "pizza" priceString = "Pizza: $12.99" } } .buttonStyle(.borderedProminent) } .padding() } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }