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.Class Assignment This object represents a school assignment that a student will work on. __init__(self, name: str, difficulty: float): """ Constructs an assignment with the given assignment name and a float that indicates the level of difficulty of the assignment. :param name: The name of the assignment :param difficulty: The level of difficulty of the assignment """ get_name(self) -> str: """ Returns the name of the assignment as specified in the constructor. :return: The assignment name """ get_difficulty(self) -> str: """ Returns the level of difficulty of the assignment as specified in the constructor. :return: The assignment level """ __str__(self) -> str: """ Returns the name of the assignment as specified in the constructor. :return: The assignment name """ExecutorService method "execute": obtains an ExecutorService that creates new threds as they are needed notifies the ExecutorService to stop accepting new tasks, but continues executing taskst that have alredy been submitted All of the above None of the above
- Instructions: IMPORTANT: This is a continuation of the previous part of the project and assumes that you are starting with code that fulfills all requirements from that part of the project. Modify the your code from the previous part of the project to make it modular. In addition to the main method, your code must include the following static methods: Method 1 - displayTitle A method that creates a String object in memory to hold the text “Computer Hardware Graphics Quality Recommendation Tool” and displays it Method 2 – getResolutionString A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution. The method should return the appropriate String representation of the monitor resolution. For example, if the method is passed an integer value of 1, it should return a String with a value of “1280 x 720”. (See Step 4 of Project 1) Method 3 – getMultiplierValue A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution and…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 operator used to create objects is = += new create
- For 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.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.C# Using the Visual Studio Developer Command Prompt, create the application named Tables, as described below. Don't forget to add comments, including your name, name of program, description, and date at the beginning. Instructions: 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 drawers 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…
- Using C# in Microsoft Visual Studio create an application that displays the total for a customer’s visit . The application should have the following value-returning methods: OilLubeCharges —Returns the total charges for an oil change and/or a lube job, if any. FlushCharges —Returns the total charges for a radiator flush and/or a transmission flush, if any. MiscCharges —Returns the total charges for an inspection, muf fler replacement, and/or a tire rotation, if any. OtherCharges —Returns the total charges for other services (parts and labor), if any. TaxCharges —Returns the amount of sales tax, if any. Sales tax is 6% and is charged only on parts. If the customer purchases services only, no sales tax is charged. TotalCharges —Returns the total charges. The application should have the following void methods, called when the user clicks the Clear button: ClearOilLube —Clears the check boxes for oil change and lube job. ClearFlushes —Clears the check boxes for radiator flush and…Methods are functions which are declared inside a class. True False//Global Constant Global Constant TECH_FEE = 0.05 Module main () //Local Variable Declare Integer studentID, ClassTitles , hoursWorked, numofClass, techFee, totalBill classCost=$150 //Get Student ID Call getStudentID () //Get Class Titles Call getCLassTitles () End Module Module getStudentID () Display "Please enter your Student ID:" Input studentID End Module Module getClassTitles () //Get number of class student wants to add and calculate the total bill Display "One class will be free if you add three classes." Display "How many classes do you want to take? (Limit 3)" Input numofClass if numofClass > 3 then Display "Error: Maximum of 3 Class Allowed" end if while numofClass <= 3 if numofClass == 1 then Display "Please enter the Class Title" Input class1 Set classCost = 150 * numofClass Set techFee = classCost * TECH_FEE Set totalBill = classCost +…