1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ivenika [448]
3 years ago
14

An introduction to object-oriented programming.

Computers and Technology
1 answer:
Scorpion4ik [409]3 years ago
3 0

Answer:

The csharp program is given below.

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 WindowsFormsApplication1

{

   public partial class Form1 : Form

   {

       public Form1()

       {

           InitializeComponent();

      }

       private void button6_Click(object sender, EventArgs e)

       {

           int total = (Convert.ToInt32(textBox1.Text) +  Convert.ToInt32(textBox2.Text) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(textBox4.Text) + Convert.ToInt32(textBox5.Text));

           int dozen = total / 12;

           int eggs = total % 12;

           textBox6.Text = dozen.ToString();

           textBox7.Text = eggs.ToString();

       }

       private void button7_Click(object sender, EventArgs e)

       {

           textBox1.Text = "";

           textBox2.Text = "";

           textBox3.Text = "";

           textBox4.Text = "";

           textBox5.Text = "";

           textBox6.Text = "";

           textBox7.Text = "";

       }

        private void button8_Click(object sender, EventArgs e)

       {

           Close();

       }

    }

}

Explanation:

1. The integer variables are declared for total eggs, number of dozens and number of eggs.

2. The input of each text box is converted into integer by using the Convert.ToInt32() method on the value of that particular text box.

3. All the inputs are added and the sum is assigned to variable, total.

4. The number of dozens are obtained by dividing total by 12 and assigning the value to the variable, dozen.

5. The number of extra eggs are obtained by taking the modulus of total and 12 and the value is assigned to the variable, eggs.

6. The integer values in the variables, dozen and eggs, are converted into string using the ToString() function with that particular value.

dozen.ToString();

eggs.ToString();

7. The text boxes are assigned the respective values of dozens and number of eggs.

textBox6.Text = dozen.ToString();

textBox7.Text = eggs.ToString();

8. Two additional buttons, clear and exit, are also added.

9. The clear button erases the contents of all the text boxes. The Text property of each textbox is set to “” thereby clearing all the text fields.

10. The exit button closes the application using Close() function.

11. The program is made in visual studio and the output is attached.

You might be interested in
Images are available in many formats, such as tif, bmp, gif, jpeg, and ____.
Lerok [7]
<span>Images are available in many formats, such as tif, bmp, gif, jpeg, and png.

</span>Hope that helps.
7 0
2 years ago
When setting a schedule you should refer to a tool known as the __________calendar.
aev [14]
It is known as the PACING Calendar.
6 0
2 years ago
Read 2 more answers
At least one method in an abstract class must be abstract. <br> a. True <br> b. False
azamat

your answer is A: ture

5 0
3 years ago
P6. In step 4 of the CSMA/CA protocol, a station that successfully transmits a frame begins the CSMA/CA protocol for a second fr
Karo-lina-s [1.5K]

Answer:

To avoid collision of transmitting frames.

Explanation:

CSMA/CA, carrier sense multiple access is a media access control protocol of wireless networks that allows for exclusive transmission of frames and avoidance of collision in the network. When a frame is not being sent, nodes listening for an idle channel gets their chance. It sends a request to send (RTS) message to the access point. If the request is granted, the access point sends a clear to send (CTS) message to the node, then the node can transmit its frame.

Many nodes on a wireless network are listening to transmit frames, when a frame is transmitting, the node has to wait for the access point to finish transmitting, so it sends a RTS message again to exclusively transmit a second frame.

8 0
3 years ago
Sabiendo que el engranaje motriz tiene 14 dientes y gira a 4000 RPM, y el conducido tiene 56 dientes, responde:
Lady_Fox [76]

Answer:

increase

Explanation:

14x4000/56=1000

6 0
3 years ago
Other questions:
  • Virtually all webcams plug into a(n) ________ port.
    13·2 answers
  • What is the maximum number of hosts you can have on a network if the first decimal value of the ip address is between 192 and 22
    10·1 answer
  • Nikolas has a idea that he could use the compressed carbon dioxide in a fire extinguisher to propel him on his skateboard. Nikol
    13·2 answers
  • Java
    15·1 answer
  • If you are inserting an address block with the Address Block dialog box and the fields do not connect automatically, what can yo
    6·2 answers
  • To change the name of a field, press and hold or right-click the column heading for the field, tap or click ____ on the shortcut
    7·1 answer
  • Remember partially filled arrays where the number of elements stored in the array can be less than its capacity (the maximum num
    14·1 answer
  • (25 POINTS)Which statement best reflects the importance of following safety guidelines?
    8·2 answers
  • Ten ways ict has helped in social development
    7·1 answer
  • What wireless security technology contains significant flaws and should never be used?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!