Write a Java program containing two classes: Dog and a driver class Kennel. The Dog dlass consists of the following information: • An integer age. • A string name. A boolean hairLength representing hair length; true indicates short hair. • An enumeration representing the type of tail (LONG, SHORT, NONE). The Dog class consists of the following methods. • A default constructor. • A constructor that takes a name as argument. If the given name contains non-alphabetic characters, initialize to Wolfy. • A method private boolean validName (String) that returns true / false whether the given name contains non-alphabetic characters. Each constructor should initialize all attributes to reasonable initial values.
Q: Make a C program For centuries, only the most gifted magicians were able to tell whether a square i...
A: I give the code in C along with output and code screenshot
Q: What is software re-engineering?
A: To define software reengineering.
Q: 8.4 Assume that 10,000 nodes per second can be generated in a breadth-first search. Suppose also tha...
A: Maximum total number of nodes - 5^d memory needed - 100*(5^d) Time needed -5^d/10000
Q: 1) . ....reliable transport between sending and receiving process (TCP, UDP) 2) does not provide flo...
A: 1. Answer. TCP 2.answer UDP 3.answer. TCP 4.answer. Client
Q: Which XXX completes the following code? import java.util.Scanner; public class GuessMyAge { public s...
A: Correct option is: myGuess (mid, high, scnr);
Q: Write, compile and test a program that displays the following patterns on the screer b) 1 12 123 123...
A:
Q: What are the repercussions of the cloud computing movement in terms of business? Do you have the abi...
A: Introduction: What implications does the cloud computing trend have?Are you a person who collaborate...
Q: Gambling And Casino PROBLEM 23 – 0553: roulette with a basic program. Simulate a game of American
A: Step1:Te above game can be written in C/C++ programming .
Q: (True or False) For a dataset with 1000 data points, a 10-fold cross validation technique is computa...
A: 10-fold cross validation technique is computationally more intensive than leave-one-out cross valida...
Q: On Our Everyday Lives and in Society: The Effects of Information Technology Make a convincing argume...
A: Introduction: The Impact of Information Technology on Our Everyday Lives and Society Make an argumen...
Q: Minicomputer, mainframe and supercomputer are the three different kinds of computers available in th...
A: MINICOMPUTER: A minicomputer is a computer that is smaller, cheaper, and less powerful than a mainf...
Q: What are the challenges that businesses experience while attempting to shift to a cloud-based infras...
A: 'Cloud computing platform': Provides the infrastructure necessary to host a software service or a ha...
Q: Write a program that declares a variable that represents the minutes worked on a and assign a value....
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=ne...
Q: 6. b) Running on a particular treadmill you burn 3.9 calories per minute. Write a program that uses ...
A: As programming language is not mentioned we are providing answer in C language.
Q: a) Assume that two students are trying to register for a course in which there is only one open seat...
A: a) Due to the isolation property (ACID) both students can not register for the last seat. Transactio...
Q: olution
A: given - Don't copy other experts solution.
Q: Sum of Numbers Find the sum of the first one hundred positive integers
A: I give the code in Python along with output and code screenshot
Q: Using Java Eclipse IDE Create gui like this Frame Java Swing or jframe
A: Explanation: I have provided an explanation within the code in the comment. Code run successfully a...
Q: Write, compile and test a program that displays the following patterns on the screen b) 1 12 a) *** ...
A: I have answered this question in step 2.
Q: Two endpoints are connected by a single link of rate R- 56kbps and the propagation speed along the l...
A: The answer is
Q: What sorts of analyses can the NLOGIT software package perform?
A: Introduction Following are types of analysis that can be performed on NLOGIT: Data Analysis Model ...
Q: If a computer and information technology scenario differs from more traditional media that does not ...
A: EXPLANATION AND ANSWER: The characteristics that distinguish computer and information technology env...
Q: What is output? public class RecursiveFactorial { public static int factorial(int factValue) { if (f...
A: Your answer of java code is given below with an output.
Q: msh7.c can be terminated with exit , but mshs.c cannot. Is this true? Yes! No!
A: Exit command is used to terminate the control of program.
Q: Information need of academic librarian
A: Information is knowledge received or given by any one.
Q: rite a C program to implement clique problem. pls provide pseudocode and screen shot of the output.
A: #include <bits/stdc++.h>using namespace std; const int MAX = 100; int store[MAX], n; int graph...
Q: . Write a JAVA program to input two strings x, y and create a new string of the form small + large +...
A: Please find the answer below :
Q: how can I use C++ to get the sum of 7th column?
A: First we have to create a file with extension (like .txt) after that by using the program we have to...
Q: Laboratory Exercises Using a nested loop, create a program that produces tl b) 321 32 c) 321 21 a) 1...
A: As per our guidelines we are supposed to answer only 1st three parts. Kindly repost the remaining qu...
Q: Find the output statement that is used for debugging the following code:
A: Find the answer with reason given as below :
Q: Describe benefits of REST over SOAP.
A: To be determine: Benefits of REST over SOAP
Q: 1- Write a program to transfer a block of data from one location to the c location. Assume five numb...
A: Lets see the solution.
Q: JAVA PROGRAMMING Write, compile and test a program that displays the following patterns on the scre...
A: PROGRAM INTRODUCTION: Import the required libraries. Start the definition of the main function. Dec...
Q: 1- Write a class declaration named Circle with a private member variable named radius. Write set and...
A: public class Main{ public static void main(String[] args) { Circle c1=new Circle(); //create Circle...
Q: SECTION III: (SELECT ONE TRUE OPTION) Read this question CAREFULLY AND SELECT one TRUE option FROM B...
A: Please upvote. I am providing the correct answer below. Answer 1. Identical metrics (k values)
Q: In any organization, provide a concise definition of information system activities as well as actual...
A: System of data: A legal, systems theory, organizational system ways to detect, organize, store, and ...
Q: Interrupt service procedures are not available for regular subroutines.
A: Introduction: In computer programming, a subroutine is a collection of software instructions that pe...
Q: What are some examples of potential applications for cloud-based collaborative tools? Employees' abi...
A: Introduction: A cloud-based collaboration tool isn't only for communication; it also serves a variet...
Q: Ex: What is the MIPS code to test if contents of register $18 is less than the constant 10 Siti $8, ...
A: Slti syntax: slti $t, $s, const Meaning: If $s is less than constant, $t is set to one. It gets zero...
Q: A data point may be excluded when: I Gcalculated is greater than Gtable. Il Gcalculated is less than...
A: In this given problem we need to provide the right option for the given input. find answer below
Q: Problem Design a 4-bit composite number detector. The circuit will output a 1 if the input is a com...
A: We will draw a logic diagram as well as design a truth table for a 4 bit composite number detector. ...
Q: Parameters are more important for an industrial network compared to office automation networks: 1) ...
A: Deterministic networking can be defined as the ability and the capability of the network to provide ...
Q: 5. Why are information policy, data administration, and data quality assurance essential for managin...
A: let us see the answer:- "Since you have asked multiple questions I am solving the first one for you ...
Q: ployee struct as a single struct. You wi employees out to a file. The SAVE com Y argument and return...
A: The file code is given as,
Q: ID: A Name: ID: A 6. There are 32 students standing in a classroom. Two different algorithms are giv...
A: The Answer is
Q: What are the benefits of utilizing cloud computing services? What are the dangers and concerns relat...
A: Introduction : Here's everything you need to know: There are various benefits to storing data over t...
Q: In a computer with a 32-bit data-bus, how many 4-bit wide memory components are used? the answer to ...
A: The answer is
Q: In what way does autonomic computing benefit cloud computing, and how does it do so?
A: Cloud computing is the on-demand availability of computer system resources, especially data storage ...
Q: Using Java Eclipse IDE Create gui like this Frame Java Swing or jframe Please provide answers
A: Explanation: I have provided an explanation within the code in the comment. Code run successfully...
Q: A combinational circuit is specified by the following three Boolean functions: F1(A, B, C) - Σ(1, 4,...
A:
Step by step
Solved in 7 steps with 5 images
- Java Question - Based on code, which answer out of the choices "A, B, C, D, E" is correct. Question has one correct answer. Thank you. Part 2 - 10. Given the following code, which statement is true? class Water() { ... }class Juice() extends Water { ... }class Apple() { ... }class ApplePie() { Apple a1 = new Apple(); }class AppleJuice() { Apple a1 = new Apple(); Water w1 = newWater(); } A. Juice is a superclass and Water is a subclass.B. ApplePie is a superclass of Apple.C. ApplePie is a composite class that contains an instance of Apple class.D. AppleJuice is a superclass that contains an instance of Apple class and an instance of Water.E. Water is a composite class that contains an instance of Juice.5This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). (1) Extend the ItemToPurchase class to contain a new attribute. item_description (string) - Set to "none" in default constructorImplement the following method for the ItemToPurchase class. print_item_description() - Prints item_description attribute for an ItemToPurchase object. Has an ItemToPurchase parameter. Ex. of print_item_description() output: Bottled Water: Deer Park, 12 oz. (2) Build the ShoppingCart class with the following data attributes and related methods. Note: Some can be method stubs (empty methods) initially, to be completed in later steps. Parameterized constructor which takes the customer name and date as parameters Attributescustomer_name (string) - Initialized in default constructor to "none"current_date (string) - Initialized in default constructor to "January 1, 2016"cart_items (list)Methodsadd_item()Adds an item to cart_items list. Has a parameter of…Here _Class ja URGENT FOR JAVA Write a class about a book which has following properties: • isbn • price • titleIn a Test class we are supposed to create objects as below: Book b1= new Book(); Book b2= new Book(544444, “Java”); Book b3= new Book(54444444, C++, 5.6); Book b4= new Book (“Python, 7.9, 8888899988); and we are supposed to print objects with the following statement: 5. System.out.println(b3); The the output should be:“Title of the book is C++, ISBN is 54444444”, price is 5.6 TL Now complete the Book class that enable to execute statements that mentioned in the Test class. Except the 5 items that mention above, please test: 6. Test the f(n) with 2 different numbers 7. Update the price of the b4 object.8. Test the Q3 method. of n in enable. .
- Question 14 papa.Write a Java class “ShoppingCart” and a Java tester class “ShoppingCartTestDrive” to implement the OOP class design: “ShoppingCart”. - Apply “Encapsulation” concept in your classes- Implement three methods addToCart(), removeFromCart(),checkOut() and print demo results to the screen Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line_4.1g Write a Java class that would match a string. The class has method match with String as a return type. It accepts two inputs: the phrase/sentence string (text) and the pattern string (word). This method finds the first (or all) instances of the pattern in the text and changes that word in all uppercase and return the new phrase. Method countOccurence accepts a phrase/sentence and a pattern string and returns its number of occurrences. Add a main method that will allow the user to input the phrase/sentence and pattern. Call method match and countOccurence. See test case below. Sample Input: Text string: You will always have my love, my love, for the love I love is as lovely as love itself. Pattern string: love . .Hello, I am having trouble with this homework question Q1: Implement a class called Vehicle.a) A class named Vehicleb) Two private data members: brand (string), model (string), price (int).c) Accessors and Mutators function for brand, value, and price.Use following main() to test your class. int main(){Vehicle a;a.setBrand("BMW");a.setModel("X5");a.setPrice(60000);cout<<a.getBrand()<<endl; // print BMWcout<<a.getModel()<<endl; // print X5cout<<a.getPrice()<<endl; // print 60000}
- JAVA PROGRAM !!!Write a program that converts a number entered in Roman numerals to decimal. Your program should consist of a class named Roman, and an object of type Roman should do the following:a) Store the number as a Roman numeral.b) Convert and store the number into decimal.c) Print the number as a Roman numeral or decimal number as requested by the userThe decimal values of the Roman numerals are:• M 1000• D 500• C 100• L 50• X 10• V 5• I 1d) Your class must contain the method romanToDecimal to convert a Roman numeral into its equivalent decimal number.++1.+Write a class about a book which has following properties: • isbn • price • titleIn a Test class we are supposed to create objects as below: Book b1= new Book(); Book b2= new Book(544444, “Java”); Book b3= new Book(54444444, C++, 5.6); Book b4= new Book (“Python, 7.9, 8888899988); and we are supposed to print objects with the following statement: 5. System.out.println(b3); The the output should be:“Title of the book is C++, ISBN is 54444444”, price is 5.6 TL Now complete the Book class that enable to execute statements that mentioned in the Test class. Except the 5 items that mention above, please test: 6. Test the f(n) with 2 different numbers 7. Update the price of the b4 object.8. Test the Q3 method.m..Write a java program: Write the definition of a class named Employee to hold the data of the working hours of employees and their salaries in a company. The class includes the following private data members: • Name: to represent employee's name • ID: to represent employee's ID • NumberHours: an array of type integer of size 24 to save the number of hours worked by the employee during the days of the month. • Price: to represent the price per hour. Additionally, the class should include: • A constructor that takes three parameters to initialize the instance variables Name, ID and price and create the array NumberHours. • A method SetHours. The method should ask the user to enter the number of hours worked in each day (fill the array). · A method TotalAmount that returns the amount which should be paid by the company to the employee. If the total worked hours exceeds 150, the company should pay an additional bonus of 10% of the total amount. Thus, normal payment is calculated as =…
- #c++# Write a program that inputs a line of text, replaces all punctuation marks with spaces. 2.Create a class called Complex for performing arithmetic with complex numbers. Write a program to test your class. Complex numbers have the form realPart + imaginaryPart * i where i is Use double variables to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it’s declared. The constructor should contain default values in case no initializers are provided. Provide public member functions that perform the following tasks: Adding two Complex numbers: The real parts are added together and the imaginary parts are added together. Subtracting two Complex numbers: The real part of the right operand is subtracted from the real part of the left operand, and the imaginary part of the right operand is subtracted from the imaginary part of the left operand. Printing Complex numbers in the form (a, b), where a is the real…In Java Write a program that asks the user to enter how many automobiles are to bedescribed, and for each automobile, it (the driver) inputs the user’s selection ofmake and color. Then the driver outputs color and make. Although you could dothis easily using a simple procedural program, do it by using a main method inclass AutomobileDriver to instantiate an object called auto from a classAutomobile. Make your classes conform to the following UML class diagram:Let Automobile methods setMake and setColor do the prompting and inputtingfor make and color, and include input verification which asks again if a selectionis illegal. Let Automobile methods printColor and printMake print color andmake on one line. In AutomobileDriver, after asking auto to call setMake andsetColor, use auto.printColor().printMake(); to chain the two printing methods.Write code so that the program can produce the following display: Sample session:How many cars do you want to consider? 2 Select Buick, Chevrolet,…Java ProgramFollowing the example of the Circle class in Section 9.2, design a class named Rectangle to represent a rectangle. The class contains:- Two double data fields named width and height that specify the width and height of the rectangle. Thedefault values are 1 for both width and height.- A no-arg constructor that creates a default rectangle.- A constructor that creates a rectangle with the specified width and height.- A method named getArea() that returns the area of this rectangle.- A method named getPerimeter() that returns the perimeter Draw the UML diagram for the class then implement the class. Write a test program that creates two Rectangle objects—one with width 4 and height 40, and the other with width 3.5 and height 35.9. Display the width, height, area, and perimeter of each rectangle in this order.