details You need to create a vacuum cleaner features program: First class should be called "Vacuum", and will has: "Type": Dry or wet. • "Watt": 1000w, 600w or 300w; • "Bag": yes or no Second class, "cleaner" uses vacuum class and has: • "Brand": Name of brand. Singer, rainbow, vestel, beko. • "Cord": With or without cord. (true, false) "Colour": Grey, black, navy or red. You need to create these four different vacuum cleaner.Then please print all this information.
Q: Create a Right Triangle class that has two sides. Name your class rightTraingle. Code getter and…
A: Solution: Given,
Q: How do i solve this problem thanks. Create a class named CollegeCourse that includes the…
A: import java.util.Scanner; class CollegeCourse { public String dept; public int id; public…
Q: Create an Investment class that contains fields to hold the initial value of an investment, the…
A: Note: Programming language is missing in the question. So we will answer this program in C++…
Q: public Plane () – this is the default constructor; it assigns the following initial values to the…
A: Plane class: package pp; import java.text.DecimalFormat; public class Plane { String airline;…
Q: A square is an equilateral and equiangular polygon by default. Implement these properties of a…
A: import java.util.Scanner; public class AreaAndPerimeterOfSquare { public static void…
Q: create an automobile class for a dealership. include fields fo an ID number, model, make, color,…
A: import java.util.*; // class is created class Automobile { //declaration of variables int ID; String…
Q: Question 1 Please create an empty struct called CPlusPlus int main Question 2 Please create an empty…
A: struct CPlusPlus{ }; Explanation: The struct keyword is used for declaring a structure. Syntax:…
Q: (The MyPoint class) Design a class named MyPoint to represent a point with x- and y-coordinates. The…
A: The no-argument constructor or default constructor takes no arguments as input to the constructor…
Q: The class Name consists of 4 instance data, String title, String first, String middle, and String…
A: Q: Code the given problem
Q: calculating your maximum heart rate in beats per minute is 220 minus your age in years. Your target…
A: SOURCE CODE // NOTE : Save this code as HeartRates.java. import java.util.Scanner; // Import the…
Q: Purpose To review interfaces Directions Your task for this lab is to implement and test a class to…
A: Here I have created the class named Rating and implemented the Comparable interface. Next, in the…
Q: reate a class called Point which will have 2 co-ordinate value x & y and will be able to calculate…
A: Given question has asked to create a class called point have 2 co-ordinate value x & y and will…
Q: reate a class called Point which will have 2 co-ordinate value x & y and will be able to calculate…
A: class Point { double x,y; Point(double a,double b) { x=a;y=b; } double dist(Point ob) { return…
Q: OOP1 - Objects, Classes, and Encapsulation Create a program that has the following method and…
A: Object: An object is an individual from a class. Each object has a personality, a way of behaving,…
Q: Design a Ship class that has the following members: a. A field for the name of the ship (a string).…
A: Below is the required code in java language: // Ship.java public class Ship { // attributes…
Q: Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A, B, C, D, E"…
A: Please give positive ratings for my efforts. Thanks. ANSWER Part 1-9 : In Java, composition…
Q: Exercise - Failable Initializers Create a Computer struct with two properties, ram and…
A: Below find the solution struct Computer { var ram: Intvar yearManufactured: Int init?(ram:…
Q: can i get help with this thanks Create a class named CollegeCourse that includes the following…
A: Solution: Given, Create a class named CollegeCourse that includes the following data fields:…
Q: Create an Automobile class for a dealership. Include fields for an ID number, make, model, color,…
A: define class and declare members such as ID, make, model etc. define parameterized constructor and…
Q: Create a class Rectangle. The class has attribute length and width, each of which defaults to 1. It…
A: public class Rectangle { double length; double width; public Rectangle() { this.length = 1;…
Q: This lab will once again explain the concept of class. Please follow the instructions Create…
A: Given The answer is given below. employee.java package employee; import java.text.DecimalFormat;…
Q: Create a code the follow way: Each student object should also contain the number of earned credits.…
A:
Q: Q1) (The Cylinder class) Design a class named Cylinder The class contains: 1 Two private attributes…
A:
Q: Write the printTime method for the Time class. It takes no arguments and returns nothing. This…
A: #include<bits/stdc++.h>using namespace std;//It is 24 hour time format since no AM,PM is…
Q: Sanchez Construction Loan Co. makes loans of up to R100,000 for construction projects. There are two…
A: Answer : PROGRAM/CODE : - Loan.java import java.text.DecimalFormat; public abstract class Loan…
Q: Create a class called Point which will have 2 co-ordinate value x & y and will be able to calculate…
A: Write the C++ code as follows: Define the class Point with two data members representing coordinate…
Q: SUBJECT: OOP PROGRAMMING LANGUAGE: C++ ALSO ADD SCREENSHOTS OF OUTPUT. Write a class Distance…
A: A class is the fundamental unit of object oriented design. A class encapsulates data and operations…
Q: Assignment You work at the Computer Science 201L Library, and your boss just bought a bunch of new…
A: CPP programming language C++ is a universally useful programming language made by BS as an expansion…
Q: Define the Circle2D class that contains:
A: The UML class diagram for the class Circle2D: The diagram comprises three sections: The first…
Q: takes it's name as input (a String). Add three constructors to your Planet class: Planet(String…
A: 1- Let's focus on how JVM(Java virtual machine) works and how to call the constructor. 2- In case,…
Q: Design a Book class that holds the title, author’s name, and price of the book. Books’s constructor…
A: [Note: Since no language is mentioned, C++ is used. This code should be rewritten instead of…
Q: Write compile, and test a class that displays the first few lines of the lyrics of your favorite…
A: To compile a Java program source code file from the command line use command javac followed by the…
Q: Geometry: MyRectangle2D class) Define the MyRectangle2D class that contains: Two double data…
A: Area of rectangle = height*width Perimeter = 2*(height+width) Math.abs() method has been used to…
Q: Write a class named car that has the following fields: yearModel. The yearModel field is an int that…
A: Note: Since no programming language is mentioned, the program has been written in Java programming…
Q: Sanchez Construction Loan Co. makes loans of up to R100,000 for construction projects. There are two…
A: package loan; // Defines an interface LoanConstantspublic interface LoanConstants{ // Defines the…
Q: (Physics: acceleration) Average acceleration is defined as the change of velocity divided by the…
A: Program –
Q: A registration officer in an academic institution wants to display the Student transcript in a given…
A: Below is the required java program. Program Approach: Define a class as a student. Inside the…
Q: Certain Federal anti-money laundering laws exists that help to thwart illegal transactions and…
A: Actually, program is a executable software that runs on a computer.
Q: Create an object called Circle. Declare the following integer variables for the object Circle,…
A: Program code: File name: "Circle.java" public class Circle { //declaring instance variables int…
Q: Cargo Ships This question involves cargo ships that carry a specific number of cargo containers.…
A:
Q: Q3) You have a base class called Shape such as: #include #include using namespace std; class Shape…
A: Starting of the program is already give. Using hierarchical inheritance to derive both Rectangle and…
Q: Design a Book class that holds the title, author’s name, and price of the book. Books’s constructor…
A: Write the program as follows: Define the base class Book with the data members- title, author name,…
Q: Create an object called Circle. Declare the following integer variables for the object Circle,…
A: The required Java Code is given below: import java.util.Scanner;class Circle{ //data attributes…
Q: Little debugging help The program runs correctly but doesn't follow instructions completely.…
A: super() function is used to call constructor of parent/super class. All the class codes have been…
Q: 1- Design a class named Rectangle to represent a Rectangle. The class contains: • three variables…
A: package testrectangle; class Rectangle{ // define three fields double length, width, height;…
Q: lasses, and Encapsulation Create a program that has the following method and corresponding usage. 1.…
A: Introduction: Below java program Objects, Classes, and Encapsulation Create a program that has the…
Q: Create a deck of cards class. Internally, the deck of cards should use another class, a card class.…
A: progarm is as given below ;
Q: Question 3 Create an object called Circle. Declare the following integer variables for the object…
A: Code snippet;
Step by step
Solved in 2 steps with 1 images
- Carpet 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…(Physics: acceleration) Average acceleration is defined as the change of velocity divided by the time taken to make the change, as shown in the following formula: a = (v1 - v0) / t Here, v0 is the starting velocity in meters per second, v1 is the ending velocity in meters per second, and t is the time span in seconds. Assume v0 is 5.6, v1 is 10.5, and t is 0.5, and write the code to display the average acceleration. Class Name: Exercise01_02ExtraC++ Stars This lab exercise will practice creating objects with constructors and destructors and demonstrate when constructors and destructors are called. Star Class Create a class, Star. A Star object has two member variables: its name, and a solar radius. This class should have a constructor which takes a std::string, the name of the star, and a double, the solar radius of the star. In the constructor, the Star class should print to the terminal that the star was born. For example, if you create a Star as follows: Star my_star("Saiph", 22.2); Then the constructor should print: The star Saiph was born. In the destructor, the Star class should print to the terminal that the star was destroyed, along with the number of times the volume of the sun that that star was, formatted to two decimal places. Hint: use the following line to set the precision to 2 decimal places: std::cout << std::fixed << std::setprecision(2); For example, when my_star above has its destructor called,…
- Create an Investment class that contains fields to hold the initial value of an investment, the current value, the profit (calculated as the difference between current value and initial value), and the percent profit (the profit divided by the initial value). Include a constructor with two arguments: initial, and current values and then calculate profit, and percent profit, and a display function that displays all fields. Create a House class that includes fields for street address and square feet, a constructor that requires values for both fields, and a display function. Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes a constructor (in order to pass arguments to its parent constructors) and a display function that calls the display functions of the parents. Write a main() function that declares a HouseThatIsAnInvestment and displays its values.please use c# (Rectangle Class) Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle. It has properties for both length and width. The set accessors should verify that length and width are each floating-point numbers greater than 0.0 and less than 20.0. Write an app to test class Rectangle. explain each step wellcreate an automobile class for a dealership. include fields fo an ID number, model, make, color, year and miles per gallon. include get and set methods for each field. do not allow the ID to be negative or more than 9999; if it is, set the ID to 0. do not allow the year to be earlier than 2005 or later than 2019, if it is, set year to 0. do not allow the miles per gallon to be less than 10 or more than 60; if it is, set the miles per gallon to 0. include a constructor that accepts arguments for each field value and uses the set methods to assign the values.
- Read the instructions below and write your code using Microsoft Visual Studio (Community version). Build your own console application with C#. Write a Rectangle class, the private data members are the length (len) and width (wid) of the rectangle, the parameterless constructor sets len and wid to 0, and the parameterized constructor sets the value of length (len) and width (wid). In addition, the class also includes common methods such as calculating the perimeter of the rectangle, calculating the area of the rectangle, obtaining the length value of the rectangle, obtaining the width value of the rectangle, and modifying the length and width values of the rectangle to the corresponding formal parameter values. Please upload your executable C# file as attachment in the system.Little debugging help The program runs correctly but doesn't follow instructions completely. Currently, I have a parameterized constructor in the circle class when it asked for default I need help to fix the circle subclass. Please Write a default constructor that initializes the name of the Circle object to "Circle". You will need to call the constructor of the parent Shape class. The program runs everything in ShapeDriver /** * Write a Circle class that extends the Shape class. Do the following:* 1. Write the class header.* 2. Write a default constructor that initializes the name of the Circle object to "Circle".* You will need to call the constructor of the parent Shape class.* 3. Write a void method printMessage() that prints the message " I have no sides".**///Your code goes herepublic class Circle extends Shape {public Circle(String myName) {super(myName);}public void printMessage() {System.out.println("I have no sides");}} /*** * Write a Rectangle class that extends the…can i get help with this thanks Create a class named CollegeCourse that includes the following data fields: dept (String) - holds the department (for example, ENG) id (int) - the course number (for example, 101) credits (double) - the credits (for example, 3) price (double) - the fee for the course (for example, $360). All of the fields are required as arguments to the constructor, except for the fee, which is calculated at $120 per credit hour. Include a display() method that displays the course data. For example, if dept is SE, id is 225, and credits is 3, the output from the display() method should be: SE225 Non-lab course 3.0 credits Total fee is $360.0 Create a subclass named LabCourse that adds $50 fee to the course price. Override the parent class display() method to indicate that the course is a lab course and to display all the data. For example, if dept is 'BIO', id is 201, and credits is 4, the output from the display() method should be: BIO201 Lab course 4.0 credits Lab…
- Instructions This assignment must follow directions exactly. Create a class Lab02 with a main method, and put all of the following code into the main method: Print the prompt shown below and ask the user for the number of exemptions. The number of exemptions is an integer. Print the prompt shown below and ask the user for their gross salary. The gross salary represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for their interest income. The interest income represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for their capital gains income. The capital gains represents dollars, which can be entered with or without decimal points. Print the prompt shown below and ask the user for the amount of charitable contributions. The charitable contributions represents dollars, which can be entered with or without decimal points. Perform the calculation of…C# (Odd or Even) Write an app that reads an integer, then determines and displays whether it’s odd or even. (Hints: use the remainder operator) (Multiples) Write an app that reads two integers, determines whether the first is a multiple of the second, and displays the result. (Hints: use the remainder operator). Create a class called Date that includes three pieces of information as auto-implemented properties: a month (type int), a day (type int), and a year (type int). Your class should have a constructor that initializes the three fields. Provide a method DisplayDate() that displays the three fields (separated by '/'). Write a test app named DateDemo that demonstrates class Date’s capabilities.Class Student This class represents a single student __init__(self, id: int, fist_name: str, last_name: str, town:str): """ This creates a student object with the specified ID first and last name and home town. This constructor should also create data structure for holding the students grades for all of there assignments. Additionally it should create a variable that holds the student's energy level which will be a number between 0 and 1. The student start out with 1 (100%) energy. :param id: The student's identifiaction number :param fist_name: The student's first name :param last_name: The student's last name :param town: The student's home town """ get_id(self)->int: """ Returns the ID of the student as specified in the constructor. :return: The student's ID """ get_first_name(self) -> str: """ Returns the first name of the student. :return: The student's first name """ set_first_name(self, name:str):…