1. Create a class named Cat. Declare two (2) empty instance variables: catType (String) and cutenessLvl (int). 2. Create a public constructor without parameters. Inside the constructor, set the values of catType and cutenessLvl to "Unknown" and 3, respectively. 3. Add another public constructor with two (2) parameters: type (String) and Ivl (int). Inside the constructor, assign type to cat Type and level to cutenessLvl. 4. Create an int type of method named getCuteness(). This method shall return the cat's cuteness level.
Q: Write a method that calculates and prints both the maximum humidity and maximum temperature values…
A: ANSWER:
Q: What components of the operating system are stored in the RAM until they are no
A: The operating system shares the various OS system components like File, Process Memory, I/O device…
Q: Are digital certificates and certificate authorities part of the pki?
A: yes, the digital certificates and certificate authorities are the part of PKI. Explanation:- PKI or…
Q: Create a basic ERD given the following business rule: A store can employ one or many employees, but…
A: An entity relationship diagram(ERD), is also called an entity relationship model, is a graphical…
Q: Thread scheduling and the differences between processes and threads are discussed.
A: Many computers have only one CPU, so threads must share the CPU with other threads. The execution of…
Q: Compare the relative cost of fixing errors found early in the software lifecycle with those errors…
A: Errors found late in the software lifecycle are more expensive to fix. Explanation In the later…
Q: Compare and contrast Oracle Cloud with cloud services from Amazon, Google, and Microsoft.
A: Customers now have four options for service: Although there is a vast and increasing (and growing)…
Q: Write the needed statement(s) To draw the following closed half a circle, given that the coordinates…
A: It is defined as a popular programming language. C++ is used to create computer programs, and is one…
Q: Encode õevõpov with Huffman coding. a. List all symbols and their probabilities b. Find the Huffman…
A: ANSWER:
Q: Can you tell me what the HTML5 canvas element is for?
A: Answer:
Q: What are the most significant challenges that businesses experience when attempting to migrate to a…
A: security: When we think about cloud computing, the subject of security comes to mind first. Because…
Q: Create a c++ program that askt 4 numbers (a,b,c,d) and arrange it in ascending order using if-else
A: C++ Program: #include <iostream>using namespace std; int main(){ int a, b, c, d, tmp;…
Q: Which of the following statements is true of normalized scientific notation? a. 3.06 x 10^3 is…
A: Which of the following statements is true of normalized scientific notation?
Q: Write a while loop program that accepts student name, section and numbers, then identify which of…
A: Required C program using while loop is given in the next step. The while loop is used to take the…
Q: potential advantages as well as the potential disadvantages of artificial intelligence
A: Introduction of the potential advantages as well as the potential disadvantages of artificial…
Q: What are the distinctions between the three forms of user testing?
A: User testing: User testing is the process by which the user interface and functionality of a…
Q: Compare and contrast the ideas in the following pairs from the chapter: a) Hardware vs. Software d)…
A: Introduction: Compare and contrast the ideas in the following pairs from the chapter:a) Hardware vs.…
Q: What do we know now about the design and development of websites, and how did we learn it?
A: The answer is given below.
Q: This was the project where Idaho National Lab researchers caused an explosive failure on a diesel…
A: The project described in the question is referred to by the name "Aurora Vulnerability".
Q: Encode õevõpov with Huffman coding. a. List all symbols and their probabilities b. Find the Huffman…
A: ANSWER:
Q: How many different stages are there in the creation of a website? Specify each stage and provide an…
A: Web Developer: Creating a website for the Internet or an intranet is what a web developer does. It…
Q: Give a detailed description of the file?
A: Memory: A file is only a memory location in which information is stored. A file is a sort of…
Q: Cloud computing, in a nutshell, is what? Are there any downsides or advantages to using the cloud…
A: CLOUD COMPUTING: Cloud computing refers to the availability of diverse network resources. These…
Q: Depending on X which is the last digit of your student number, implement the following function F by…
A:
Q: Given the CFG below: E-E+T|T T-TXF F F-(E)|a Give parse tree and derivations for each strings. A. a…
A:
Q: Find out the network address, host range, broadcast address for the following networks:…
A: As per answering guidelines solving the first 3 sub question completely. 1. 166.75.229.22/16 /16…
Q: You have to make aC Program to Convert Celsius from Fahrenheit, Kelvin and Réaumur or to Convert…
A: As per the question statement, we will write program in c language.
Q: What exactly is a public cloud, and how does it work??
A: Introduction: What exactly is a public cloud, and how does it work??
Q: Unemployment has three macro consequences: I lost output for the economy, II lost pay for individual…
A: Introduction: The macro consequence of unemployment includes... I lost output for the economyII lost…
Q: What are the four most important activities that take place during the creation of software
A: The four fundamental software process steps are as follows: Specification of program demands: It…
Q: 1. For the following list of numbers, trace the execution of quicksort, by showing the list order,…
A: Here we have given the solution step wise using quick sort logic. You can find solution in step 2.
Q: A CPU interrupt causes the processor to halt what it's doing and respond to the signal. Why should…
A: The answer is given in the below step
Q: Analyze how transactional and analytical approaches to data management compare and contrast.
A: Introduction: This inquiry inquires about transactional and analytical data management strategies.…
Q: Given the below table showing each process and its execution time (burst time). Process Arrival…
A: FCFS first come first server(FCFS) is the CPU scheduling algorithm that executes the process…
Q: What exactly is "hot potato routing" and how does it work?
A: Routing the hot potato The routing method known as hot potato routing is utilised to facilitate…
Q: nclude <ma nt main O
A: Solution -In the given question, we have to predict the output of the given program.
Q: If x-4d-2f+7r Write a program-using pointer to display the value and memory address of x?
A: Given:
Q: Artificial intelligence systems are divided into four groups. Think/act like a human and think/act…
A: Artificial intelligence (AI): Artificial intelligence (AI) is software that acts intelligently.…
Q: list of municipalities in north and south cyprus with their websites.
A: Generally speaking, we have 39 municipalities located in Cyprus as this is the third-largest island…
Q: Given three binary features (X, Y and Z), two classes (1 a the examples listed in the table below,…
A: Sol: Since, the class varies accordingly for three times values of feature of X, therefore the…
Q: What are the distinguishing characteristics of time-sharing and distributed operating systems, and…
A: Introduction: What are the distinguishing characteristics of time-sharing and distributed operating…
Q: What exactly is a public cloud, and how does it work??
A: Cloud Technology: Cloud computing is a technical term referring to on-demand services for sharing…
Q: Any overloaded operator may be implemented either as a member function or as a regular function,…
A: Answer The correct response is "true." The overloaded operators need to either have a function that…
Q: use this. in a foreach loop C# the keyword this
A: using System; class Student{ public int id, age; public String name; public Student(int…
Q: Congestion control in the computer network is defined and explained. End-to-end congestion control…
A: Introduction: Congestion control in the computer network is defined and explained. End-to-end…
Q: The database design is likely to change frequently: 1. Database Extension 2. Database Intension 3.…
A: Answer
Q: LAN TECHNOLOGY A 100 Km long cable has data rate 1.536 Mbps. The propagation speed in the cable is…
A: Below is the answer to above question. I hope this will be helpful for you...
Q: Why aren't simple file systems utilized for data processing nowadays?
A: Introduction: There are various disadvantages of using file systems. That is why we now prefer DBMS…
Q: A CPU interrupt causes the processor to halt what it's doing and respond to the signal. Why should…
A: The solution to the given question is: Interrupts are special responses performed by some…
Q: What does the role of Middleware include in a computer system that is based on Android?
A: Middleware:- Security authentication, transaction processing, message queues, application servers,…
In Java Langauge.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Given this class, please add the requested methods in the designated spaces provided. Instance methods: a) Write two constructors that will initialize the instance variables for a Student instance as follows: 1) Write a constructor that takes in three parameters – an int, a String, and a double. The constructor will assign them to the ID, name, and GPA instance variables respectively. 2) Write a no-argument (zero-parameter) constructor that will set the ID to - 1, the name to “No name assigned”, and the GPA to –1.0. b) Write an accessor method for the name variable. c) Write a mutator method for the GPA variable. d) Write a toString() method that will display all three instance variables on a single line, with a | (vertical bar) character between each one. e) Write an equals() method that returns true only if all three instance variables are equal. public class Student { // declare instance variables here private int ID; private String name; private double GPA;B - RobotFriend Create a RobotFriend class. RobotFriend is a new toy just on the market. Copy the starter class and the tester from Codecheck. A RobotFriend has a name and replies to various commands Provide a constructor that takes the name of the RobotFriend as a parameter. Remember that a constructor has the same name as the class. What does the class need to remember? That is the instance variable. Provide the following methods: public String getName () gets the name of this RobotFriend • public void setName (String newName) sets a new name for this RobotFriend • public String whatDoYouNeed () returns a string consisting of name + needs a battery charge" where name is the name of this RobotFriend (which was supplied in the constructor) public String doCommand (String whatToDo) returns a string consisting of "Your friend " + name + does not + whatToDo where name is the name of this RobotFriend and whatToDo is the parameterCreate a class named Person.a. This class must have two variables to store name (string) and age (int). These variables should not be accessible from outside the class.b. Encapsulate the variables defined in item a with a property (an intermediate variable) so that they can be accessed from other classes. And after this step, use only intermediate variables that you defined for encapsulation within methods and other classes.c. Define a constructor method for this class. Code the constructor method to initialize the properties of the class at the time of object definition.D. Define a method called Print Info that will print the information of the class object on the screen in a proper format.
- Create a class Book with the data members isbn, title, price. Create a class Special Edition which is subclass of Book and with a data member discountRate. Create a class BookTest with main() to test the above classes. Constructors & Methods: - Create constructors to give the values to the data members. Values shall come from user. - Create a method display() in Book class which displays isbn, title and price. Override the same display() of Book class in Special Edition. This method displays isbn, btitle, price using super.display() and display the discounted price.Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getLevel; c. Add the method display able to display the attributes,Creates a class Student with 3 attributes: name, id and level. a. Add a constructor able to create a Student; b. Add the methods getId and getName; c. Add the method display able to display the attributes,
- Create a Class Pet with the following data members Identification: String species : String (e.g. cat, dog, fish etc) breed: String Age (in days): int Weight: float Dead: boolean 1. Provide a constructor with parameters for all instance variables. 2. Provide getters for all and setters for only breed, and weight 3. Provide a method growOld() that increases the age of the pet by one day. A dead pet wont grow old 4. Provide a method growHealthy(float w) that increases the weight of the pet by the given amount w. A dead pet cannot grow healthy. 5. Provide a method fallSick(float w) that reduces the weight of the pet by the given amount. The least weight a pet can have is 0 which will mean that the pet has died. If the value of weigh is 10 kg and the method is called with an argument of 11 kg then you will set it to 0 and set the dead to an appropriate value to mark the death of the pet 6. Provide a toString method that shows an appropriate well formatted string…Create an Object class and a test class to accomplish the following: Write a convertToMetric class that has the following field: standard - holds a double, standard length value in feet. The class should have the following methods: Constructor - that accepts a length in feet (as a double) and stores it in the standard field. setStandard - accepts a standard length in feet and stores it in standard. getStandard - returns the value of the standard field, as a length in feet, no conversion required. getMeters - returns the value of the standard field converted to meters. getCentimeters - returns the value of the standard field converted to centimeters A second class will be created and used to test the new object class. This, executable class, is to instantiate an object of 'convertToMetric' type. Then it will allow the user to use keyboard input to input a value for standard. That value will then be converted to meters and centimeters, and displayed. Make sure that your output (or…Write a Student class to get the desired output as shown below. 1. Create a Student class and a class variable called ID initialized with 0. 2. Create a constructor that takes 4 parameters: name, department, age and cgpa. 3. Write a get_details() method to represent all the details of a Student 4. Write a class method from_String() that takes 1 parameter which includes name, department, age and cgpa all four attributes in string. #Write your code here for subtasks 1-6. OUTPUT ID: 1 s1 = Student("Samin", "CSE", 21, 3.91) s1.get_details() print("-- s2 = Student("Fahim", "ECE", 21, 3.85) s2.get_details() print("- s3 = Student("Tahura", "EEE", 22, 3.01) s3.get_details() print("- s4 = Student.from_String("Sumaiya-BBA-23-3.96") s4.get_details() Name: Samin Department: CSE Age: 21 CGPA: 3.91 ----") ----") ID: 2 Name: Fahim %3D Department: ECE Age: 21 CGPA: 3.85 -") %3D ID: 3 Name: Tahura Department: EEE Age: 22 CGPA: 3.01 # Write the answer of subtask 5 here # Write the answer of subtask 6…
- Create an Object class and a test class to accomplish the following: Write a convertToMetric class that has the following field: standard - holds a double, standard length value in feet. The class should have the following methods: Constructor - that accepts a length in feet (as a double) and stores it in the standard field. setStandard - accepts a standard length in feet and stores it in standard. getStandard - returns the value of the standard field, as a length in feet, no conversion required. getMeters - returns the value of the standard field converted to meters. getCentimeters - returns the value of the standard field converted to centimeters A second class will be created and used to test the new object class. This, executable class, is to instantiate an object of 'convertToMetric' type. Then it will allow the user to use keyboard input to input a value for standard. That value will then be converted to meters and centimeters, and displayed. Make sure that your output (or…Please complete the following tasks: Write a class “Actor” that contains two attributes with the appropriate level of visibility explicitly defined. “Name” which is a String, Private, “NumberofAwards” which is an integer, private Write a default Constructor for this class that initializes the name to “Bob Smith” , and the number of awards to 0. Write an overload the constructor for this class that accepts actor’s name as a parameter Write accessor methods for each of the attributes. Write a method “winsAnOscar” that increases the number of awards by one and prints “The crowd applauds for <actor’s name>!” Be sure to use accessors where appropriate. Make sure your header is complete, with the appropriate level of visibility and any required keywords.Define the Artist class with a constructor to initialize an artist's information and a print_info() method. The constructor should by default initialize the artist's name to "None" and the years of birth and death to 0. print_info() should display Artist Name, born XXXX if the year of death is -1 or Artist Name (XXXX-YYYY) otherwise. Define the Artwork class with a constructor to initialize an artwork's information and a print_info() method. The constructor should by default initialize the title to "None", the year created to 0, and the artist to use the Artist default constructor parameter values. Ex: If the input is: Pablo Picasso 1881 1973 Three Musicians 1921 the output is: Artist: Pablo Picasso (1881-1973) Title: Three Musicians, 1921 If the input is: Brice Marden 1938 -1 Distant Muses 2000 the output is: Artist: Brice Marden, born 1938 Title: Distant Muses, 2000 code used: class Artist: # TODO: Define constructor with parameters to initialize instance attributes #…