What is returned by the call greeting(12) ? def greeting(time): if time < 12: return "Good Morning" elif time < 17: return "Good Afternoon" elif time < 22: return "Good Evening" else: return "Good Night"
Q: The scope of a is the body of its method. O a. default O b. parameter O. class d. static
A: default :- It can be access only within the package. It cannot be accessed from outside the…
Q: Question No 8. Analyze the picture below and write appropriate code for it. Also Add following…
A: As per our company guidelines I am solving the first question. Please repost the other. Explanation:…
Q: def foo(arg): if isinstance (arg, -): 11 oops return 'yeah' else : oops yeah return 'oops' 12 print…
A: Here, Code is given.
Q: After lunch let's go out for a coffee. .9 (after) pronoun O nrenosition
A: A preposition is a word or gathering of words utilized before a noun, pronoun, or noun expression to…
Q: void change( int a[]) , the compiler converts the parameter to: Select one: a. int *const a b. int…
A: The compiler changes void change(int a[]) silently to void change(int *const a) at the time of…
Q: 6.17 LAB: Max magnitude Write a method maxMagnitude() with two integer input parameters that…
A: Java is programming language that can be used for the creation of the applications for the different…
Q: // TODO validity checking for all other constructor arguments this.name = null; this.lines = null;…
A: The answer is given below.
Q: public Account(String name) - Constructor: create an account with the given name and initial balance…
A: In Java, classes are collections of variables and functions that operate on those variables. The…
Q: I have problem in java 2 code: lease.setApartmentNumber(sc.nextLine()); melt:String cannot be…
A: Scanner class is used to accept input from user nextLine() will return the input in string format…
Q: Q2)Write a program that asks the user to type two numbers x, y and an arithmetic symbol s. Depending…
A: The Java code is given below:
Q: The WinMain (starting) method is responsible for at least three tasks.
A: Introduction: The WinMain (startup) process performs the following tasks: Get a grip on the current…
Q: In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the…
A: A C++ program to compute the area and perimeter of a rectangle using class structure.
Q: T/F 3) The parameter (String[ ] variable) is used in a Java key method such that a user may run the…
A: Below is the correct answer:
Q: Can not use "and" or "or" in java Language Write the function parrotTrouble. * * We have a loud…
A: PROGRAM STRUCTURE: Import the required package. Start the definition of the public class. Write the…
Q: Write an application that simulates coin tossing inside of C#. Let the application toss a coin each…
A: simulates coin tossing inside of C#. Let the application toss a coin each time the user chooses the…
Q: C# Question Write a statement that declares a variable called even and assigns it to the value…
A: Given: C# Question Write a statement that declares a variable called even and assigns it to the…
Q: q1) provide commneted code for each line of code
A: I have given the whole code with proper comments so that you can understand it well. Hope it will…
Q: 1.Using pseudocode, a method that will add two numbers, and return the sum to the calling function.…
A: The, code has given below:
Q: Mad Libs is a game where the player selects words based on part of speech that are then used to fill…
A: In the given code below Declare the variable holder as a string. Declare the List name input of the…
Q: ify your program so every data entry statement uses a TryParse() method to ensure that each piece of…
A: It is defined as a powerful general-purpose programming language. It is used to develop desktop and…
Q: class Duration: def __init__(self, hours, minutes): self.hours = hours…
A: Given:- WHAT IS THE OUTPUT? class Duration: def __init__(self, hours, minutes): self.hours…
Q: It is used to access the instance variables shadowed by the parameters. Select one: O a. accessor…
A: Question 1: The shadowed instance variable can be accessed using the this keyword. The this…
Q: b. Weight c. Height 2. Compute the BMI of that individual 3. Make the following decisions if:…
A: Define packages java.util and java.lang for i/o operations and fundamental classes respectively…
Q: Part B-The Constructor and Method getVowels() (30 – 40 minutes) 1. Driver: Complete the constructor.…
A: Java code to find the vowels present in a given string
Q: Complete the following code. Make sure to complete the code in such a way that doesn't invalidate…
A: The answer is given below:-
Q: class A(int x;public: A(){x=0;}void set(int x1){x=x1;)int get0freturn xl}a1(10)
A: class A{int x; public:A() {x=0; } void set(int x1) { x=x1; }int get(){return x;}}a1(10) a. It has…
Q: Write a program that works out the amount a person has to pay for parking in a car park in a tourist…
A: The program is to calculate parking charges. If they say they are disabled, they are told it is…
Q: ++ in visual studio: Implement it completely with copy constructor, overloaded assignment operator…
A: C++ language is a direct descendant of C programming language with additional features such as type…
Q: a Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: The given parts are related to Java packages (in-built) calendar and TimeZone which are used to get…
Q: * ?How many times hello is printed class Book{ public: Book () { cout<<"hello"<<endl; -Book () {…
A: We are given a C++ code and asked to check that how many times 'hello' is printed. I have provided…
Q: T/F 2) The following method lacks a base case. public int noBaseCase(int x) { if(x > 0) return…
A: Given that, The following method lacks a base case.public int noBaseCase(int x){if(x > 0)return…
Q: What's wrong, if anything, with the following code? class Kitchen { private: double kit_sq_ft;…
A: We need to find the problem(s) with the given code.
Q: 8 Write a application that recites a usual of numbers, and then bargains and designs the amount of…
A: Write a application that recites a usual of numbers, and then bargains and designs the amount of the…
Q: Problem: Min Method (Return the Smaller Number) Create a method GetMin(int a, int b), which returns…
A: Answer :-
Q: field has access that is somewhere between public and private. static O final O package Oprotected
A: GIVEN:
Q: 5. Add a firstname parameter of type String to myMethod, and output "Azeneth Garcia". static void…
A: Function Parameter: The function parameter includes the data type and the variable name. The data…
Q: True or FalseA value-returning method must contain a return statement.
A: Value-returning method: The value-returning method performs the task and does not terminate. The…
Q: Note: The code is written you can just tell the explanation what is happening in the code Explain in…
A: The program is for getting next prime number. The explanation of the following code is given by:…
Q: public static int bar (int number) { while (number > -3) { if (number > 5) { System.out.print…
A: Here in the function foo(), the value of the number is 9. Now in the function, it prints the SE115…
Q: Write an if-else statement for the following: If userTickets is greater than 8, execute awardPoints…
A: Hey, thank you for your question. To solve this problem, we can add a small coding snippet of…
Q: Find the error(s) in the following code snippet and explain how to correct it (them): 1 class…
A: The function prototype of getIncrementedData is : int getIncrementedData() const {} which makes is…
Q: basic java please Write a method called findTip that finds the value of a meal as a double…
A: In this code, a function named findTip is called in the main function and the tip is added to the…
Q: C# Write a program named TestScoreList that accepts eight int values representing student test…
A: using System;using static System.Console;class TestScoreList{ static void Main() {…
Q: Write an enum type TrafficLight, whose constants (RED, GREEN, YELLOW) take one parameter the…
A: Java used to answer this question
Q: JAVA CODE Write a program that quizzes the user on the names of the capital cities for all the…
A: Code snippet:
Q: Solve these test suites any way you can please, thank you! Needs at least an object and a default…
A: Basically, a weekData scenario is implemented in which the date is stored along with the information…
Q: Exercise 4 - Another Dice Game In this game, the player begins with a score of 1000. The player is…
A: The program is implemented in java using object oriented approach. We have a class HighAndLow. The…
Q: Craps is a single player dice game, that proceeds as follows: 1. the player rolls 2 six-sided dice…
A: Code: The python program is given by import random #function to calculate the sum of 2…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Correct answer will be appreciated.else downvoted.Customer c1 = new Customer("user", "pass"); c1.setPassword("changeme"); Customer c1 = new Customer("user","pass"); c1.password("changeme"); Customer c1 = new Customer("user", "pass"); c1.password = c1.setPassword("changeme"); Customer c1 = new Customer("user","pass"); c1.password = "changeme";Note:- No need existing Answers it's wrong if you know 100% sure thn answer if any get existing or wrong answers i will downvote
- v Question Completion Status: A Moving to another question will save this response. Question 25 Which of the following propositions is tautology? O (p v q)-q O pv (q-p) O pv (p-q) O p-q A Moving to another question will save this response.- Answer the following question by True or False: 1 > 2 OR 1 == 2 - Answer the following question by True or False: 2 > 2 OR 1 <= 2Answer asap. Wrong answer would downvoted.
- 56. A: SELECT CUSTNAME FROM CUSTOMER WHERE HQCITY IN (‘Atlanta’, ‘Chicago’, ‘Washington’); B: SELECT* FROM CUSTOMER WHERE HQCITY = ‘Atlanta’ OR HQCITY=‘Chicago’ AND HQCITY=‘Washington’; C: SELECT* FROM CUSTOMER WHERE HQCITY IN (‘Atlanta; ‘Chicago’, ‘Washington’; D: SELECT CUSTNAME FROM CUSTOMER WHERE HQCITY =‘Atlanta’ AND HQCITY = ‘Chicago’ AND HQCITY=‘Washington’;9 = ; Y= 5 50 18 100 81 Cul culate, Loss,L= mse (7,9) Note: mse = mean squane ennoto 对5 经Problem 2 Concert Tickets 8 points There are three tickets for a concert. The VIP tickets cost $120, premium tickets cost $80, and regular tickets cost $40. Prompt the user how many tickets of each category he would like. Then print an invoice with overview of the order and total price. Include a sales tax of 9.25%. How many tic kets would you like to order? VIP Tickets ($120): 0 Premium Tickets ($80) : 4 Regular Tickets ($40): 2 Invoice: $120 x 0= $ 0.00 $ 80 X 4 = $320.00 $ 40 x 2 = $ 80.00 9.25% $ 37.00 VIP: Premium: Regular: Sales Tax: Total Price: $437.00
- The most important rule when assigning wherein the assignment operation always takes place from right to left, and never the other way. Answer:Q7:The electricity accounts of residents in a very small town are calculated as follows: if 500 units or less are used the cost is 2 cents per unit; > if more than 500, but not more than 1000 units are used, the cost is $10 for the first 500 units, and then 5 cents for every unit in excess of 500; > if more than 1000 units are used, the cost is $35 for the first 1000 units plus 10 cents for every unit in excess of 1000; in addition, a basic service fee of $5 is charged, no matter how much electricity is used. Q8:Write a program which enters the following five consumptions into a vector, and uses a for loop to calculate and display the total charge for each one: 200, 500, 700, 1000, 1500. (Answers: $9 $15, $25, $40, $90)P:X B son.com/products/1 PORFbaokshelf. 13. Book Club Points Serendipity Booksellers has a book dub that awards points to its customers based on the number of books purchased cach month. The points are awarded as follows: If a customer purchases O books, he or she carns O points. • If a customer purchases I book, he or she carns 5 points. • If a customer purchases 2 books, he or she camN 15 points. • If a customer purchases 3 books, he of she carns B0 points. • If a customer purchases 4 or pore books, he or she carns 60 points, Write a program that asks the User ro ater the number of books he or she has pur- chased this month then dissays the runber oi points awarded. 14. Bank Charges A bank charges S10 per month plus Exe following check fees for a commercial checking account: S.10 cach for fewer