SlideShare a Scribd company logo
1 of 11
Download to read offline
Hey I need help creating this code using Visual Studio (Basic) 2015
Fitness World Health Club is having its Weight Room tiled. The room is rectangular and must
have
its walls covered with tile.
· The tile costs $30 per carton.
· One carton of tile will cover 25 square feet.
· The labor charge is $55 per carton of tile applied.
A program is needed to compute the total cost of the job (tile cost plus labor charge).
User inputs needed would be the dimensions of the room (length, width, height).
The outputs must be:
1. Area to be tiled in square feet,
2. The number of cartons of tile needed. (You cannot buy a partial carton so you must round
up to the next integer. A statement that will do this for you is
intCartons = CInt(Math.Ceiling(dblTotalArea / 25))
3. Cost of the tile,
4. Labor charge,
5. Total Cost of the Job (tile cost plus labor charge)
Notes:
· Remember to use text boxes to hold user inputs and labels to display outputs.
· Be sure to choose appropriate names for variables and other objects.
· Create Keyboard Access Keys (Alt key shortcuts) for the buttons and make the Calculate
button the Accept Button.
· Be sure the Tab Order is set properly.
· Use comments to document your work.
Sample of interface R Tiling Cost Calculator X Length 30 Width 25 Height 42 Total Area 4620
Cartons Needed 185 Cost of Tile $5,550.00 Labor Cost $10.175.0 Total Job Cost $15,725.0
Calculate Clear Exit
Solution
/*C sharp code */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace tilingCalc
{
public partial class Form1 : Form
{
int length, width, height, total_area, cartoon, cost_tile, labor_cost;
/* Closes an app */
private void button3_Click(object sender, EventArgs e)
{
this.Close();
}
/*Closes current app and invoke new object */
private void button2_Click(object sender, EventArgs e)
{
Form1 f = new Form1();
f.Show();
this.Dispose(false);
}
private void button1_Click(object sender, EventArgs e)
{
getData();
/* Calculate area and display them */
total_area = length * width * height;
text_area.Text = total_area.ToString();
/* Calculate cartoon no and display them */
cartoon = (int)(Math.Ceiling((decimal)((double)total_area / 25)));
text_cartoon.Text = cartoon.ToString();
/* Calculate tile cost and display them */
cost_tile = cartoon * 30;
text_tile_cost.Text = "$" + cost_tile.ToString() + ".00";
/* Calculate labor cost and display them */
labor_cost = cartoon * 55;
text_cost_labor.Text = "$" + labor_cost.ToString() + ".00";
/* Calculate total cost and display them */
text_total_cost.Text = "$" + (cost_tile + labor_cost).ToString() + ".00";
}
void getData()
{
try
{
if (text_length.TextLength != 0)
{
length = int.Parse(text_length.Text);
}
if (text_width.TextLength != 0)
{
width = int.Parse(text_width.Text);
}
if (text_height.TextLength != 0)
{
height = int.Parse(text_height.Text);
}
}
catch (Exception e)
{
MessageBox.Show("Invalid input");
}
}
public Form1()
{
InitializeComponent();
}
private void label3_Click(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}
/* C Sharp design code */
namespace tilingCalc
{
partial class Form1
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.calculate = new System.Windows.Forms.Button();
this.clear = new System.Windows.Forms.Button();
this.exit = new System.Windows.Forms.Button();
this.text_length = new System.Windows.Forms.TextBox();
this.text_width = new System.Windows.Forms.TextBox();
this.text_height = new System.Windows.Forms.TextBox();
this.text_area = new System.Windows.Forms.TextBox();
this.text_cartoon = new System.Windows.Forms.TextBox();
this.text_tile_cost = new System.Windows.Forms.TextBox();
this.text_cost_labor = new System.Windows.Forms.TextBox();
this.text_total_cost = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(27, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Length";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(27, 50);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Width";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(27, 84);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 0;
this.label3.Text = "Height";
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 139);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 13);
this.label4.TabIndex = 0;
this.label4.Text = "Total Area";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(27, 166);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(90, 13);
this.label5.TabIndex = 0;
this.label5.Text = "Cartoons Needed";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(27, 195);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(60, 13);
this.label6.TabIndex = 0;
this.label6.Text = "Cost of Tile";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(27, 224);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(58, 13);
this.label7.TabIndex = 0;
this.label7.Text = "Labor Cost";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(27, 252);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(75, 13);
this.label8.TabIndex = 0;
this.label8.Text = "Total Job Cost";
//
// calculate
//
this.calculate.Location = new System.Drawing.Point(20, 292);
this.calculate.Name = "calculate";
this.calculate.Size = new System.Drawing.Size(60, 42);
this.calculate.TabIndex = 4;
this.calculate.Text = "Calculate";
this.calculate.UseVisualStyleBackColor = true;
this.calculate.Click += new System.EventHandler(this.button1_Click);
//
// clear
//
this.clear.Location = new System.Drawing.Point(103, 292);
this.clear.Name = "clear";
this.clear.Size = new System.Drawing.Size(74, 40);
this.clear.TabIndex = 5;
this.clear.Text = "Clear";
this.clear.UseVisualStyleBackColor = true;
this.clear.Click += new System.EventHandler(this.button2_Click);
//
// exit
//
this.exit.Location = new System.Drawing.Point(194, 292);
this.exit.Name = "exit";
this.exit.Size = new System.Drawing.Size(68, 40);
this.exit.TabIndex = 6;
this.exit.Text = "Exit";
this.exit.UseVisualStyleBackColor = true;
this.exit.Click += new System.EventHandler(this.button3_Click);
//
// text_length
//
this.text_length.Location = new System.Drawing.Point(138, 13);
this.text_length.Name = "text_length";
this.text_length.Size = new System.Drawing.Size(99, 20);
this.text_length.TabIndex = 1;
//
// text_width
//
this.text_width.Location = new System.Drawing.Point(138, 46);
this.text_width.Name = "text_width";
this.text_width.Size = new System.Drawing.Size(99, 20);
this.text_width.TabIndex = 2;
//
// text_height
//
this.text_height.Location = new System.Drawing.Point(138, 81);
this.text_height.Name = "text_height";
this.text_height.Size = new System.Drawing.Size(99, 20);
this.text_height.TabIndex = 3;
//
// text_area
//
this.text_area.Location = new System.Drawing.Point(138, 135);
this.text_area.Name = "text_area";
this.text_area.ReadOnly = true;
this.text_area.Size = new System.Drawing.Size(98, 20);
this.text_area.TabIndex = 0;
//
// text_cartoon
//
this.text_cartoon.Location = new System.Drawing.Point(138, 164);
this.text_cartoon.Name = "text_cartoon";
this.text_cartoon.ReadOnly = true;
this.text_cartoon.Size = new System.Drawing.Size(99, 20);
this.text_cartoon.TabIndex = 0;
//
// text_tile_cost
//
this.text_tile_cost.Location = new System.Drawing.Point(138, 192);
this.text_tile_cost.Name = "text_tile_cost";
this.text_tile_cost.ReadOnly = true;
this.text_tile_cost.Size = new System.Drawing.Size(98, 20);
this.text_tile_cost.TabIndex = 0;
//
// text_cost_labor
//
this.text_cost_labor.Location = new System.Drawing.Point(138, 222);
this.text_cost_labor.Name = "text_cost_labor";
this.text_cost_labor.ReadOnly = true;
this.text_cost_labor.Size = new System.Drawing.Size(98, 20);
this.text_cost_labor.TabIndex = 0;
//
// text_total_cost
//
this.text_total_cost.Location = new System.Drawing.Point(138, 252);
this.text_total_cost.Name = "text_total_cost";
this.text_total_cost.ReadOnly = true;
this.text_total_cost.Size = new System.Drawing.Size(99, 20);
this.text_total_cost.TabIndex = 0;
//
// Form1
//
this.AcceptButton = this.calculate;
this.ClientSize = new System.Drawing.Size(284, 361);
this.Controls.Add(this.text_total_cost);
this.Controls.Add(this.text_cost_labor);
this.Controls.Add(this.text_tile_cost);
this.Controls.Add(this.text_cartoon);
this.Controls.Add(this.text_area);
this.Controls.Add(this.text_height);
this.Controls.Add(this.text_width);
this.Controls.Add(this.text_length);
this.Controls.Add(this.exit);
this.Controls.Add(this.clear);
this.Controls.Add(this.calculate);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button calculate;
private System.Windows.Forms.Button clear;
private System.Windows.Forms.Button exit;
private System.Windows.Forms.TextBox text_length;
private System.Windows.Forms.TextBox text_width;
private System.Windows.Forms.TextBox text_height;
private System.Windows.Forms.TextBox text_area;
private System.Windows.Forms.TextBox text_cartoon;
private System.Windows.Forms.TextBox text_tile_cost;
private System.Windows.Forms.TextBox text_cost_labor;
private System.Windows.Forms.TextBox text_total_cost;
}
}

More Related Content

Similar to Hey I need help creating this code using Visual Studio (Basic) 2015.pdf

Form1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdfForm1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdf
apleather
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
gilpinleeanna
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdfJava Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
archanaemporium
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
fathimalinks
 
Needs to be solved with Visual C# from the book Starting oout .pdf
Needs to be solved with Visual C# from the book Starting oout .pdfNeeds to be solved with Visual C# from the book Starting oout .pdf
Needs to be solved with Visual C# from the book Starting oout .pdf
foottraders
 
The first part of the assignment involves creating very basic GUI co.pdf
The first part of the assignment involves creating very basic GUI co.pdfThe first part of the assignment involves creating very basic GUI co.pdf
The first part of the assignment involves creating very basic GUI co.pdf
neerajsachdeva33
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
rosemarybdodson23141
 
I have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdfI have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdf
footworld1
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
udit652068
 
Use of Classes and functions#include iostreamusing name.docx
 Use of Classes and functions#include iostreamusing name.docx Use of Classes and functions#include iostreamusing name.docx
Use of Classes and functions#include iostreamusing name.docx
aryan532920
 

Similar to Hey I need help creating this code using Visual Studio (Basic) 2015.pdf (20)

C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
12 gui concepts 1
12 gui concepts 112 gui concepts 1
12 gui concepts 1
 
Form1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdfForm1.csusing System; using System.Collections.Generic; using .pdf
Form1.csusing System; using System.Collections.Generic; using .pdf
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdfJava Program- Wrtie a Fraction classGiven the main method of a dri.pdf
Java Program- Wrtie a Fraction classGiven the main method of a dri.pdf
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
 
C# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdfC# Program. Create a Windows application that has the functionality .pdf
C# Program. Create a Windows application that has the functionality .pdf
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.com
 
Algoritmos sujei
Algoritmos sujeiAlgoritmos sujei
Algoritmos sujei
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
20.1 Java working with abstraction
20.1 Java working with abstraction20.1 Java working with abstraction
20.1 Java working with abstraction
 
Needs to be solved with Visual C# from the book Starting oout .pdf
Needs to be solved with Visual C# from the book Starting oout .pdfNeeds to be solved with Visual C# from the book Starting oout .pdf
Needs to be solved with Visual C# from the book Starting oout .pdf
 
The first part of the assignment involves creating very basic GUI co.pdf
The first part of the assignment involves creating very basic GUI co.pdfThe first part of the assignment involves creating very basic GUI co.pdf
The first part of the assignment involves creating very basic GUI co.pdf
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Java awt
Java awtJava awt
Java awt
 
I have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdfI have the first program completed (not how request, but it works) a.pdf
I have the first program completed (not how request, but it works) a.pdf
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
 
Use of Classes and functions#include iostreamusing name.docx
 Use of Classes and functions#include iostreamusing name.docx Use of Classes and functions#include iostreamusing name.docx
Use of Classes and functions#include iostreamusing name.docx
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 

More from forwardcom41

Hello!Can someone help me to answer Task4 and Task7Complete T.pdf
Hello!Can someone help me to answer Task4 and Task7Complete T.pdfHello!Can someone help me to answer Task4 and Task7Complete T.pdf
Hello!Can someone help me to answer Task4 and Task7Complete T.pdf
forwardcom41
 
Given technology today, would it be more feasible than in the pa.pdf
Given technology today, would it be more feasible than in the pa.pdfGiven technology today, would it be more feasible than in the pa.pdf
Given technology today, would it be more feasible than in the pa.pdf
forwardcom41
 
Explain in detail how OFDM helps mitigates multipath fading effects..pdf
Explain in detail how OFDM helps mitigates multipath fading effects..pdfExplain in detail how OFDM helps mitigates multipath fading effects..pdf
Explain in detail how OFDM helps mitigates multipath fading effects..pdf
forwardcom41
 
Complete a scientific inquiry research using three credible sources..pdf
Complete a scientific inquiry research using three credible sources..pdfComplete a scientific inquiry research using three credible sources..pdf
Complete a scientific inquiry research using three credible sources..pdf
forwardcom41
 
Combine the keypad and LCD codes in compliance to the following requ.pdf
Combine the keypad and LCD codes in compliance to the following requ.pdfCombine the keypad and LCD codes in compliance to the following requ.pdf
Combine the keypad and LCD codes in compliance to the following requ.pdf
forwardcom41
 
Describe and illustrate the use of a bank reconciliation in controll.pdf
Describe and illustrate the use of a bank reconciliation in controll.pdfDescribe and illustrate the use of a bank reconciliation in controll.pdf
Describe and illustrate the use of a bank reconciliation in controll.pdf
forwardcom41
 
Why is it important for a trainer (trainers) to understand the commu.pdf
Why is it important for a trainer (trainers) to understand the commu.pdfWhy is it important for a trainer (trainers) to understand the commu.pdf
Why is it important for a trainer (trainers) to understand the commu.pdf
forwardcom41
 
Which of the following is not one of the ethical standards included .pdf
Which of the following is not one of the ethical standards included .pdfWhich of the following is not one of the ethical standards included .pdf
Which of the following is not one of the ethical standards included .pdf
forwardcom41
 
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdfUsing the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
forwardcom41
 
What is the threat to culture by a read-only world, and how do t.pdf
What is the threat to culture by a read-only world, and how do t.pdfWhat is the threat to culture by a read-only world, and how do t.pdf
What is the threat to culture by a read-only world, and how do t.pdf
forwardcom41
 
These are the answer I got but are not fully correct and ineffic.pdf
These are the answer I got but are not fully correct and ineffic.pdfThese are the answer I got but are not fully correct and ineffic.pdf
These are the answer I got but are not fully correct and ineffic.pdf
forwardcom41
 

More from forwardcom41 (20)

Hello!Can someone help me to answer Task4 and Task7Complete T.pdf
Hello!Can someone help me to answer Task4 and Task7Complete T.pdfHello!Can someone help me to answer Task4 and Task7Complete T.pdf
Hello!Can someone help me to answer Task4 and Task7Complete T.pdf
 
Given technology today, would it be more feasible than in the pa.pdf
Given technology today, would it be more feasible than in the pa.pdfGiven technology today, would it be more feasible than in the pa.pdf
Given technology today, would it be more feasible than in the pa.pdf
 
Explain the difference between a contaminated culture and a mix c.pdf
Explain the difference between a contaminated culture and a mix c.pdfExplain the difference between a contaminated culture and a mix c.pdf
Explain the difference between a contaminated culture and a mix c.pdf
 
Explain in detail how OFDM helps mitigates multipath fading effects..pdf
Explain in detail how OFDM helps mitigates multipath fading effects..pdfExplain in detail how OFDM helps mitigates multipath fading effects..pdf
Explain in detail how OFDM helps mitigates multipath fading effects..pdf
 
Complete a scientific inquiry research using three credible sources..pdf
Complete a scientific inquiry research using three credible sources..pdfComplete a scientific inquiry research using three credible sources..pdf
Complete a scientific inquiry research using three credible sources..pdf
 
Combine the keypad and LCD codes in compliance to the following requ.pdf
Combine the keypad and LCD codes in compliance to the following requ.pdfCombine the keypad and LCD codes in compliance to the following requ.pdf
Combine the keypad and LCD codes in compliance to the following requ.pdf
 
Describe and illustrate the use of a bank reconciliation in controll.pdf
Describe and illustrate the use of a bank reconciliation in controll.pdfDescribe and illustrate the use of a bank reconciliation in controll.pdf
Describe and illustrate the use of a bank reconciliation in controll.pdf
 
Why is it important for a trainer (trainers) to understand the commu.pdf
Why is it important for a trainer (trainers) to understand the commu.pdfWhy is it important for a trainer (trainers) to understand the commu.pdf
Why is it important for a trainer (trainers) to understand the commu.pdf
 
What are the various portals an enterprise can use What is the func.pdf
What are the various portals an enterprise can use What is the func.pdfWhat are the various portals an enterprise can use What is the func.pdf
What are the various portals an enterprise can use What is the func.pdf
 
What is the nature of thermal energy What is heat at the atomic lev.pdf
What is the nature of thermal energy What is heat at the atomic lev.pdfWhat is the nature of thermal energy What is heat at the atomic lev.pdf
What is the nature of thermal energy What is heat at the atomic lev.pdf
 
w Hstory Bookmarks Window Help Apple Bing Google Taho0 NewaDetals MIN.pdf
w Hstory Bookmarks Window Help Apple Bing Google Taho0 NewaDetals MIN.pdfw Hstory Bookmarks Window Help Apple Bing Google Taho0 NewaDetals MIN.pdf
w Hstory Bookmarks Window Help Apple Bing Google Taho0 NewaDetals MIN.pdf
 
Which of the following is not one of the ethical standards included .pdf
Which of the following is not one of the ethical standards included .pdfWhich of the following is not one of the ethical standards included .pdf
Which of the following is not one of the ethical standards included .pdf
 
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdfUsing the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
Using the guidance from ASC 855-10-55-1 and 855-10-55-2 Answer the f.pdf
 
why we need mixed methodology for researchSolutionMixed metho.pdf
why we need mixed methodology for researchSolutionMixed metho.pdfwhy we need mixed methodology for researchSolutionMixed metho.pdf
why we need mixed methodology for researchSolutionMixed metho.pdf
 
What property doesnt apply to fluids Newtons second, cons of ene.pdf
What property doesnt apply to fluids Newtons second, cons of ene.pdfWhat property doesnt apply to fluids Newtons second, cons of ene.pdf
What property doesnt apply to fluids Newtons second, cons of ene.pdf
 
What is the threat to culture by a read-only world, and how do t.pdf
What is the threat to culture by a read-only world, and how do t.pdfWhat is the threat to culture by a read-only world, and how do t.pdf
What is the threat to culture by a read-only world, and how do t.pdf
 
What is one hypothesis to explain why there are more endemic bird sp.pdf
What is one hypothesis to explain why there are more endemic bird sp.pdfWhat is one hypothesis to explain why there are more endemic bird sp.pdf
What is one hypothesis to explain why there are more endemic bird sp.pdf
 
What are the ethical tensions in advertisingWho are the responsib.pdf
What are the ethical tensions in advertisingWho are the responsib.pdfWhat are the ethical tensions in advertisingWho are the responsib.pdf
What are the ethical tensions in advertisingWho are the responsib.pdf
 
Use the following information to answer the next Question. The graph.pdf
Use the following information to answer the next Question.  The graph.pdfUse the following information to answer the next Question.  The graph.pdf
Use the following information to answer the next Question. The graph.pdf
 
These are the answer I got but are not fully correct and ineffic.pdf
These are the answer I got but are not fully correct and ineffic.pdfThese are the answer I got but are not fully correct and ineffic.pdf
These are the answer I got but are not fully correct and ineffic.pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 

Hey I need help creating this code using Visual Studio (Basic) 2015.pdf

  • 1. Hey I need help creating this code using Visual Studio (Basic) 2015 Fitness World Health Club is having its Weight Room tiled. The room is rectangular and must have its walls covered with tile. · The tile costs $30 per carton. · One carton of tile will cover 25 square feet. · The labor charge is $55 per carton of tile applied. A program is needed to compute the total cost of the job (tile cost plus labor charge). User inputs needed would be the dimensions of the room (length, width, height). The outputs must be: 1. Area to be tiled in square feet, 2. The number of cartons of tile needed. (You cannot buy a partial carton so you must round up to the next integer. A statement that will do this for you is intCartons = CInt(Math.Ceiling(dblTotalArea / 25)) 3. Cost of the tile, 4. Labor charge, 5. Total Cost of the Job (tile cost plus labor charge) Notes: · Remember to use text boxes to hold user inputs and labels to display outputs. · Be sure to choose appropriate names for variables and other objects. · Create Keyboard Access Keys (Alt key shortcuts) for the buttons and make the Calculate button the Accept Button. · Be sure the Tab Order is set properly. · Use comments to document your work. Sample of interface R Tiling Cost Calculator X Length 30 Width 25 Height 42 Total Area 4620 Cartons Needed 185 Cost of Tile $5,550.00 Labor Cost $10.175.0 Total Job Cost $15,725.0 Calculate Clear Exit Solution /*C sharp code */ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;
  • 2. using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace tilingCalc { public partial class Form1 : Form { int length, width, height, total_area, cartoon, cost_tile, labor_cost; /* Closes an app */ private void button3_Click(object sender, EventArgs e) { this.Close(); } /*Closes current app and invoke new object */ private void button2_Click(object sender, EventArgs e) { Form1 f = new Form1(); f.Show(); this.Dispose(false); } private void button1_Click(object sender, EventArgs e) { getData(); /* Calculate area and display them */ total_area = length * width * height; text_area.Text = total_area.ToString(); /* Calculate cartoon no and display them */ cartoon = (int)(Math.Ceiling((decimal)((double)total_area / 25))); text_cartoon.Text = cartoon.ToString(); /* Calculate tile cost and display them */ cost_tile = cartoon * 30; text_tile_cost.Text = "$" + cost_tile.ToString() + ".00"; /* Calculate labor cost and display them */
  • 3. labor_cost = cartoon * 55; text_cost_labor.Text = "$" + labor_cost.ToString() + ".00"; /* Calculate total cost and display them */ text_total_cost.Text = "$" + (cost_tile + labor_cost).ToString() + ".00"; } void getData() { try { if (text_length.TextLength != 0) { length = int.Parse(text_length.Text); } if (text_width.TextLength != 0) { width = int.Parse(text_width.Text); } if (text_height.TextLength != 0) { height = int.Parse(text_height.Text); } } catch (Exception e) { MessageBox.Show("Invalid input"); } } public Form1() { InitializeComponent(); } private void label3_Click(object sender, EventArgs e) { } private void label1_Click(object sender, EventArgs e)
  • 4. { } } } /* C Sharp design code */ namespace tilingCalc { partial class Form1 { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
  • 5. this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.calculate = new System.Windows.Forms.Button(); this.clear = new System.Windows.Forms.Button(); this.exit = new System.Windows.Forms.Button(); this.text_length = new System.Windows.Forms.TextBox(); this.text_width = new System.Windows.Forms.TextBox(); this.text_height = new System.Windows.Forms.TextBox(); this.text_area = new System.Windows.Forms.TextBox(); this.text_cartoon = new System.Windows.Forms.TextBox(); this.text_tile_cost = new System.Windows.Forms.TextBox(); this.text_cost_labor = new System.Windows.Forms.TextBox(); this.text_total_cost = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(27, 18); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(40, 13); this.label1.TabIndex = 0; this.label1.Text = "Length"; this.label1.Click += new System.EventHandler(this.label1_Click); // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(27, 50); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(35, 13); this.label2.TabIndex = 0; this.label2.Text = "Width"; //
  • 6. // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(27, 84); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(38, 13); this.label3.TabIndex = 0; this.label3.Text = "Height"; this.label3.Click += new System.EventHandler(this.label3_Click); // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(27, 139); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 13); this.label4.TabIndex = 0; this.label4.Text = "Total Area"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(27, 166); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(90, 13); this.label5.TabIndex = 0; this.label5.Text = "Cartoons Needed"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(27, 195); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(60, 13); this.label6.TabIndex = 0; this.label6.Text = "Cost of Tile";
  • 7. // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(27, 224); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(58, 13); this.label7.TabIndex = 0; this.label7.Text = "Labor Cost"; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(27, 252); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(75, 13); this.label8.TabIndex = 0; this.label8.Text = "Total Job Cost"; // // calculate // this.calculate.Location = new System.Drawing.Point(20, 292); this.calculate.Name = "calculate"; this.calculate.Size = new System.Drawing.Size(60, 42); this.calculate.TabIndex = 4; this.calculate.Text = "Calculate"; this.calculate.UseVisualStyleBackColor = true; this.calculate.Click += new System.EventHandler(this.button1_Click); // // clear // this.clear.Location = new System.Drawing.Point(103, 292); this.clear.Name = "clear"; this.clear.Size = new System.Drawing.Size(74, 40); this.clear.TabIndex = 5; this.clear.Text = "Clear";
  • 8. this.clear.UseVisualStyleBackColor = true; this.clear.Click += new System.EventHandler(this.button2_Click); // // exit // this.exit.Location = new System.Drawing.Point(194, 292); this.exit.Name = "exit"; this.exit.Size = new System.Drawing.Size(68, 40); this.exit.TabIndex = 6; this.exit.Text = "Exit"; this.exit.UseVisualStyleBackColor = true; this.exit.Click += new System.EventHandler(this.button3_Click); // // text_length // this.text_length.Location = new System.Drawing.Point(138, 13); this.text_length.Name = "text_length"; this.text_length.Size = new System.Drawing.Size(99, 20); this.text_length.TabIndex = 1; // // text_width // this.text_width.Location = new System.Drawing.Point(138, 46); this.text_width.Name = "text_width"; this.text_width.Size = new System.Drawing.Size(99, 20); this.text_width.TabIndex = 2; // // text_height // this.text_height.Location = new System.Drawing.Point(138, 81); this.text_height.Name = "text_height"; this.text_height.Size = new System.Drawing.Size(99, 20); this.text_height.TabIndex = 3; // // text_area //
  • 9. this.text_area.Location = new System.Drawing.Point(138, 135); this.text_area.Name = "text_area"; this.text_area.ReadOnly = true; this.text_area.Size = new System.Drawing.Size(98, 20); this.text_area.TabIndex = 0; // // text_cartoon // this.text_cartoon.Location = new System.Drawing.Point(138, 164); this.text_cartoon.Name = "text_cartoon"; this.text_cartoon.ReadOnly = true; this.text_cartoon.Size = new System.Drawing.Size(99, 20); this.text_cartoon.TabIndex = 0; // // text_tile_cost // this.text_tile_cost.Location = new System.Drawing.Point(138, 192); this.text_tile_cost.Name = "text_tile_cost"; this.text_tile_cost.ReadOnly = true; this.text_tile_cost.Size = new System.Drawing.Size(98, 20); this.text_tile_cost.TabIndex = 0; // // text_cost_labor // this.text_cost_labor.Location = new System.Drawing.Point(138, 222); this.text_cost_labor.Name = "text_cost_labor"; this.text_cost_labor.ReadOnly = true; this.text_cost_labor.Size = new System.Drawing.Size(98, 20); this.text_cost_labor.TabIndex = 0; // // text_total_cost // this.text_total_cost.Location = new System.Drawing.Point(138, 252); this.text_total_cost.Name = "text_total_cost"; this.text_total_cost.ReadOnly = true; this.text_total_cost.Size = new System.Drawing.Size(99, 20);
  • 10. this.text_total_cost.TabIndex = 0; // // Form1 // this.AcceptButton = this.calculate; this.ClientSize = new System.Drawing.Size(284, 361); this.Controls.Add(this.text_total_cost); this.Controls.Add(this.text_cost_labor); this.Controls.Add(this.text_tile_cost); this.Controls.Add(this.text_cartoon); this.Controls.Add(this.text_area); this.Controls.Add(this.text_height); this.Controls.Add(this.text_width); this.Controls.Add(this.text_length); this.Controls.Add(this.exit); this.Controls.Add(this.clear); this.Controls.Add(this.calculate); this.Controls.Add(this.label8); this.Controls.Add(this.label7); this.Controls.Add(this.label6); this.Controls.Add(this.label5); this.Controls.Add(this.label4); this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "Form1"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5;
  • 11. private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label8; private System.Windows.Forms.Button calculate; private System.Windows.Forms.Button clear; private System.Windows.Forms.Button exit; private System.Windows.Forms.TextBox text_length; private System.Windows.Forms.TextBox text_width; private System.Windows.Forms.TextBox text_height; private System.Windows.Forms.TextBox text_area; private System.Windows.Forms.TextBox text_cartoon; private System.Windows.Forms.TextBox text_tile_cost; private System.Windows.Forms.TextBox text_cost_labor; private System.Windows.Forms.TextBox text_total_cost; } }