Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 10, Problem 2E
Open the Palace Solution.sln file contained in the VB2017\Chap10\Palace Solution folder.
- a. Use Windows to copy the Rectangle.vb file from the VB2017\Chap10 folder to the Palace Project folder. Then, use the Add Existing Item option on the Project menu to add the file to the project.
- b. Modify the Rectangle class to use Double variables rather than Integer variables.
- c. Change the name of the GetArea method to GetAreaSqFt.
- d. Add another method to the class. Use Get AreaSqYds as the method’s name. The method should calculate and return the area of a rectangle in square yards.
- e. The application’s Calculate button should calculate and display the number of square yards of carpeting needed to carpet a rectangular floor. Code the btnCalc_Click procedure. Display the number of yards with one decimal place. Save the solution and then start and test the application.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local
Create a new project named LabExer8. Set the project location to your own
Construct import statements to use the packages listed below:
swing
awt
awt.event
Extend the JFrame class and implement the ActionListener
Create a JMenuBar named mainBar and two (2) JMenu objects named menu1 and menu2. Set the text of menu1 as File and the text of menu2 as Event Type.
Create the items that will appear in the The File menu shall contain an Exit submenu. Name the object exit. The Event Types menu shall contain two (2) submenus: Adult and Child. Name the objects adult and child, respectively. The Adult submenu shall consist of: Birthday (adultBday), Anniversary (anniv), Retirement (retirement), and Other (adultOther). The Child submenu shall consist of Birthday (childBday), and Other (childOther).
Declare several other components that will be used in the Create two (2) JPanel objects named currentPanel and otherPanel.…
this is a java program code please do the code what in the question says and please follow what in the question says and dont copy or plagarise from other sources
Add three files of any type you choose—for example, word-processing documents,spreadsheets, or pictures.Create a new folder named test inside folder data and move your third file in this folder.Write an application that determines whether the first two files are located in the same folderas the third one. Test the program when the files are in the same folder (before moving thirdfile in test folder) and when they are not (after moving third file in test folder).Save the file as CompareFolders.java.Submit the data folder zipped along with CompareFolders.java.HINT: Use try/catch block, path class and its methods.Run a loop to check the name count.Output will look like: -Path for file1 is C:\Users\<your file path>\Lab9\TestData1.txtPath for file2 is C:\Users\<your file path>\Lab9\TestData2.txtPath for file3 is C:\Users\<your file path>\Lab9\TestData3.txtAll files are in the same folderPath for file1 is C:\Users\<your file path>\Lab9\TestData1.txtPath for file2 is…
Chapter 10 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 10 - The name of a class file ends with which of the...Ch. 10 - The Inventory class contains a Private variable...Ch. 10 - Prob. 4RQCh. 10 - Which of the following statements is false? a. A...Ch. 10 - A Private variable in a class can be accessed...Ch. 10 - Prob. 7RQCh. 10 - Which of the following is the name of the...Ch. 10 - Prob. 10RQCh. 10 - Prob. 11RQCh. 10 - Prob. 12RQ
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Assignment First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "MultiTable" (without the quotation marks) that uses nested for loops to print a multiplication table as shown below. The value of each cell should be computed using the values in the row and column headings (e.g., 1 * 1; 1 * 2; 1 * 3; etc.). Make sure to match the below results as shown. * | 1 2 3 4 5 6 7 8 9 ------------------------------- 1 | 1 2 3 4 5 6 7 8 9 2 | 2 4 6 8 10 12 14 16 18 3 | 3 6 9 12 15 18 21 24 27 4 | 4 8 12 16 20 24 28 32 36 5 | 5 10 15 20 25 30 35 40 45 6 | 6 12 18 24 30 36 42 48 54 7 | 7 14 21 28 35 42 49 56 63 8 | 8 16 24 32 40 48 56 64 72 9 | 9 18 27 36 45 54 63 72 81Copy and paste at least one sample run in your source code as a block comment at the bottom below the closing curly brace.arrow_forward*with psuedo code First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects). Then create a new Java application called "WeightedAvgDataAnalyzer" (without the quotation marks), that does the following: This program is similar to the previous assignment - "WeightedAvgDropSmallest" - with a major difference that the inputs for the program will be read from a file and the output for this assignment should be written to a new file. The concept of application is as follows: The program will read numbers from a file - data.txt - that you will create, where the weight is a double (greater than 0.0 and less than or equal to 1.0) and the other numbers are the number, n, of lowest values to drop and then the numbers to be averaged after dropping the lowest n values. Example data.txt file would display: 0.5 3 10 70 90 80 20 The program then calculates the weighted average of all those numbers except the lowest n numbers, where…arrow_forwardFor this milestone, you will be submitting a working draft of the code for a simplified version of the text-based game that you are developing for Project Two. You will focus on displaying how a room dictionary works with the “move” commands. This will include the if, else, and elif statements that move the adventurer from one room to another. Before beginning this milestone, it is important to understand the required functionality for this simplified version of the game. The game should prompt the player to enter commands to either move between rooms or exit the game. Review the Milestone Simplified Dragon Text Game Video and the Milestone Simplified Text Game Flowchart to see an example of the simplified version of the game. A video transcript is available: Transcript for Milestone Simplified Dragon Text Game Video. IMPORTANT: The “Move Between Rooms” process in the Milestone Simplified Text Game Flowchart is intentionally vague. You designed a more detailed flowchart or pseudocode…arrow_forward
- You have been provided with a QTCreator project called Project13 _ Student. Open the project in QTCreator and make the necessary changes to the main.cpp file. You have been provided with file named Data.txt. Data.txt contains information about students. Each line contains the information for one student. The student information is seperated by a comma and is in the following format : Name,Surname,Email,Age,StudentNumberNotice how the first line in the file contains a heading. This line should be ignored by your code when processing the file. You may not modify the Data.txt file. Write the code for the function named splitSingleStudent ( string[],string ) . splitSingleStudent receives an array and a signle line from the file as parameter. The function then splits the line received from the file and loads the array parameter with the correct values. The array parameter should be loaded as follows :Index 1 : Name Index 2 : Surname Index 3 : Email Index 4 : Age In the main function open…arrow_forwardIn this lab, you are to create ONE project that contains TWO forms for this assignment. The form and all controls should be named using VB standards. Within the code, using meaningful variable names that meet the VB standards and appropriate data types. Comments are always encouraged. Form 1: Working with Loops - The first form will have two button click events: First Button Click Event: Using a Do Loop with a Sentinel value of−1ask the user to type in the list of courses they have completed (ex: CIS115). As they enter the courses, display the courses in a listbox. Second Button Click Event: Once the course listbox has been populated, the user will select a course from the listbox that will be converted into a new string using the guidelines given below. This event must validate that a course has been selected from the listbox before the process of generating the new string coded name can be done. (Hint: see page 274.) If a course has been selected, that name should be read into the…arrow_forwardin java but don't write as a GUI (Graphical User Interface) Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder, probably named FileCopy depending on what name you gave the project. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself. Class should be named FileCopy do not write to input.txt!arrow_forward
- General Description For this assignment, you will read and process historical stock data for the Tesla company. Project Setup and Structure Create a new java project in Eclipse and call it homework01. Inside the src folder, create a new java package called hw01. All your source code files will need to be placed in the hw01 file. Inside the src folder, create a new folder called files. Your .csv files should go in files. NOTE: When working with the .csv file, your program must use a relative path to the .csv file, NOT an absolute path. TeslaStock Class Create a class called TeslaStock. This class will be used to represent each stock's data in your project. This class should not contain any methods to read/write the data. Only implement the following in the class. This class should contain data fields for the date, opening price, low price, high price, and closing price of a stock. All data fields shall have the PRIVATE access modifier.. Create getters and setters for each…arrow_forwardPart 2: Now follow the instructions to create a class named PizzaPalaceFinal Open Eclipse. Select the project Chap7-PizzaPalaceFinal in the left pane. Next, create a New -> Class. Name it PizzaPalaceFinal and check the first checkbox under "Which method stubs would you like to create?" and click Finish. Delete the green comment text in the file "PizzaPalaceFinal.java" Add a comment at the top // (your name) Add another comment at the top // Exercise 7 Copy the code from your PizzaPalace.java file from Project 6 and paste it into this file. Save the file. (Attached to this question is the code for PizzaPalace.java) Edit your code for this file to implement an array of pizzas. This change will only require modifications to your file "PizzaPalaceFinal.java": Requirements: Create an array of Pizza objects named pizzas and size it to the number of Pizzas specified by the user After you created each pizza object and verified it was correct, add code to store the pizza…arrow_forwardCreate a folder named LastName_FirstName(please write Dahanyoon (ex. Reyes_Mark) in your local Create a new project named LabExer5A. Set the project location to your own The program shall: generate a random number from 1 to 50 for a player to guess; display a message that indicates whether the player’s guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct value is entered Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1 – 50) a letter or any non-numeric character Prompt the user so that he can guess again if an exception is Display the number of total Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.arrow_forward
- In this exercise, you modify the Grade Calculator application from this chapter’s Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate. Open the Grade Solution.sln file contained in the Grade Solution-Intermediate folder. Open the CourseGrade.vb file. The DetermineGrade method should accept an integer that represents the total number of points that can be earned in the course. (Currently, the total number of points is 200: 100 points per test.) For an A grade, the student must earn at least 90% of the total points. For a B, C, and D grade, the student must earn at least 80%, 70%, and 60%, respectively. If the student earns less than 60% of the total points, the grade is F. Make the appropriate modifications to the DetermineGrade method and then save the solution. Unlock the controls on the form. Add a label control and a text box to the form. Change the label control’s Text property to “&Maximum points:” (without the quotation marks). Change the text box’s name to txtMax. Lock the controls and then reset the tab order. Open the form’s Code Editor window. The txtMax control should accept only numbers and the Backspace key. Code the appropriate procedure. The grade should be cleared when the user makes a change to the contents of the txtMax control. Code the appropriate procedure. Modify the frmMain_Load procedure so that each list box displays numbers from 0 through 200. Locate the btnDisplay_Click procedure. If the txtMax control does not contain a value, display an appropriate message. The maximum number allowed in the txtMax control should be 400; if the control contains a number that is more than 400, display an appropriate message. The statement that calculates the grade should pass the maximum number of points to the studentGrade object’s DetermineGrade method. Make the necessary modifications to the procedure. Save the solution and then start and test the application.arrow_forwardWhich of the following statements is false? a. A class can contain only one constructor. b. An example of a behavior is the SetTime method in a Time class. c. An object created from a class is referred to as an instance of the class. d. An instance of a class is considered an object.arrow_forwardWhen processing the outFile = IO.File.AppendText("report.txt") statement, thecomputer will look for the “report.txt” file in the current folder.a. projectb. project’s bin c. project’s bin\Debugd. project’s Debugarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY