The Item class contains a Public method named GetDiscount. The method is a function. An application instantiates an Item object and assigns it to a variable named cellPhone. Which of the following can be used by the application to invoke the GetDiscount method? a. dblDiscount = Item.GetDiscount b. dblDiscount = cellPhone.GetDiscount c. dblDiscount = GetDiscount.cellPhone d. cellPhone.GetDiscount
Q: Create a class named Eggs. Its main() method holds an integer variable named numberOfEggs to which…
A: Code import java.util.Scanner;public class Eggs { //method to print the eggs in dozen static int…
Q: 5O Design -private int data field named id for the account Edefault a) private double data field…
A: The answer is given below:-
Q: Make use of C# in Visual Studio. The below form will represent the main form from which the user…
A: In the given question we need to create a viod method for each button and name them as follow :…
Q: The Purchase class contains a ReadOnly property named Tax. The property is associated with the…
A: Explanation: From the given details, the Tax property is a ReadOnly property. Tax is associated…
Q: Create a class name Taxpayer. Data fields for Taxpayer include yearly gross income and Social…
A: Let's understand step by step : 1. Create a class named TAxpayer which is two integer variables…
Q: handler: This method retrieves whatever the user has typed into the upper entry, converts it into an…
A: import tkinter as tkfrom tkinter import messageboxdef getAge(years): if years <= 0:…
Q: An application instantiates an Animal object and assigns it to the cat variable. Which of the…
A: Calling function: A function procedure is called with the help of a procedure name, followed by the…
Q: The Inventory class contains a Private variable named strId. The variable is associated with the…
A: Explanation: Here, the Inventory class contains a private variable that is “strId”. But one can…
Q: Microsoft Visual C#, 7th edition. chapter 11, Programming exercise 11-3 Instructions: Write the…
A: Algorithm: Start Read a number If number is greater than or equal to 0, print Math.sqrt(number)…
Q: The college that you attend requires an application that will print out a Course Report. You are…
A: import java.util.*;import java.lang.*;import java.io.*; class main{ public static void main(String…
Q: In the btnCalc_Click procedure, change the For…Next statement that controls the years to a Do…Loop…
A: Answer: Visual Studio Source Code: Method 1: Form1.vb: Option Explicit OnOption Strict OnOption…
Q: (a) Create a class named EventSite that contains three instance variables – siteNo (int),…
A: <!DOCTYPE html><html><body> &nbsp;Site Number: <input type="text"…
Q: Microsoft Visual C# 7th edition, programming exercise 11-3 Instructions: Write the program…
A: Please give positive ratings for my efforts. Thanks. PROGRAM using System; class FindSquareRoot…
Q: Write a Python program (Console and GUI) that prompts the user to enter a password and displays…
A: The elif keyword is pythons way of saying if the previous conditions were not true then try this…
Q: Create an application named Tables that computes the price of a table and chairs and whose Main()…
A: Procedure: StartRead no.of chairs nRead woos sort p,m or oif wood sort is "p" , then total=…
Q: Create a class named InchesToFeet. Its Main()method holds an integer variable named inches to which…
A: class InchesToFeet { static voidMain(string[] args) {…
Q: The Financial officer at RGI wants you to develop an application that will evaluate the company’s…
A: Public Class RGI Private Sub Display_Click(sender As Object, e As EventArgs) Handles…
Q: library and name it FineForOverdueBooks. TheMain() method asks the user to input the number of books…
A: First, we need to read the number of books and number of days used and then call the DisplayFine()…
Q: In Chapter 4, you created a Die application that randomly “throws” five dice for the computer and…
A: public class FiveDice2 { /** * Application that randomly "throws" five dice for the computer and…
Q: Microsoft Visual C# 7th edition. In Chapter 7, you modified the GreenvilleRevenue program to include…
A: The Answer is
Q: Microsoft Visual C# 7th edition. In Chapter 7, you modified the GreenvilleRevenue program to include…
A: Below find the solution using static System.Console; class GreenvilleRevenue{static void…
Q: I CANT GET IT RIGHT Create a class named Purchase. Each Purchase contains an invoice number,…
A: set() method is used to set values of instance variables. set method takes values from main call.…
Q: Please help me with the following:
A: - We need to highlight the correct return value from the function to main with the switch case. -…
Q: C# Question Create a desktop application that allows the user to enter a maximum integer. The…
A: Steps to create a C# Windows Form Application Open visual Studion C# Windows Application Create a…
Q: Your task is to create a BankAccount class. BankAccount Class name Attributes _balance float _pin…
A: BankAccount is a class that contains the function, init that generates random pin number in a range…
Q: OURSE NAME STUDENT NUMBERS LECTURER DISD Diploma in Software Development 35 Mr Jones DIWD Diploma in…
A: The college that you attend requires an application that will print out a Course Report. You…
Q: Create a class named Eggs. It’s main () method holds an integer variable named numberOfEggs to which…
A: Algorithm: 1. Start. 2. Read number of eggs as numberOfEggs. 3. Call method to calculate and print…
Q: // Question 4: // 20 Points // Declare an integer variable named "variableQ4" with an initial value…
A: Answer - Given method - private void btnQ4_Click(object sender, EventArgs e){ } Here from the name…
Q: use only C# programming language You invoke a method by its name followed by a pair of brackets and…
A: Coded using C#.
Q: The Item class contains a Private variable named _dblCost. The variable is associated with the…
A: The class name is item and the private variable name is _dblCost. The public variable which is used…
Q: design a Club class and use it to create an application that simulates a soccer league tournament.…
A: Code with outputs in the following steps:
Q: In the game Flick Fleet, players undertake space combat by flicking a six sided die at other ships.…
A: class SpaceShip: def __init__(self,type): self.type=type #get type of ship def…
Q: Create an application named Numbers whose main() method holds two integer variables. Assign values…
A: PROGRAM INTRODUCTION: Use the required namespaces. Start the definition of the class to store all…
Q: HappyTunes is an application for downloading music files. Each time a file is purchased, a…
A: The ask is to build an application doing the following: - Create a transaction record for each file…
Q: Focus on classes, objects, methods and good programming style Your task is to create a BankAccount…
A: The program is: #include<iostream>#include<stdio.h>#include<string.h>using…
Q: A private int data field named id for the account. A private float data field named balance for the…
A: Step 1: Declare class Account with a constructor that initializes the fields accountId, balance and…
Q: Focus on classes, objects, methods and good programming style Your task is to create a BankAccount…
A: import random #to get random intergerclass BankAccount: #define class def…
Q: Design an application (submit pseudocode) that declares an array of 12 BaseBallGame objects. Prompt…
A: The answer is given below.
Q: Create an application named SalesTransactionDemo that declares several SalesTransaction objects and…
A: using System;using System.Globalization;class SalesTransaction { public string Name;…
Q: Create a class called Account that contains: • An int data field named id that stores the accounts…
A: Since no programming language is mentioned, I am using java. Code: import java.util.Date;class…
Q: Create a product_class.php script that includes a Product class with o parameters: product name,…
A: Required Php class provided below
Q: Course information are created using a class 'Course, the class contains: • Course code • Course…
A: Since you have not mentioned the language so i am giving answer in c++
Q: Define a method named orderOfAppearance() that takes the name of a role as an argument and returns…
A: The concept is to loop through each element of the roles array in the movie object and then check…
Q: The college that you attend requires an application that will print out a Course Report. You are…
A: JTextField is a lightweight element that permits the editing of a simple one line of text. JLabel…
Q: java code Fields and methods given Book Fields String title String author int copies Methods…
A: ALGORITHM:- 1. Declare the given class. 2. Add the methods in it as defined. 3. Print the results.…
Q: Create a class named Eggs. It’s main () method holds an integer variable named numberOfEggs to which…
A: As per the given question, we need the following : 1. Class named Eggs. 2. Input numberOfEggs from…
Q: Using Java language Bank Accounts Management Project Description The objective of this project is to…
A: Create Java program for Bank management project .Based on given scenarios..
Q: Make use of C# in Visual Studio. The below form will represent the main form from which the user…
A: for clicking on button ,button manager Addresses is clicked the form managed addresses should be…
Q: Microsoft Visual C# 7th edition. In Chapter 7, you modified the GreenvilleRevenue program to…
A: Program in C#: using static System.Console; class GreenvilleRevenue{ static void Main() {…
Q: C# Using the Visual Studio Developer Command Prompt, create the application named Tables, as…
A: Algorithm: Start Read no.of chairs n Read woos type p,m or o if wood type is "p" , then total=…
The Item class contains a Public method named GetDiscount. The method is a
function. An application instantiates an Item object and assigns it to a variable named
cellPhone. Which of the following can be used by the application to invoke the
GetDiscount method?
a. dblDiscount = Item.GetDiscount
b. dblDiscount = cellPhone.GetDiscount
c. dblDiscount = GetDiscount.cellPhone
d. cellPhone.GetDiscount
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- 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.The Inventory class contains a Private variable named strId. The variable is associated with the Public ItemId property. An application instantiates an Inventory object and assigns it to a variable named onHand. Which of the following can be used by the application to assign the string "XG45 to the strId variable? a. onHand.ItemId = "XG45" b. ItemId.strId = "XG45" c. onHand.strId = "XG45" d. ItemId.strId = "XG45"The below form will represent the main form from which the user will navigate to the other forms. Meaning each button should be linked to the appropriate form. E.g. If button Manage Addresses is clicked the form managed addresses should be displayed. The Exit button should successfully terminate the program. Create a void method for each button and name them as follow: LinkToAddresses (), LinkToCustomers (), LinkToDrivers (), LinkToStatus (), and LinkToFreight (). The methods should be called under the appropriate button. For the exit button create a void method named AppExit () this should terminate the program.
- An application instantiates an Animal object and assigns it to the cat variable. Which of the following stores the value returned by the Animal class’s GetName method in the strName variable?a. strName = Animal.GetNameb. strName = cat.GetNamec. strName = Animal.GetName.catd. none of the aboveThe Item class contains a Private variable named _dblCost. The variable is associated with the Public Cost property. An application instantiates an Item object and assigns it to a variable named phone. Which of the following can be used by the application to assign the number 150.65 to the _dblCost variable?a. phone.Cost = 150.65b. item.Cost = 150.65c. phone._dblCost = 150.65d. item._dblCost = 150.65The Inventory class contains a Private variable named strId. The variable is associated with the Public ItemId property. An application instantiates an Inventory object and assigns it to a variable named onHand. Which of the following can be used by the application to assign the string “XG45” to the strId variable? a. onHand.ItemId = "XG45" b. ItemId.strId = "XG45" c. onHand.strId = "XG45" d. ItemId.strId = "XG45"
- Retail Price Calculator Create an application that lets the user enter an item's wholesale cost and its markup percentage. It should then display the items retail price. For example: If an item's wholesale cost is $5.00 and its markup percentage is 100 percent, then the item's retail price is $10. If an item's wholesale cost is $5.00 and its markup percentage is 50 percent, then the item's retail price is $7.50. The program should have a method named CalculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item. In addition, there should be the name of the Wholesale Company displayed (be creative). If the cost is over $500, display a $20 discount on the retail price. For example: If an item's wholesale cost is $600.00 and its markup percentage is 100 percent, then the item's retail price is $1,180. ( Markup = $600 * 100% = 600 Retail Price = $600 + $600 - $20 (wholesale cost + markup - discount)Retail Price Calculator Create an application that lets the user enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is $5.00 and its markup percentage is 100 percent, then the item’s retail price is $10.00. • If an item’s wholesale cost is $5.00 and its markup percentage is 50 percent, then the item’s retail price is $7.50. The program should have a method named CalculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item.Create an application named Tables that computes the price of a table and chairs and whose Main() method calls the following methods: A method to accept the number of chairs to go with the table as input from the keyboard. This method returns the number of chairs to the Main() method. A method to accept as input and return the type of wood: p for pine, m for maple, and o or oak (use a loop to ensure only one of these letters is entered). A method that accepts the number of chairs and wood type, and calculates the total cost of the desk based on the prices below. This method returns the total cost to the Main() method. Pine tables are $250. Maple tables are $300. All other wood types are $350. There will be an additional cost of $50 per chair. A minimum of 2 chair must be ordered (use a loop to ensure a value of 2 or more is entered.) A final method to display all the details and the final price. The image below shows a sample run of the program.
- The dealership sells different types of vehicles: cars and trucks. All vehicles have a make, model, and year. However, a truck has an additional attribute - maximum load capacity (in pounds). Create a class named Vehicle with the following attributes: make, model, and year. Include the following methods: display_info(): This method should print all these details in a formatted string. get_age(): This method should calculate and return the age of the vehicle based on the current year. Tip: You will need to import functionality from the datetime module to do this. Create a class named Truck that inherits from the Vehicle class. This class should have an additional attribute, max_load, which represents the maximum load capacity of the truck. Include the following methods: display_info(): This method should override the method from Vehicle, and when it's called, it should display the truck's make, model, year, and maximum load capacity. can_carry(weight): This method should take a…Name Formatter Create an application that lets the user enter the following pieces of data: • The user’s first name • The user’s middle name • The user’s last name • The user’s preferred title (Mr., Mrs., Ms., Dr., etc.) Assume the user has entered the following data: • First name: Kelly • Middle name: Jane • Last name: Smith • Title: Ms. The application should have buttons that display the user’s name formatted in the following ways: Ms. Kelly Jane Smith Kelly Jane Smith Kelly Smith Smith, Kelly Jane, Ms. Smith, Kelly Jane Smith, Kellyjava code Fields and methods given Book Fields String title String author int copies Methods Book(String title,String author,int copies) Book() getTitle()String setTitle(String title) getCopies()int setCopies(int copies) toString Question create a method called destroyCopy which will decrement the copies field create a method called newCopy which will increment the copies field create method called upSize which will receive through a number representing the percentage in which the library is going to expand,this method should then return the number of copies that need to be purchased to adhire to the upsizing. put a comment in the line above these three methods destroCopy,newCopy and upsize.The comment should read Unused method.