Color Mixer
The colors red, blue, and yellow are known as the primary colors because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color, as shown here:
- When you mix red and blue, you get purple.
- When you mix red and yellow, you get orange.
- When you mix blue and yellow, you get green.
Create an application that lets the user select two primary colors from two different sets of Radio buttons. The form should also have a Mix button. When the user clicks the Mix button, the form’s background should change to the color that you get when you mix the two selected primary colors. Figure 4-34 shows an example of how the form should appear.
Figure 4-34 The Color Mixer form
Note: If the user picks the same color from both sets of Radio buttons, set the form’s background to that color.
Trending nowThis is a popular solution!
Chapter 4 Solutions
EBK STARTING OUT WITH VISUAL C#
Additional Engineering Textbook Solutions
Starting Out With Visual Basic (8th Edition)
Starting Out with Python (4th Edition)
SURVEY OF OPERATING SYSTEMS
Starting Out with C++ from Control Structures to Objects (9th Edition)
Concepts Of Programming Languages
Introduction To Programming Using Visual Basic (11th Edition)
- Splitwise Your objective is to create the backend for an expense sharing application. An expense sharing application is where you can add your expenses and split it among different people. The app keeps balances between people as in who owes how much to whom. Examples: You live with 3 other friends. You: User1 (id: u1) Flatmates: User2 (u2), User3 (u3), User4 (4) - Example 1: This month's electricity bill was Rs. 1000. Now you can just go to the app and add that you paid 1000, select all the 4 people and then select split equally. Input: u1 paid Rs 1000/- for u1 u2 u3 u4 and needs to be split EQUALLY For this transaction, everyone owes Rs 250 to User1. The app should update the balances in each of the profiles accordingly. User2 owes User1: Rs 250 User3 owes User1: Rs 250 User4 owes User1: Rs 250 - Example 2: Now, there is a major sale on Flipkart and there is an offer on your card. You buy a few things for User2 and User3 as they asked you to. The total amount for each person is…arrow_forwardLatin Translator Look at the following list of Latin words and their meanings: Latin English sinister left dexter right medium center Create an application that translates the Latin words to English. The form should have three buttons, one for each Latin word. When the user clicks a button, the application should display the English translation in a Label control.arrow_forwardTip, Tax, and Total Create an application that lets the user enter the food charge for a meal at a restaurant. When a button is clicked, the application should calculate and display the amount of a 15 percent tip, 7 percent sales tax, and the total of all three amounts.arrow_forward
- T F: Buttons are the only controls that can respond to Click events.arrow_forwardTrue or False Forms and most controls have a Preferences property that allows you to change the object’s background color.arrow_forwardTheater RevenueA movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create a GUI application that allows the user to enter the following data into text fields:� Price per adult ticket� Number of adult tickets sold� Price per child ticket� Number of child tickets soldThe application should calculate and display the following data for one night�s box office business at a theater:� Gross revenue for adult tickets sold. This is the amount of money taken in for all adult tickets sold.� Net revenue for adult tickets sold. This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted.� Gross revenue for child tickets sold. This is the amount of money taken in for all child tickets sold.� Net revenue for child tickets sold. This is the amount of money from child ticket sales left over after the payment to the movie company has been deducted.� Total gross revenue. This…arrow_forward
- In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving object’s kinetic energy:KE = 1/2 mv2In the formula KE is the kinetic energy, m is the object’s mass in kilograms, and v is the object’s velocity in meters per second. Create an application that allows the user to enter an object’s mass and velocity and then displays the object’s kinetic energy. The application should have a method named KineticEnergy that accepts an object’s mass (in kilograms) and velocity (in meters per second) as arguments. The method should return the amount of kinetic energy that the object has.arrow_forwardShape1. Shape =5 will make the shape control appears as a rectangle O square O oval O rounded square Oarrow_forwardTrue or False : You can cause a control to be skipped in the tab order by setting its TabPosition property to False.arrow_forward
- True or False Label controls are useful for displaying output while an application is running.arrow_forwardCarpet Calculator The Westfield Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms. To calculate the price, you multiply the area of the floor (width times length) by the price per square foot of carpet. For example, the area of floor that is 12 feet long and 10 feet wide is 120 square feet. To cover that floor with carpet that costs $8 per square foot would cost $960. First, you should create a class named RoomDimension that has two fields: one for the length of the room and one for the width. The RoomDimension class should have a method that returns the area of the room. (The area of the room is the room’s length multiplied by the room’s width.) Next you should create a RoomCarpet class that has a RoomDimension object as a field. It should also have a field for the cost of the carpet per square foot. The RoomCarpet class should have a method that returns the total cost of the carpet. Figure 8-20 is a UML…arrow_forwardTrue or False : Radio buttons that are placed inside a group box are treated as one group, separate and distinct from any other groups of radio buttons.arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage