"Make a class called Animal. Create two attributes called name and year, and then create several other attributes that are typically stored in an Animal profile. Make a method called describe animal() that prints a summary of the Animal s information. Make another method called Comment () that prints a personalized comment of the animal. Create several instances representing different animals. and call both methods for each animal." T TT Arial 3 (12pt)
Q: 1. Create a class named Employee and create fields to store the following information. Employee ID…
A: Java program to form above Employee class and given questions
Q: You are given a super class called Animal and a sub-class (derived class) called Reptilian. The…
A: the ans is an D
Q: Next, create class Lab14A with a main method or driver which should do the following: • Create two…
A: Solution: Given,
Q: QUESTION 18 Which of the statements regarding the super keyword is incorrect? (Choose all that…
A: ANSWER:-
Q: panyName, color, maxSpeed (Not more than 150) and category. Use appropriate data types and access…
A: Create a class Car with parameters companyName, color, maxSpeed (Not more than 150) andcategory. Use…
Q: Create a class named "Identity" class with attributes: name, age, city and gender. Choose your own…
A: Answer: Algorithms: Step1: we have created class person and data member name, age, city and gender…
Q: 1. Create a method named getCircleDiameter that takes a radius of double type as the parameter. The…
A: A class is a group of objects which have common properties. A constructor is a method that is used…
Q: Question 1: Sliding Window Averagerator Complete the code below, defining a sliding window…
A: the answer for the given question is given below:
Q: Hi there, I have attached the errors, the assignemnt is bleow and my code below that. PLease could…
A: Coded using Python 3.
Q: <?php echo "\n"; /* NOTE: to see your output in the console, follow your output with a new line…
A: Answer: Our instruction is answer the first three part from the first part and. I have done code…
Q: Request: Can you please help me answer this by providing some coding algorithm? And if you can, can…
A: Algorithm: Start Create a class named Ship with name and year as its attributes Implement…
Q: Modify the student class presented in this chapter as follows. Each student object should also…
A: public class Student { private String firstName, lastName; private Address homeAddress,…
Q: Write a program in BlueJ using the following hints. 1. Create a class named Book and declare the…
A:
Q: O None of the above O Object and Attribute Methods and Object O Methods and Attribute
A: The question has been answered in step2
Q: Create a class named Person with three attributes (name, age, address) and provide a constructor to…
A: Java code for the given scenario is as follows: class Person { String name; int age; String…
Q: Course class named OOPCourse 3. Create a constructor that initialises the following attributes and…
A: the code is an given below with the screenshot of the output :
Q: Write a program in BlueJ using the_following hints. 1. Create a class named Book and declare the…
A: The Answer to the Following Problem :-
Q: Question: Following the example of the Rectangle class of Chapter 9 Exercise 1, design a class named…
A: Solution: Given,
Q: ow do I create a class Battle, with the following instance attributes: iron_chef: a Chef object…
A: Given the python code, the task is to find the complete the given code for the Battle Class. Create…
Q: Create a class named ClassA. Define two instance variables along with getter and setter named: att1,…
A: Constructor is a special member function of the class. It is a method that has the same name as that…
Q: Apex Class to Multiply two numbes and show in the Console and please add proper comments and output?
A: Required: An Apex Class to Multiply two numbers and show in the Console and please add proper…
Q: In the following example, draw all classes and interfaces to show the relationships. - Write the…
A: Class Diagram:
Q: ASAP!! Solve the written question not the image one Q3 part 3 attached in the image with the table…
A: 1.) The method signature is basically a declaration of the instance function in the base class so…
Q: SELECT
A: Class is collection of variables, methods etc .It is collection of all objects together .
Q: Given the following code, which statement is true? class Water() { ... } class Juice() extends Water…
A: Answer: The correct answer is A) ApplePie is a composite class that contains an instance of Apple…
Q: Create a new class called AdvancedMath that implement myMath interface, which have following methods…
A: GIVEN: Create a JAVA program with a new class called AdvancedMath that implements the myMath…
Q: dth (individually and collectively), and get their values individually. There should also be…
A: EXPLANATION Create a class Rectangle, define two fields' length and width. Create getter and…
Q: Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a…
A: #include <iostream> using namespace std; class student{ // Declaring three attributes of…
Q: 1. Create a class named Student that has fields for an ID number (idNumber), number of credit hours…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Import…
Q: Exercise 2: a) Write a class Rectangle allowing you to build a rectangle endowed with length and…
A: The answers of exercise 2 are given below. Please repost the question to get the solution of the…
Q: Encapsulate the Name class. Modify the existing code shown below to make its fields private, and add…
A: Following Code Given below
Q: Work on the following: Create three interfaces with the names "InterfaceOne," "IrnterfaceTwo," and…
A: In this question, we have to create three interfaces and classes. All the code is implemented below.
Q: Q1. If following is the sequence of the lines of code, where A is the class, which types of…
A: Constructor is the same name as class name and members function of that class. The constructors are…
Q: Create a class, CallClass, with two methods to show call by value and call by reference. One method…
A: Java Code: Java code that has a class which have two methods. One method takes call by value and…
Q: Create a Class Student in which we have three instance variables emp_name, emp_id, and Salary. Write…
A: ALGORITHM:- 1. Create class Student along with all the methods required. 2. Create 5 objects of…
Q: Create a class named “Rectangle” having length and width as attribute. There should be…
A: A class is the fundamental unit of object oriented modelling. A class has both data and operations…
Q: Create a class Rectangle with attributes length and width with are variables, each of which defaults…
A: A Java program for the given criteria is as follows, File name: “Rectangle.java” import…
Q: 1. Let's say you have a zoo (A place with animals). You want to store different animals. You will…
A: Below I have provided java Programming. Also, I have attached the screenshot of the code and output…
Q: Q.1: With C#, using the Visual Studio, create a class named Shape with properties named Height,…
A: Find the required code in C# given as below and output :
Q: Create a Driver class to use your Farm and Animal classes and create instances of them. In the main…
A: Animal.java //this class encapsulates all the parameters of an animal.// All function names are self…
Q: Create a new class called Post and fill in the comment details. This class represents a single…
A: Post.java: public class Post { // Attributes private String name; private String…
Q: If a class extends Applet and also implements MouseListener and MouseMotionListener, what methods…
A: Java is a programming language. It contains extensive libraries (package). It can be used to create…
Q: Create a class named House with the 3 attributes named price, location and builtYear of type double…
A: In java, For each instance variable, a getter method returns its value while a setter method sets…
Q: Create a class to compute the average grade (out of 10) of the students based on their grades in…
A: Objective: This program should include a class to store grades of five exams of students. It should…
Q: ed getCircleDiameter that takes a radius of double type as the parameter. The method should return…
A: Given : Create a method named getCircleDiameter that takes a radius of double type as the parameter.…
Q: Which of the following statements is false? a. A class can contain only one constructor. b. An…
A: False statement Constructor is a class method whose instructions are automatically invoked each…
Q: Create a class named “Rectangle” having length and width as attribute. There should be behaviors to…
A: Java code: class Rectangle { double length; double width; //method to…
Q: 8) Now use the Rectangle class to complete the following tasks: - Create another object of the…
A: #Code: class Rectangle { int x1, y1, x2, y2; public Rectangle (int x1, int y1, int x2, int y2)…
Q: Assume there is a class Phone with a private attribute named model. Write a method named someMethod…
A: Given:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Intro to Programming: Exercise 3: Basketball.py Write a class called Basketball that inherits from the UniversityAthletics class you wrote in previous exercises. Add an attribute called gender that stores mens and womens. Write a method that displays the genders. Create an instance of Basketball, and call this method.PLEASE ENSURE TO USE THE FRAMEWORK PROVIDED IN THE IMAGES, AND THAT IT WORKS WITH THE TESTER CLASS. PLEASE EDIT BOTH THE TEST CLASS, DO NOT EDIT THE MAIN METHOD. Write a BankAccountTester class whose main method constructs a bank account, deposits $1,000, withdraws $500, withdraws another $400, and then prints the remaining balance. Also print the expected result.Create a TeeShirt class for Lebo’s Tee Shirt Company. Attributes include an order number, size, color, and price. Create set methods for the order number, size, and color and get methods for all four attributes. The price is determined by the size: R122.99 for XXL or XXXL, and R109.99 for all other sizes. Create a subclass named CustomTee that descends from TeeShirt and includes an attribute to hold the slogan requested for the shirt, and include get and set methods this field. The display() method should me an abstract method. Write a test class named DemoTees.java that creates two objects of each class, and demonstrate that all the methods work correctly by communicating to the user to input the tee shirt size, color, and slogan, then display the tee shirt order number, size, color, slogan and price. Format your output to 2 decimal places. The user should be asked to repeat the process or not, (y) indicates yes they want to repeat the process an the process repeats and (n)…
- Create a class Course to describe a course according to the following requirements: A course has three attributes: courseName, courseCode, fees. Create a constructor without parameters to initialize all the instance variables to default values (0 for numbers and "" for a string). Create a constructor to initialize all the attributes to specific values. Add all setter and getter methods Create a tester class with the main method. The tester class must be named using your first and last In this class performs the following: Create a course object c1 using the default constructor. Create a course object c2 with the following information: courseName =” object oriented programing”, courseCode = “CS230” , fees = a value from your choice. Change the course fees of c2 to your age. Print the course information of c2 using getter methods I attached Typical run of the programDraw Design Layout References Mailings Review View Help Create a Java program and name your file: FIRSTNAME. java (for example, lohn.java). Work on the following: Create three interfaces with the names "InterfaceOne," "IrnterfaceTwo," and "Interfacelhree" In the first interface, declare a method (signature only) with a name "updateGear()." In the second interface, dedare a method (signature only) with a name "accelerate()." In the third interface, dedare a method (signature only) with a name "pusherake()." Create two classes Car and Truck that implement these three interfaces at one time. Define a new method "currentSpeed()" in both the classes to find the current speed after the brake. • Define all the three methods inside each class. The data to these methods will be provided during the object creation. Invoke the two objects with a name c1 of class Car and t1 of class Truck. • After creating the objects, call all the three methods defined above in both the classes. Pass any of the…Create a code the follow way: Each student object should also contain thenumber of earned credits. Provide a constructor that sets this value based on parameter value. Overload theconstructor such that the number of earned credits is initially zero. Provide setter and getter for this newfield. Modify the toString method such that the new information is included in the description of thestudent. Modify the driver class main method to exercise the new Student methods.
- Add 2 constructors to the Course class. One that takes no arguments and initializes the data to all 0’s and “” (empty strings). And one constructor that takes all 4 arguments, one argument for each property and then sets the properties to these arguments that are passed in. Lastly change the main to use these new Constructors. You will not need to call the set functions any more, but do not remove the set functions from your class. Main Code à Course c1; c1 = new Course(323, “Intro to Php”, “Intro to Php Programming”, 4); c1.display(); Problem #2: Do the same as above for the Account class. Problem #3: Do the same as above for the Person class. Below is my Course code public class Course { int Courzeld; String CourteName; String Description; int creditHours; void display() { System.out.println("Course ID: " + Courzeld); System.out.println("Course Name: " + CourteName); System.out.println("Description: " + Description);…Java: Create the vehicle class UI transformation for the parking garage project as shown below: // Make sure the code is running with no errors • The parking lot has multiple levels. Each level has multiple rows of spots. • The parking lot can park motorcycles, cars, and buses. • The parking lot has motorcycle spots, compact spots, and large spots. • A motorcycle can park in any spot. • A car can park in either a single compact spot or a single large spot. • A bus can park in five large spots that are consecutive and within the same row. It cannot park in small spots. public enum VehicleSize { Motorcycle, Compact, Large } public abstract class Vehicle { protected ArrayList parkingSpots = new ArrayList(); protected String licensePlate; protected int spotsNeeded; protected VehicleSize size; public int getSpotsNeeded() { return spotsNeeded; } public VehicleSize getSize() { return size; } /* Park vehicle in this spot (among others, potentially) */ public void parkInSpot(ParkingSpot s) {…1. Create Main Program that will instantiate the whole registration. 2. Create a design class that define an Animal 3. the Animal can be described by: Name, Type, Description 4. Create a registration class that can store the List of Animals 5. the registration should be able to Add, Edit, Delete, and Retrieve the List of Animals 6. Create a AnimalDisplay class 7. AnimalDisplay class should be able to Display All animals and can Display the Animals based on their types 8. Lastly the main program should do the calling for all this classes, the data input will be coming from the main program, the process should be done by registration and the display should be done by AnimalDisplay.
- Add a list of procedures in your patient class, fill them and print them with the patient data. This is called composition which is a "has a" relationship. A patient has procedures. Write a class named Patient that has attributes for the following data: First name, middle name, and last name Address, city, state, and ZIP code Phone number Name and phone number of emergency contact The Patient class’s _ _init_ _ method should accept an argument for each attribute. The Patient class should also have accessor and mutator methods for each attribute. Next, write a class named Procedure that represents a medical procedure that has been performed on a patient. The Procedure class should have attributes for the following data: Name of the procedure Date of the procedure Name of the practitioner who performed the procedure Charges for the procedure The Procedure class’s _ _init_ _ method should accept an argument for each attribute. The Procedure class should also have accessor and mutator…Create a Point class to hold x and y values for a point. Create methods show(), add() and subtract() to display the Point x and y values, and add and subtract point coordinates. Create another class Shape, which will form the basis of a set of shapes. The Shape class will contain default functions to calculate area and circumference of the shape, and provide the coordinates (Points) of a rectangle that encloses the shape (a bounding box). These will be overloaded by the derived classes; therefore, the default methods for Shape will only print a simple message to standard output. Create a display() function for Shape, which will display the name of the class and all stored information about the class (including area, circumference and bounding box). Build the hierarchy by creating the Shape classes Circle, Rectangle and Triangle. Search the Internet for the rules governing these shapes, if necessary. For these three Shape classes, create default constructors, as well as constructors…Create a Point class to hold x and y values for a point. Create methods show(), add() and subtract() to display the Point x and y values, and add and subtract point coordinates. Create another class Shape, which will form the basis of a set of shapes. The Shape class will contain default functions to calculate area and circumference of the shape, and provide the coordinates (Points) of a rectangle that encloses the shape (a bounding box). These will be overloaded by the derived classes; therefore, the default methods for Shape will only print a simple message to standard output. Create a display() function for Shape, which will display the name of the class and all stored information about the class (including area, circumference and bounding box). Build the hierarchy by creating the Shape classes Circle, Rectangle and Triangle. Search the Internet for the rules governing these shapes, if necessary. For these three Shape classes, create default constructors, as well as constructors…