Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 8E
Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to the salaries, accept them from the user as input.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Design and implement an application that presents three buttons and a label to the user.
The buttons should be labeled Increment, Decrement, and Randomize.
Display a numeric value (initially 50) using the label.
Each time the Increment button is pushed, increment the value displayed.
Likewise, each time the Decrement button is pushed, decrement the value displayed.
When the Randomize button is pushed, the number displayed should be randomized between 1 and 100,
inclusive.
Gradient FillIn this labwork are asked to write a GUI application again using AWT. This is a fairly easy labworkthat is more about getting used to synchronized online learning. You are expected to:• Draw two rectangles.• Both of them should be filled using GradientPaint() function of AWT. (Check out itsfunction definition that is listed below.)• The first gradient should be parallel to the diagonal of the first rectangle. The colorgradient should not be repeated (acyclic).• The second gradient should be horizontal. The color gradient should be repeated forthis one (cyclic).• You are free to choose the colors but other than that your output should be similar tothe example screenshot given below.
Assignment using Methods
For this exercise, you need to complete all the questions in a single project. You will invoke the methods from your main. Questions 1-6 is due at the end of your next class.
Write a method with the following specifications:name: DisplayMenuarguments: nonereturn value: nonetasks: display the following menu choice on the screenCalculation Menu3) Calculate Sum 4) Calculate Sum of Squares5) Calculate Sum of Cubes0) To ExitEnter the number that corresponds to your choice: You may beautify the output to your own likings. You don’t have to implement the functionalities of the various menu choices at this stageCall this method from your main.
Modify your main so that the above method is call repeatedly. The program will terminate when the user enters 0. Any other choice should produce an error message. Because you will not be doing any arithmetic you may accept the user response either as an int, or a char or a string.
Write a method with the following…
Chapter 2 Solutions
Microsoft Visual C#
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Assume that you have two variables declared as int...Ch. 2 - Assume that you have a variable declared as...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Prob. 8RQCh. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...
Ch. 2 - Prob. 11RQCh. 2 - Which of the following is not a C# comparison...Ch. 2 - Prob. 13RQCh. 2 - Which of the following C# types cannot contain...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - When you perform arithmetic operations with...Ch. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Which of the following compares two string...Ch. 2 - What is the numeric value of each of the following...Ch. 2 - What is the value of each of the following Boolean...Ch. 2 - Choose the best data type for each of the...Ch. 2 - In this chapter, you learned that although a...Ch. 2 - Write a C# program named InchesTOCentmeters that...Ch. 2 - Prob. 6ECh. 2 - Write a C# program named ProjectedRaises that...Ch. 2 - Convert the ProjectedRaises class to an...Ch. 2 - Malcolm Movers charges a base rate of $200 per...Ch. 2 - Prob. 10ECh. 2 - Write a program named Eggs that declares four...Ch. 2 - Modify the Eggs program to create a new one named...Ch. 2 - Write a program named MakeChange that calculates...Ch. 2 - Write a program named Testslnteractive that...Ch. 2 - Write a program named FahrenheitToCelsius that...Ch. 2 - Prob. 16ECh. 2 - Prob. 17ECh. 2 - Pig Latin is a nonsense language. To create a word...Ch. 2 - Each of the following files in the Chapter.02...Ch. 2 - In Chapter 1, you created two programs to display...Ch. 2 - Prob. 2CP
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
- For each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program named TestScoreList that accepts eight int values representing student test scores. Display each of the values along with a message that indicates how far it is from the average.arrow_forwardWrite a GUI program named TestsInteractiveGUI that allows a user to enter scores for five tests he has taken. Display the average of the test scores to two decimal places.arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number of days for a resort stay. Then display the price per night and the total price. Nightly rates are $200 for one or two nights; $180 for three or four nights; $160 for five, six, or seven nights; and $145 for eight nights or more.arrow_forward
- Develop an interactive GUI-Tkinter Calculator. The calculator will include all standard mathematical operations such as addition, subtraction,multiplication and division. The expect output is shown in the picture.arrow_forwardIn C#. Please make an interface that looks as descibes on the imagearrow_forwardIn C# language using Microsoft Visual Studio in Windows Forms App (.NET Framework) A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money, which the slot machine dispenses back to the user. Design a program that simulates a slot machine. When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine. Create an application that simulates a slot machine. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols.arrow_forward
- For this interactive assignment, you will create an application that grades the written portion of the driver’s license exam. The exam has 20 multiple-choice questions. Here are the correct answers: B 2. D 3. A 4. A 5. B 6. A 7. B 8. A 9. C 10. D B 12. C 13. D 14. A 15. D 16. C 17. C 18. B 19. D 20. A Your program should store these correct answers in a list. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another list. (Create your own answer text file to test the application.) After the student’s answers have been read from the text file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the…arrow_forwardThe Westfield Carpet Company has asked you to write an application that calculates theprice of carpeting for rectangular rooms. To calculate the price, you multiply the area of thefloor (width times length) by the price per square foot of carpet. For example, the area offloor that is 12 feet long and 10 feet wide is 120 square feet. To cover that floor with carpetthat costs $8 per square foot would cost $960. (12 3 10 3 8 5 960.)First, you should create a class named RoomDimension that has two fields: one for the lengthof the room and one for the width. The RoomDimension class should have a method thatreturns the area of the room. (The area of the room is the room’s length multiplied by theroom’s width.)Next you should create a RoomCarpet class that has a RoomDimension object as a field. Itshould also have a field for the cost of the carpet per square foot. The RoomCarpet classshould have a method that returns the total cost of the carpet.Figure 8-21 is a UML diagram that shows…arrow_forwardHow to write a code using Csharp in visual studio code 2019 to create a school checking system: You are to design the interface with the following functions in mind: Welcome screen encouraging a start to the check in Choice of Staff / Student / Visitor options For Visitors: entering their name and choosing a Staff name they are visiting from a list available, then taking a photo from a built in camera tool and confirming this is ok. For Staff: choosing a name from a list and confirming to complete. For Students: choosing a year group (7-11) then Form ID (from four per year) and then student name from appropriate lists and confirming to complete. Cancelling from any point to return to the Welcome screen.arrow_forward
- The game of Nim starts with a random number of stones between 15 and 30. Two players alternate turns and on each turn may take either 1, 2, or 3 stones from the pile. The player forced to take the last stone loses. Create a nim application in python that allows the user to play against the computer. In this version of the game, the application generates the number of stones to begin with, the number of stones the computer takes, and the user goes first. The Nim application code should: prevent the user and the computer from taking an illegal number of stones. For example, neither should be allowed to take three stones when there are only 1 or 2 left. include an is_valid_entry() function to check user input. include a draw_stones() function that generates a random number from 1 to 3 for the number of stones the computer draws. include separate functions to handle the user’s turn and the computer’s turn. My problem is that the code is not outputting like it's supposed to.…arrow_forwardVB create this program on visual basics or any other programming GUI langauge Create one object – Person, and code it. Create the menus shown in the demo program. The interface is a bit different from what you have done to this point. Play with the program to see how it works. The hungarian notation for a date control is dte. Commands The key commands of this program are: Add a Person Remove a Person Display next person Display previous person Display first person Display last person. Create the programming to make these components work. Refer to the power point notes for examples of how the code needs to be set up. Protecting Data against Accidental change Change the display to allow the user to enter data into text boxes, but protect the data from being accidentally changed by setting the ReadOnly property of the text boxes appropriately. This should be a sub. Call it as you need it. The Date has no ReadOnly property, use the Enabled property instead for this control. Use the enabled…arrow_forwardVisual C# - This must be a Universal Windows Application form Starting out a project program called Data Collector Please Define an interface Define an interface called IMeasuringDevice. Add it to your project in its own IMeasuringDevice.cs source file Add the following public method declarations to your new interface: MetricValue. This method will return a decimal that represents the metric value of the most recent measurement that was captured. ImperialValue. This method will return a decimal that represents the imperial value of the most recent measurement that was captured. StartCollecting. This method will start the device running. It will begin collecting measurements and record them. StopCollecting. This method will stop the device. It will cease collecting measurements. GetRawData. This method will retrieve a copy of all of the recent data that the measuring device has captured. The data will be returned as an array of integer values. Comment your new method…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Time Complexity Analysis - How To Calculate Running Time | InterviewBit; Author: InterviewBit;https://www.youtube.com/watch?v=--oxG4Q1PA0;License: Standard YouTube License, CC-BY