Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

CIS 3331 Midterm Exam Question #1 The Megawatt solar panel company installs solar panels on home rooftops. The base installation charge of $2,000 includes two panels. The charge for each additional...

1 answer below »
CIS 3331 Midterm Exam
Question #1
The Megawatt solar panel company installs solar panels on home rooftops. The base installation
charge of $2,000 includes two panels. The charge for each additional panel is $300. The normal
waiting time for installation is two weeks, but customers can pay an express charge of 5% of the
total cost to reduce this time.
Create an application that collects the required information from the user and calculates the
charges for the installation. The user should input the following information: first name, last
name, phone, number of panels, deposit amount, and a check box for the express installation
option. When the user clicks a button to view the charges, display a group box containing the
following information: base installation charge, cost of installing additional panels, total
installation cost, deposit amount, and balance due.
E
or checking should include the following criteria:
• The name and phone fields cannot be blank
• The number of panels must be an integer between 1 and 1,000
• The deposit amount must be a numeric value greater than 0.
Use separate procedures and functions for validation and calculations whenever possible. For
example, validation of user inputs should be performed in a separate Boolean function, called
from the Click handler of the Calculate Charges button. Display e
or messages whenever
appropriate.
When the application starts, as in Figure 1, the Charges group box should be invisible. After the
user clicks the Calculate Charges button and all inputs are validated, the Charges group box
should appear, as shown in Figure 2. If the deposit amount was greater than the total charges,
change the caption of the final field from “Balance due” to “Refund”. When the user clicks the
Clear button, clear all inputs
and hide the Charges group box.
Figure 1
Figure 2
Question #2
Adding Students to a Club
Create an application that displays a list of student names in a ListBox. Use a second empty ListBox to
epresent the members of a student club. Use a button labeled Add to copy member names from the
general list to the club list. Use a button labeled Remove to remove a student from the club list. Keep a
unning count of the number of names in the club list.
The application should perform the following e
or-checking:
• Do not permit the same person’s name to be added twice.
• Avoid throwing an exception if the user clicks the Add button before having selected a student name.
• Avoid a runtime e
or if the user clicks the Remove selected member button, without having selected a
member name.
A sample of the program’s interface is shown in Figure 3.
Figure 3
Answered Same Day Jun 30, 2021

Solution

Arun Shankar answered on Jul 04 2021
160 Votes
WindowsApp2/.vs/WindowsApp2/v15/.suo
WindowsApp2/.vs/WindowsApp2/v15/Serve
sqlite3/db.lock
WindowsApp2/.vs/WindowsApp2/v15/Serve
sqlite3/storage.ide
WindowsApp2/.vs/WindowsApp2/v15/Serve
sqlite3/storage.ide-shm
WindowsApp2/.vs/WindowsApp2/v15/Serve
sqlite3/storage.ide-wal
WindowsApp2/WindowsApp2/App.config




WindowsApp2/WindowsApp2
in/Debug/WindowsApp2.exe
WindowsApp2/WindowsApp2
in/Debug/WindowsApp2.exe.config




WindowsApp2/WindowsApp2
in/Debug/WindowsApp2.pd
WindowsApp2/WindowsApp2
in/Debug/WindowsApp2.xml



WindowsApp2



A strongly-typed resource class, for looking up localized strings, etc.


Returns the cached ResourceManager instance used by this class.


Ove
ides the cu
ent thread's Cu
entUICulture property for all
resource lookups using this strongly typed resource class.
WindowsApp2/WindowsApp2/Form1.Designer.v
Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form ove
ides dispose to clean up the component list.
_
Protected Ove
ides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Su
'Required by the Windows Form Designe
Private components As System.ComponentModel.IContaine
'NOTE: The following procedure is required by the Windows Form Designe
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.TextBox4 = New System.Windows.Forms.TextBox()
Me.TextBox5 = New System.Windows.Forms.TextBox()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.TextBox6 = New System.Windows.Forms.TextBox()
Me.TextBox7 = New System.Windows.Forms.TextBox()
Me.TextBox8 = New System.Windows.Forms.TextBox()
Me.TextBox9 = New System.Windows.Forms.TextBox()
Me.TextBox10 = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(532, 186)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(167, 50)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Calculate Charges"
Me.Button1.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(15, 27)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(57, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "First Name"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.TextBox3)
Me.GroupBox1.Controls.Add(Me.TextBox2)
Me.GroupBox1.Controls.Add(Me.TextBox1)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(89, 30)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(610, 101)
Me.GroupBox1.TabIndex = 2
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Customer Information"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(14, 60)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(58, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Last Name"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(326, 27)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(38, 13)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Phone"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(132, 27)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(157, 20)
Me.TextBox1.TabIndex = 4
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(132, 60)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(157, 20)
Me.TextBox2.TabIndex = 5
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(391, 27)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(143, 20)
Me.TextBox3.TabIndex = 6
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.CheckBox1)
Me.GroupBox2.Controls.Add(Me.TextBox5)
Me.GroupBox2.Controls.Add(Me.TextBox4)
Me.GroupBox2.Controls.Add(Me.Label5)
Me.GroupBox2.Controls.Add(Me.Label4)
Me.GroupBox2.Location = New System.Drawing.Point(89, 151)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(398, 139)
Me.GroupBox2.TabIndex = 3
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Installation Options"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(15, 34)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(90, 13)
Me.Label4.TabIndex = 0
Me.Label4.Text = "Number of panels"
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(14, 62)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(81, 13)
Me.Label5.TabIndex = 1
Me.Label5.Text = "Deposit amount"
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(132, 27)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(157, 20)
Me.TextBox4.TabIndex = 2
'
'TextBox5
'
Me.TextBox5.Location = New System.Drawing.Point(132, 59)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(157, 20)
Me.TextBox5.TabIndex = 3
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(18, 110)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(139, 17)
Me.CheckBox1.TabIndex = 4
Me.CheckBox1.Text = "Express Installation (5%)"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Button3)
Me.GroupBox3.Controls.Add(Me.Button2)
Me.GroupBox3.Controls.Add(Me.TextBox10)
Me.GroupBox3.Controls.Add(Me.TextBox9)
Me.GroupBox3.Controls.Add(Me.TextBox8)
Me.GroupBox3.Controls.Add(Me.TextBox7)
Me.GroupBox3.Controls.Add(Me.TextBox6)
Me.GroupBox3.Controls.Add(Me.Label10)
Me.GroupBox3.Controls.Add(Me.Label9)
Me.GroupBox3.Controls.Add(Me.Label8)
Me.GroupBox3.Controls.Add(Me.Label7)
Me.GroupBox3.Controls.Add(Me.Label6)
Me.GroupBox3.Location = New System.Drawing.Point(89, 309)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(610, 210)
Me.GroupBox3.TabIndex = 4
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Charges"
Me.GroupBox3.Visible = False
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(17, 40)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(136, 13)
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here