Question

In: Computer Science

Hide Folder Information Turnitin® This assignment will be submitted to Turnitin®. Instructions The Final Project for...

Hide Folder Information

Turnitin®
This assignment will be submitted to Turnitin®.
Instructions

The Final Project for this course is the creation of an employee database. This assignment will give you some insight into how Visual Basic programming can be useful in the real world.  

As you work on this application, try to make it presentable like an application you would want to use if you were using an employee database application. Feel free to incorporate pictures to make it appeal to the user….be creative. Keep in mind the things you learned such as tab order and exception handling for user experience on the front end. Also, think about the coding you are doing and make sure you comment your code and follow Visual Basic standard conventions. What if a new developer were to make changes to the application? Will they understand your intentions and what the code is doing?

Complete the following Programming Challenges:

Programming Challenge #1 - Creating Employee Data found on page 625 of the textbook.

Programming Challenge #2 - Reading Employee Data found on page 625-626 of the textbook.

Programming Challenge #12 - Employee Data, Enhanced found on page 629 of the textbook.

Specifically, be sure to meet the following criteria:

  1. Employee records must be saved to a text file.
  2. Employee records can be retrieved from the text file, display one record at a time.
  3. Employee records can be retrieved from the text file, all records at once.
  4. New employee records can be added to the text file without erasing the existing records.
  5. Users can search employee records by employee ID.
  6. Save/OpenFileDialog must be used at least once.
  7. Users can print all employee records appropriately formatted.

Solutions

Expert Solution

Imports System.IO

Public Class frmEmployeeDataPart2

    ' Declare global variables

    Dim recordNumber As Integer = 1

    Dim filename As String

    Dim sr As StreamReader

    Dim message As String

    Dim fileValid As Boolean = False

    Private Sub frmEmployeeDataPart2_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        ' Ask the user for the name of the text file and opens the file

        ' Checks user input to make sure that the file name is valid

        Do

            filename = InputBox("Input Needed", "Enter the name of the file.")

            If File.Exists(filename) Then

                sr = File.OpenText(filename)

                fileValid = True

            Else

                message = "Either no file has yet been created or the file "

                message &= "is not where expected."

                MessageBox.Show(message, "File Not Found")

                fileValid = False

            End If

        Loop Until fileValid = True

    End Sub

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

        ' clears all of the fields when the Clear button is pressed

        lblRecordNumber.Text = ""

        lblFirstName.Text = ""

        lblMiddleName.Text = ""

        lblLastName.Text = ""

        lblEmployeeNumber.Text = ""

        lblDepartment.Text = ""

        lblTelephone.Text = ""

        lblExtension.Text = ""

        lblEmailAddress.Text = ""

    End Sub

    Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click

        ' Ends the program when the Exit button is pressed.

        End

    End Sub

    Private Sub btnNext_Click(sender As Object, e As EventArgs) Handles btnNext.Click

        If sr.EndOfStream = True Then

            MessageBox.Show("End of file")

        Else

            lblRecordNumber.Text = CStr(recordNumber)

            lblFirstName.Text = sr.ReadLine

            lblMiddleName.Text = sr.ReadLine

            lblLastName.Text = sr.ReadLine

            lblEmployeeNumber.Text = sr.ReadLine

            lblDepartment.Text = sr.ReadLine

            lblTelephone.Text = sr.ReadLine

            lblExtension.Text = sr.ReadLine

            lblEmailAddress.Text = sr.ReadLine

            recordNumber += 1

        End If

    End Sub

End Class


Related Solutions

Week 4 Project - Submit Files Hide Submission Folder Information Submission Folder Week 4 Project Instructions...
Week 4 Project - Submit Files Hide Submission Folder Information Submission Folder Week 4 Project Instructions Changes in Monetary Policy Assume that the Bank of Ecoville has the following balance sheet and the Fed has a 10% reserve requirement in place: Balance Sheet for Ecoville International Bank ASSETS LIABILITIES Cash $33,000 Demand Deposits $99,000 Loans 66,000 Now assume that the Fed lowers the reserve requirement to 8%. What is the maximum amount of new loans that this bank can make?...
Hide Folder Information Instructions You are the Chief Financial Officer for Bio Innovations, a private company...
Hide Folder Information Instructions You are the Chief Financial Officer for Bio Innovations, a private company operating since 1993. Bio develops and markets cancer drugs, and recently became a cloud provider for medical centers. You recently joined the company and have been encouraging the founder and executive chair, Mary Cooper, to take the company public. Mary is reluctant to do that primarily because of the nature of the business and her belief that GAAP financial statements place the company in...
Hide Folder Information Instructions What is The Importance Of Analyzing Accounts Receivable. Accounts Receivable Financing :...
Hide Folder Information Instructions What is The Importance Of Analyzing Accounts Receivable. Accounts Receivable Financing : An alternative to bank financing for your small business DISCUSS THE ABOVE STATEMENT BY TAKING EXAMPLE OF BUSINESS ORGANIZATION OF YOUR CHOICE.
Hide Assignment Information Instructions The following information is available to reconcile Cloy Company's book balance of...
Hide Assignment Information Instructions The following information is available to reconcile Cloy Company's book balance of cash with its bank statement cash balance as of March 31, 2019. The March 31, 2019 cash balance according to the accounting records is $58,542, and the bank statement cash balance for that date is $68,047. a. The bank erroneously cleared a $395 check against the account in June that was not issued by Cloy. The check documentation included with the bank statement indicates...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only)...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted through email will not be accepted. Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the cover page. Students must mention question number clearly in their answer. Late submission will NOT be accepted. Avoid plagiarism, the work should be in your own words, copying...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only)...
Instructions – PLEASE READ THEM CAREFULLY The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted through email will not be accepted. Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the cover page. Students must mention question number clearly in their answer. Late submission will NOT be accepted. Avoid plagiarism, the work should be in your own words, copying...
In the root of the project create a folder called res. In that folder create a...
In the root of the project create a folder called res. In that folder create a file called DemoFile.txt Create a class with a static main that tests the ability to resolve and print a Path: Create an instance of a FileSystem class. Create an instance of the Path interface for the DemoFile.txt file. Print the constructed Path with System.out.println() method. Create a class that does the following: Using a pre-Java 7 solution, create a class that tests streams in...
the assignment folder for this assignment contains a file called values.txt. The first line in the...
the assignment folder for this assignment contains a file called values.txt. The first line in the file contains the total number of integers which comes after it. The length of this file will be the first line plus one lines long. Implement a MinHeap. Your program should read in input from a file, add each value to the MinHeap, then after all items are added, those values are removed from the MinHeap. Create a java class called MinHeap with the...
Instructions: You are to select a topic on continuous quality improvement for your final project. The...
Instructions: You are to select a topic on continuous quality improvement for your final project. The improvement must be in the health care sector and involve multiple disciplines, such as health information technology, laboratory, radiology, infection control, etc. You may select a real process or a hypothetical one. Your project selection is due by the end of this unit. Your project selection should include the following: · State the title of your quality improvement project. · Describe your topic by...
General Instructions Upload Matlab files for Assignment 8 to the appropriate link on Blackboard. Upload final...
General Instructions Upload Matlab files for Assignment 8 to the appropriate link on Blackboard. Upload final Matlab files (YourINITIALSfilename.m), separately. Print program flowcharts, listings (a copy of the Matlab code) and requested sample runs, and submit each on the due date. Deliverables: For each program submit a flowchart, listing of the code, a sample run and the program’s Matlab (.m) file. Problems: 1. The “filename” in YourINITIALSfilename.m for this program is “cylinder”. Create a flowchart and a corresponding Matlab program...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT