Ankit Yadav .net.docx

  • Uploaded by: Ankit Yadav
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Ankit Yadav .net.docx as PDF for free.

More details

  • Words: 874
  • Pages: 19
.NET PROGRAMMING LAB FILE

Submitted to: Ms.

Submitted by: Ankit Yadav BCA(evening) A10046617021

QUES 1. Write a program to perform following operation: a. ADD b. SUBTRACT c. MULTIPLY d. DIVISION e. MOD

QUES 2. Create a list box, which contains names of all cinema halls of NCR. If you choose name of cinema hall, label display information regarding all movies running in the cinema halls

QUES 3 . Create and validate login form.

QUES 4. Write a program to calculate pay that takes two parameters hours and wages and display the total pay of an employee

QUES 5 Write a program to print first n square less than 50 and print the sum of the all the square of the n number Answer . Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sqr As Integer Dim sum As Integer sum = 0 For x As Integer = 0 To 7 sqr = x * x sum = sum + sqr Next Label3.Text = sqr Label4.Text = sum End Sub End Class

QUES. 6 . Create a project for book sales. Make text boxes for quantity, title and price with labels. Calculate total price, discount (15%) and discounted price. Make command buttons for calculate, clear and exit.

QUES 7 Create a project for the local car rental agency that calculates rental charges. The agency charge $15 per day + $0.50 per km. use text boxes for customer name, address, city, state, zip code, beginning and ending audiometer reading and no. of days the car was used. Use labels to display the miles given and the total charges. Make command buttons for clear, exit and calculate.

QUES 8. Create a project that will input an employee salary. Calculate a gross salary, deduction and net salary. Each employee will receive a basic pay of $900 + sales commission of 6% of sales. After calculating the net paid calculate the budget amount of each category based on the % given. i. Bank pays $900 ii. Commission 6% of sales iii. Gross pay Basic pay + Commission iv. Deduction 18% of gross pay v. Net pay Gross pay – deduction Budget:- Housing 30% of net pay Food and clothing 15% of net pay Entertainment 50% of net pay Miscellaneous 5% of net pay Use text boxes to input the employee name, amount of sales. Use labels to display the result and the calculation. Use calculates, clear and exit command buttons.

QUES 9 write a program of select case to find grade of a student in a marksheet .and show the percentage in another textbox.

QUES 10 Write a program of a listbox exercise including fill button , sort button,count button,clear button and remove button.make a listbox of the different courses in aiit department.

QUES 11 Maintain a list of types of ice creams. Use a drop down combo box to hold the ice-cream type and use command button to add, remove, clear, display and exit. Don’t allow a blank type to be added to the list. Display an error message if the user select remove without first selecting an ice-cream type. Before clearing the list, display a message to confirm the operation. ANSWER : Public Class Form1 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click End End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click For Each i As ListViewItem In ListView1.SelectedItems ListView1.Items.Remove(i) Next End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ListView1.Items.Clear() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim item As String item = ComboBox1.SelectedItem If item = "" Then

MessageBox.Show("Please Select a Valid Flavor") Else ListView1.Items.Add(item) End If

End Sub

Private Sub FontDialog1_Apply(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontDialog1.Apply End Sub End Class

QUES 12 . Write a program to find the area of a box(Length* breadth *height ) using class. Class Box Public length As Double Public height As Double Public breadth As Double End Class

Module Module1 Sub Main() Dim box1 As Box = New Box() Dim box2 As Box = New Box() Dim volume As Double = 0.0 box1.height = 5.0 box1.breadth = 7.0 box1.length = 6.0 box2.height = 10.0 box2.breadth = 13.0 box2.length = 12.0 volume = box1.height * box1.length * box1.breadth Console.WriteLine(volume) volume = box2.height * box2.length * box2.breadth

Console.WriteLine(volume) Console.ReadKey() End Sub End Module QUES13 . WRITE A program of a tree view control Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'create a new TreeView Dim TreeView1 As TreeView TreeView1 = New TreeView() TreeView1.Location = New Point(10, 10) TreeView1.Size = New Size(150, 150) Me.Controls.Add(TreeView1) TreeView1.Nodes.Clear() 'Creating the root node Dim root = New TreeNode("Application") TreeView1.Nodes.Add(root) TreeView1.Nodes(0).Nodes.Add(New TreeNode("Project 1")) 'Creating child nodes under the first child For loopindex As Integer = 1 To 4 TreeView1.Nodes(0).Nodes(0).Nodes.Add(New

_

TreeNode("Sub Project" & Str(loopindex)))

Next loopindex ' creating child nodes under the root TreeView1.Nodes(0).Nodes.Add(New TreeNode("Project 6")) 'creating child nodes under the created child node For loopindex As Integer = 1 To 3 TreeView1.Nodes(0).Nodes(1).Nodes.Add(New

_

TreeNode("Project File" & Str(loopindex))) Next loopindex ' Set the caption bar text of the form. Me.Text = "tutorialspoint.com" End Sub End Class

Related Documents

Ankit Yadav .net.docx
April 2020 2
Jitendra Yadav
June 2020 6
Resume Ankit
November 2019 21
Airtel Ankit
May 2020 13
Ankit Gupta.docx
October 2019 12
Ankit Ticket.pdf
April 2020 9

More Documents from "Akash Gupta"