on that receives the name of the student in a class and then asks
Q: It has methods: public String getName() which gets the name public void setName(String newName)…
A: public class Hal9000 { private String name; public Hal9000(String name) { this.name = name;…
Q: How to writte a code as a class that inherits from Tk and the application must resize gracefully ?…
A: Find the code given as below :
Q: Code for Python: Create a program that prompts the user for numbers greater than 1, and terminates…
A: Code for Python: Create a program that prompts the user for numbers greater than 1, andterminates…
Q: 4. Write a program to create a class named 'height', containing variable 'feet', 'inch'. Create two…
A: Here I have created the class named height. In this class, I have created the data members named…
Q: Choose which of the options below should replace ### in this Python code? class Actor: def ###…
A: Here, Code is given.
Q: Write a class that accepts numbers and returns the average of the numbers. Design the class as a…
A: Here our task is to write a class that accepts numbers and returns the average of the numbers. Since…
Q: Given that Student is a dass, how many reference variables and objec following code: Student…
A: Correct Answer for the above given code is Option ("D") i.e...Two reference variables and two…
Q: calculate(self) A property method that evaluates the infix expression saved in self.__expr. First…
A: class Stack: def __init__(self): self.stack = [] def pop(self): if…
Q: Imagine a publishing company that markets both book and audiocassette versions of its works. Create…
A: Given: Imagine a publishing company that markets both book and audiocassette versions of its works.…
Q: Create a class calculate that uses two separate functions:-a function to multiply two float numbers…
A: INLINE FUNCTION : inline function is a function which gets expanded in line whenever it is called,…
Q: Imagine some publishing company that markets both book and audio cassette versions of its works.…
A: #include<iostream> #include<stdio.h> #include<stdlib.h> #define MAX 100…
Q: Full form of DVI is _______________ Interface.
A: This fill in the blank question is related to computer hardware.
Q: Suppose that you are in charge of customer service for a certain business. As phone calls come in,…
A: File name: “ServiceRequests.java” import java.util.Scanner; import java.util.*; import java.io.*;…
Q: Create a class that models a store. You store has some number of products, for example cookies,…
A: 1. Because we only get 2:30 hours to solve, I am unable to explain the code but I have added the…
Q: Given the class definitions above, what is printed to the console when the following lines of code…
A: Given Code is using Inheritance in Java Inheritance: Classes have the capability to Derive…
Q: odify class date Do full code if date. H date. Cpp and main. Cpp. Attach screenshot of output
A: As mentioned in the question I have written the date. H ,date. Cpp and main. Cpp. code.
Q: Identify the errors in the following program segment and describe how to correct them. You can…
A: Given: FloatProperty f=new FloatProperty(1.0); FloatProperty f2=new FloatProperty(2.0);…
Q: Write a program that would print the information (name, year of joining, salary, address) of three…
A: Code: class Employee{ private String name, address; private int year, salary; public…
Q: Suppose that you are in charge of customer service for a certain business. As phone calls come in,…
A: Answer: The Main program have all the methods to test the methods in the ServiceRequests class…
Q: Implement the design of the Chillox and Customer classes so that the following code generates the…
A: The program is menu driven which has different which will display for ordering. The system will…
Q: (a) Suppose Circle is a class. Now draw the memory allocation of the following four statements.…
A: Here, a Circle object with the name c1 is declared. Then, c1 is transferred to another circle (c2)…
Q: AVA public interface Interf1 { public void repeat(String s1); } Write a program to…
A: interface interf1 { public void repeat(String s1); }public class Main{ public static void…
Q: Show the printout of the following program:class A:def _ _new_ _(self):print("A's _ _new_ _()…
A: The given code defines two classes named "A" and "B". Class "A" defines the function "new()" and…
Q: TASK Write a program that grades students' exam. The exam has 20 multiple choice questions. Here are…
A: class StudentExam{ private: static char key[]; char ans[21],missed[21];…
Q: Create two classes manager and employee which store (code, name, salary, department, and city).find:…
A: Class is a user-defined data type that encapsulates the data members and member functions/methods as…
Q: What is the output of the following code? public class Main{ Main(){ System.out.println("Final…
A: Code: public class Main{ Main() { System.out.println("Final Exam"); } public…
Q: Question No. 2: Write a python program that takes input values as integer, checks the number…
A: Given: Concatenate the integer and string values and print as a string. Create another class…
Q: OBJECT-ORIENTED PROGRAMMING. CS 102 Wednesday, 6 October, 2021 1. Write a Java program that creates…
A: code : - //import Scanner class for input import java.util.Scanner; public class Main{ public…
Q: Imagine some publishing company that markets both book and audio cassette versions of its works.…
A: code in c++
Q: Q3 Normally in all engineering colleges, there will be a long vacation after every even semester and…
A: print("Which semester are you in right now?")sem = int(input())if sem % 2 == 0: print("At the end…
Q: The Hal9000 has one constructor which takes a String parameter of a name of the crew member it is…
A: Let us frame the complete coding step by step as mentioned below : Step 1: Declare the class Hal9000…
Q: PYTHON PROGRAMMING CODE: class Dog: def __init__(self, name, breed, age): self.name = name…
A: The 1st line of the code creates a class named Dog. A class is a group of objects which have common…
Q: 3: Write a Python script to ask someone to input their first GIS class name, the second GIS class…
A: Here we are going to write a python program to check no input and if so return a statement. We have…
Q: Create a python using a Class called Employee 2. Use the init function to collect the employee…
A: Note: Follow proper indentation. Key Points: To create a class, "class" keyword is used. Every…
Q: Please help me with this in Python In python Create a class Right Triangle to compute its area and…
A: class poly: def __init__(self, a, b, c): self.a = float(a) self.b = float(b)…
Q: reate a Date class to hold day, month and year in integer values. Write setDate to set the date and…
A: Required:
Q: Write a Shopping Cart class to implement a shopping cart that you often find on websites where you…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Please include doctring, and write only in python: First, write a class named Movie that has four…
A: A class is a group of objects which have common properties. An object is an instance of a class. It…
Q: v) Write a public instance method addProgrammeItem() that takes a Music argument representing a…
A: Program Instrcution The function add accepts an object of the class Fraction ass a parameter. A…
Q: In C++ please and in a method I can copy and paste. You are to create a class called Horse. You…
A: //-------------- animal.h ------------#ifndef __ANIMAL_H#define…
Q: First, implement a python class called Student. This class should store 2 variables, name and grade.…
A: Program Plan: Create a Student class as follows: Define a constructor that initializes name and…
Q: The clone method return type is:
A: CLONE METHOD - Clone is a type of a function or a method that is mainly used for the creation of…
Q: a) What is blank or uninitialized final variable? How to initialize blank final variable? b) What is…
A:
Q: The instruction super( ); does which of the following? a) calls the method super as defined in the…
A: Super is a reference keyword which is used to reference a base class consture.it is also use to…
Q: First, write a class named Movie that has four data members: title, genre, director, and year. It…
A: Here I have created the classes as per the question. In each class, I have defined the method to get…
Q: a. Which class is used to deal with the string subscript out of range. b. Which class is used when a…
A: a) out_of_range class is used to deal with the string subscript out of range.
Q: Write a Bank Account class in python to manage the account of the users. A user can deposit (add…
A: Find an implementation below.
Q: Define classes for square, rectangle, and circle with appropriate attributes, class variables, and…
A: Program Code: def cal_area(shape): if shape==1: s = int(input("Enter square's side length:…
Q: 8- Create an instance of the following class and call its methods. class Exam int grade; public:…
A: #include <iostream>using namespace std;class Exam{ int grade;public: void seta(int b){grade =…
9 - Create a class in python that receives the name of the student in a class and then asks for the name of each student's grade.
Step by step
Solved in 2 steps
- Python question Application: Python Fragment Formulation (Q1 – Q4) In this group of questions you are asked to produce short pieces of Python code. When you are asked to "write a Python expression" to complete a task, you can either give the expression in one line or break down the task into several lines. The last expression you write must represent the required task. Question 1 (Reduce parentheses) Give an equivalent version of this expression by removing as many redundant parentheses as possible, without expanding the brackets or simplifying. (x**(2**y))+(y*((z+x)**3)) Question 2 (Translate arithmetic concept into Python) You are given a list of numbers, named numbers, containing 3 integers. Write a python expression (one line) that evaluates to True if and only if the product of any two numbers in the given list is greater than the sum of all three numbers. Note: the product of two numbers, x and y is x*y. Question 3 (List/table access) You are given a table,…python code: There could be more than one copy of a book, and library members should be able to check-outand reserve any copy. We will call each copy of a book, a book item.Please code in python Forbidden concepts: recursion, custom classes Create a program that takes a university student’s name, their 1st parent’s income, and their second parent’s income. If the average income between the parents is $40,000 or below, then it would put them into a Tuition Grant list. If it’s above, then it would be a Full Tuition Required list. Once the university admission officer has completed inputting all the students, the program will end and print out the two lists.
- JAVA LANGUAGE Body Mass Index Version 2.0 by CodeChum Admin Recall that according to the National Heart, Lung, and Blood Institute of the National Institutes of Health, body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is used to monitor one's health by determining whether one is underweight, overweight, has normal weight or is obese. It is computed based as follows (when using standard weight in pounds and height in inches): BMI = 703 x (weight/(height2)) Furthermore, people with BMI scores that are less than 18.5 are said to be underweight. Those with scores between 18.5–24.9 (inclusive) are of normal weight. Those with scores between 25–29.9 (inclusive) are said to be overweight. And those with scores 30 or higher are obese. Input The input is composed of two positive integers representing the weight in pounds and the height in inches. 140·65 Output A single line containing two values: the computed…Python Answer Required: A Rajesh teaches a cooking class. The course is attended by NN students, numbered 11 to NN. The cook must participate in the presence before each class, i.e. call out the names of the students one by one and indicate which students are present. Each student has a first and last name. To save time, Rajesh only wants to call up students' first names. However, if there are multiple students with the same first name, the Rajesh must call out the full names (first and last names) of all those students. For any student who does not share a first name with any other student, the cook can still only call that student's first name. Help the Rajesh decide for each student whether to call that student's full name or just their first name. Input 1 1 hasan jaddouh Output hasanCode for Python: Create a program that prompts the user for numbers greater than 1, and terminates when zero is entered. The program should show everyone of the prime numbers entered and the total number of prime numbers entered by the user.Note: It must be done with classes.
- Python: Use class and pointers. ThanksArt.java In this part you will create a program Art.java that produces a recursive drawing of the design attached in the picture. Requirements Art.java must take one (1) integer command-line argument n that controls the depth of recursion. Your drawing must stay within the drawing window when n is between 1 and 7. (The autograder will not test values of n outside of this range.) You may not change the size of the drawing window (but you may change the scale). Do not add sound. Your drawing can be a geometric pattern, a random construction, or anything else that takes advantage of recursive functions. Optionally, you may use the Transform2D library you implemented in Part 1. You may also define additional geometric transforms in Art.java, such as sheer, reflect across the x- or y- axis, or rotate about an arbitrary point (as opposed to the origin). Your program must be organized into at least three separate functions, including main(). All functions except main() must be private. call…Write code.
- PLEASE CODE IN PYTHON Problem Description An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other. Input Specifications The input for the program will come from an input file in.dat, in.dat will have two lines of data, line (1) will have the first phrase and the line(2) will have the second phrase. You may assume that the input only contains upper case letters and spaces. Output Specifications The program will print out one of two statements: ”Is an anagram.” or, ”Is not an anagram.” All output will be to the screen. Sample Input CS AT WATERLOO COOL AS WET ART Output for Sample Input Is an anagram.Computer Science C# Programming Object Orientation Please use Arrays or ArrayLists where appropriate Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed). Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock. Read all the food items from the text file “Items.txt” Display all the food items available for this food truck. Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to…Write a OOP Python Program : Create a five (5) classes related to the applicants including their personal information Classes must be used in another class or in the main program Create the main program that will use the classes