Codes + Flowcharts + Pseudocodes + Output of Questions!

This repository is created to show solutions of Visual Based Programming midterm-2 questions.

You can easily find the explanation of solutions from Documentation and you can find source codes of questions in HW_N folder where N is 8.8, 12.6, 13.8, 17.8. Also flowcharts are in the Flowchart folder, pseudocodes are in Pseudocode folder!

To see Visual Based Programming midterm-1 repository: First Midterm


Question 8.8:

Write a console application that implements a Square shape. Class Square should contain an instance property Side that has get and set accessors for private data. Provide two constructors: one that takes no arguments and another that takes a side length as a value. Write an application class that tests class Square’s functionality.

Question 12.6:

Extend the program of Fig. 12.30 to include options for changing the size and color of the lines drawn. Create a GUI similar to the one in Fig. 12.35. (Hint: Have variables to keep track of the currently selected size (int) and color (Color object). Set them using the event handlers for the radio buttons. For the color, use the various Color constants (such as Color.Blue). When responding to the mouse moves, simply use the size and color variables to determine the proper size and color.)

Question 13.8:

Create a UserControl called LoginPasswordUserControl. The LoginPasswordUserControl contains a Label (loginLabel) that displays String "Login:", a TextBox (loginTextBox) where the user inputs a login name, a Label (passwordLabel) that displays the String "Password:" and finally, a TextBox (passwordTextBox) where a user inputs a password (don’t forget to set property PasswordChar to "*" in the TextBox’s Properties window). LoginPasswordUserControl must provide public read-only properties Login and Password that allow an application to retrieve the user input from loginTextBox and passwordTextBox. The UserControl must be exported to an application that displays the values input by the user in LoginPasswordUserControl.

Question 17.8:

You are the owner of a hardware store and need to keep an inventory of the different tools you sell, how many of each are currently in stock and the cost of each. Write a program that initializes the random-access file hardware.dat to 100 empty records, lets you input data relating to each tool, enables you to list all your tools, lets you delete a record for a tool that you no longer have and lets you update any information in the file. The tool identification number should be the record number. Use the information in Fig. 17.24 to start your file.