SlideShare a Scribd company logo
1 of 2
Microsoft Visual C# 2012: An introduction to object-oriented programming Ch.12 Question # 7.
Create a project named Restaurant that contains a Form that allows the user to choose one item
from at least three options in each of the following categories - appetizer, entree, and desert.
Assign a different price to each selection and display the total when the user clicks a Button. Use
the Controls that you think are best for each function. Label items appropriately and use fonts
and colors to achieve an attractive design.
Show example of form.
Solution
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication21
{
public partial class Form1 : Form
{
string text;
public Form1()
{
//button adding to form
Button myButtonOk = new Button();
myButtonOkmyButtonOk.Location = new Point(245, 35);
myButtonOk.Text = "OK";
myButtonOk.Click += new EventHandler(button1_Click);
this.Controls.Add(myButtonOk);
}
//handling button click
private void button1_Click(object sender, EventArgs e)
{
if(text.equals("appetizer")){
MessageBox.Show("$30");
}
else if(text.equals("entree")){
MessageBox.Show("$50");
}
else{
MessageBox.Show("$60");
}
}
//handling combobox change
private void comboBox_TextChanged(object sender, EventArgs e)
{
text = comboBox1.Text;
}
}
}

More Related Content

Similar to Microsoft Visual C# 2012- An introduction to object-oriented programmi.docx

COSC 1436 Project Page 1 Pre Project Example Secti.docx
COSC 1436 Project Page 1  Pre Project Example Secti.docxCOSC 1436 Project Page 1  Pre Project Example Secti.docx
COSC 1436 Project Page 1 Pre Project Example Secti.docxfaithxdunce63732
 
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdf
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdfYOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdf
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdfrajkumarm401
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lecturesmarwaeng
 
Csc153 chapter 03
Csc153 chapter 03Csc153 chapter 03
Csc153 chapter 03PCC
 
06 win forms
06 win forms06 win forms
06 win formsmrjw
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI WidgetsAhsanul Karim
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Ahsanul Karim
 
Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Bhushan Mulmule
 
LECTURE 12 WINDOWS FORMS PART 2.pptx
LECTURE 12 WINDOWS FORMS PART 2.pptxLECTURE 12 WINDOWS FORMS PART 2.pptx
LECTURE 12 WINDOWS FORMS PART 2.pptxAOmaAli
 
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptxhjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptxEliasPetros
 
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.154.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15Rajes Wari
 
Windows Forms For Beginners Part - 4
Windows Forms For Beginners Part - 4Windows Forms For Beginners Part - 4
Windows Forms For Beginners Part - 4Bhushan Mulmule
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAhsanul Karim
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMSaraswathiRamalingam
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAhsanul Karim
 
C# Tutorial MSM_Murach chapter-10-slides
C# Tutorial MSM_Murach chapter-10-slidesC# Tutorial MSM_Murach chapter-10-slides
C# Tutorial MSM_Murach chapter-10-slidesSami Mut
 

Similar to Microsoft Visual C# 2012- An introduction to object-oriented programmi.docx (20)

COSC 1436 Project Page 1 Pre Project Example Secti.docx
COSC 1436 Project Page 1  Pre Project Example Secti.docxCOSC 1436 Project Page 1  Pre Project Example Secti.docx
COSC 1436 Project Page 1 Pre Project Example Secti.docx
 
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdf
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdfYOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdf
YOU DO IT 4! create an named YouDolt 4 and save it in the vB 2015Chap.pdf
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
Csc153 chapter 03
Csc153 chapter 03Csc153 chapter 03
Csc153 chapter 03
 
06 win forms
06 win forms06 win forms
06 win forms
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]
 
Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1
 
LECTURE 12 WINDOWS FORMS PART 2.pptx
LECTURE 12 WINDOWS FORMS PART 2.pptxLECTURE 12 WINDOWS FORMS PART 2.pptx
LECTURE 12 WINDOWS FORMS PART 2.pptx
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptxhjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
 
4.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.154.7.14&17.7.14&23.6.15&10.9.15
4.7.14&17.7.14&23.6.15&10.9.15
 
Windows Forms For Beginners Part - 4
Windows Forms For Beginners Part - 4Windows Forms For Beginners Part - 4
Windows Forms For Beginners Part - 4
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
 
Controls events
Controls eventsControls events
Controls events
 
Visual C# 2010
Visual C# 2010Visual C# 2010
Visual C# 2010
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
 
SPF WinForm Programs
SPF WinForm ProgramsSPF WinForm Programs
SPF WinForm Programs
 
C# Tutorial MSM_Murach chapter-10-slides
C# Tutorial MSM_Murach chapter-10-slidesC# Tutorial MSM_Murach chapter-10-slides
C# Tutorial MSM_Murach chapter-10-slides
 

More from keshayoon3mu

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docxkeshayoon3mu
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docxkeshayoon3mu
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docxkeshayoon3mu
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docxkeshayoon3mu
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docxkeshayoon3mu
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docxkeshayoon3mu
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docxkeshayoon3mu
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docxkeshayoon3mu
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docxkeshayoon3mu
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docxkeshayoon3mu
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docxkeshayoon3mu
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docxkeshayoon3mu
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docxkeshayoon3mu
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docxkeshayoon3mu
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docxkeshayoon3mu
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docxkeshayoon3mu
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docxkeshayoon3mu
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docxkeshayoon3mu
 

More from keshayoon3mu (20)

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docx
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Microsoft Visual C# 2012- An introduction to object-oriented programmi.docx

  • 1. Microsoft Visual C# 2012: An introduction to object-oriented programming Ch.12 Question # 7. Create a project named Restaurant that contains a Form that allows the user to choose one item from at least three options in each of the following categories - appetizer, entree, and desert. Assign a different price to each selection and display the total when the user clicks a Button. Use the Controls that you think are best for each function. Label items appropriately and use fonts and colors to achieve an attractive design. Show example of form. Solution using System; using System.Windows.Forms; namespace WindowsFormsApplication21 { public partial class Form1 : Form { string text; public Form1() { //button adding to form Button myButtonOk = new Button(); myButtonOkmyButtonOk.Location = new Point(245, 35); myButtonOk.Text = "OK"; myButtonOk.Click += new EventHandler(button1_Click); this.Controls.Add(myButtonOk); } //handling button click private void button1_Click(object sender, EventArgs e) { if(text.equals("appetizer")){ MessageBox.Show("$30"); }
  • 2. else if(text.equals("entree")){ MessageBox.Show("$50"); } else{ MessageBox.Show("$60"); } } //handling combobox change private void comboBox_TextChanged(object sender, EventArgs e) { text = comboBox1.Text; } } }