Create a Java program named vehicle.java with the following code. public class Vehicle private String brandName; public void setBrand (String b) { brandName = b; public String getBrand () return brandName; Then, create a Java program (within the same package) named car.java that extends vehicle. Car has its own private member variables named modelName with its mutator and accessor. Lastly, assign and display the brandname and modelName in the main function. You may assign any value of brandname and modelName.
Q: How exactly does the existence of resident monitors lead to improvements in the functioning of the…
A: Given: Examining and a editing ram and/or ROM (including flash EEPROM) and occasionally special…
Q: ne aspects of the Just in our claims.
A: Introduction: We should define the expression "Just in Time System," depict its characteristics, and…
Q: grade has been declared as int a You may assume that score is input by user and grade has not been…
A: Answer:- import java.util.Scanner; public class GradeCalc{public static void main(String[] args){int…
Q: Describe the elements to consider while choosing the best scanning device for a specific task. Is it…
A: Intro Centralized/De-Centralized ScanningWhether scanning is a centralized or decentralized will,…
Q: What is the definition of data trust management? What applications does it have?
A: The above question is solved in step 2:-
Q: How does the organization of a solid-state drive (SSD) vary from that of a magnetic disc? What…
A: Required: In terms of organisation, how does an SSD differ from a magnetic disc? What makes them…
Q: Was there a significant difference between entering raw data into an Excel spreadsheet and entering…
A: Key difference putting raw data into an Excel spreadsheet and putting data into an Excel table:
Q: Using a diagram, explain the data link layer control technique of: Automatic Repeat Request (ARQ)
A: Introduction Automatic Repeat Query (ARQ) is another name for Automatic Repeat Request (ARQ). ARQ is…
Q: In order to better understand the concept of abstraction, let's look at some instances from the…
A: Our task: The answer to the question is about how important abstraction is in software engineering…
Q: What are the five applications for computer graphics that are used the most frequently?
A: Most Frequent Applications that uses computer graphics are:
Q: Identify at least two (2) benefits of using OOP instead of PP alone.
A: Introduction: Procedural programming consists of the following steps: - They are structural…
Q: First, you should provide a general introduction to real-time operating systems before going on to…
A: Real-time operating system: This kind of operating system is often employed in situations when a…
Q: What are some different ways that pre-order traversal in binary search trees may be used to their…
A: Introduction: The binary search tree is a complex algorithm that examines the node in addition to…
Q: In the context of software engineering, provide three compelling reasons in favor of the necessity…
A: why is software design crucial in software engineering: Software design is the process of laying the…
Q: Using Rational Rose and taking into consideration all the required specifications, draw the…
A: According to the bartleby guidelines we can answer only three subpart in case of multiple questions.…
Q: dard of testing performed on software has a direct bearing on the quality of the product. During the…
A: With regards to software testing strategies, they are numerous strategies or methodology that are…
Q: Prove by induction that fib(0)+fib(1)+…+fib(n) = fib(n+2)-1, fib(0)=0 fib(1)=1
A: Fibonacci numbersThere is a close connection between induction and recursive definitions: induction…
Q: Which phase of compilation make up the compiler front end? Why is there a distinction between the…
A: The component sections are grouped at the end and back end.The front section or the front end…
Q: Explain the following transition, (a) Blocked >Blocked/Suspended (b) Blocked/Suspended…
A: Answer: Process is an active system. It can also be referred to as a sub-implementation program. It…
Q: t states. Thnis is sometning that you whether or not it is possible to util you have the skills…
A: According to the information given:- We have to define whether or not it is possible to utilize this…
Q: x is regulated by a tok Mbps. Token bucket i zion taken by the noc
A:
Q: Please implement an constructor of the class CPlusPlus. The constructor has one string as a…
A: The following is the completed C++ program: #include <iostream> using namespace std; class…
Q: Is it essential for a control structure to have a number of different entries? Why?
A: Given: Control structures safeguard communities from floods by reducing stormwater flow rates, which…
Q: What are the four most important characteristics to look for in a software developer? Describe how…
A: Introduction: We must demonstrate the four most important attributes to seek for in a software…
Q: How are centralized and parallel/distributed databases different?
A: Difference between centralized database and distributed database: 1. In centralized database the…
Q: puter network really works. Is it feasible to make a list of all of the parts that make up the…
A: A computer network is a bunch of computers sharing assets situated on or given by network nodes. The…
Q: Describe benefits of REST over SOAP.
A: Introduction: A set of rules that allow two or more entities in a communications system to send data…
Q: Linux and UNIX are both operating systems that are driven by command lines, but they also provide…
A: Define: We shall examine Linux and UNIX operating systems in the provided situation.
Q: is structured progra
A: structured programing is a programming development technique where certain hierarchy need to be…
Q: Please create an object of CPlusPlus. The object name is myObject. class CPlusPlus { int n; }; int…
A: answer is
Q: The study of communication offers a number of advantages. Describe the ways in which you may benefit…
A: There are several benefits to learning communication. Describe how these advantages pertain to you.…
Q: In addition, the reasons why EDA could be more effective than hypothesis testing when it comes to…
A: An examination of a hypothesis would contain a description of the specifics of the research that is…
Q: Give an overview of the many different methods that may be used to acquire software. These methods…
A: To be determine: Explain the different ways to get software, such as traditional and web-based…
Q: らc nimzH
A: Below I have provided the solution :
Q: abC or iatl liik>o and iej
A: The solution to the above CFG is
Q: Most common media player VLC stands for video client.
A: Media Player: A media player is a software application or hardware device that can play a media file…
Q: _NUM PROD_NUM SALE_DATE PROD_LABEL VEND_NAME CODE SOLD PRICE AA-E3422QW 15-JAN-2016 Rotary sander…
A:
Q: implementation project and the infrastructure implementation project. What are the most significant…
A: work breakdown structure (WBS) A work breakdown structure (WBS) is a visual, hierarchical and…
Q: What applications, devices, and gadgets are part of the IOT around you? What are you doing with it?…
A: Introduction: Here, we must explain which applications and devices/gadgets are considered part of…
Q: FIGURE P2.15 The Crow's Foot ERD for Problem 19 PUBLISHER BOOK publishes sub mits wrtes キ CONTRACT…
A: The answer for the following question is as follows
Q: The DDOS attack on Dyn was a series of distributed denial- of-service attacks (DDOS attacks) on…
A: prevent chances of DDos by the following ways - 1. Prepare a DDoS attack response strategy - a…
Q: What are your thoughts on email? How does an email get from point A to point B? Note your…
A: According to this definition, a mental model is an intuitive impression that a user has or develops…
Q: Is it an explanation of how computers work? Then you may talk about computer components.
A: Intro How does a computer work? A computer is a machine that runs software programs. The software…
Q: What would the business case for migrating to the cloud look like?
A: Introduction: We are ultimately driving an expression of ROI when we construct a business case. And,…
Q: What is the distinction between a dedicated and a non-dedicated server?
A:
Q: Do you have any idea what the four most important features are when it comes to developing software?…
A: 1) Enthusiastic: A software engineer must be passionate. Or another worker. Every team member must…
Q: What does the operating system of a computer do? Identify some roles that this critical piece of…
A: Intro The operating system (OS) provides a common set of services and ways for accessing the…
Q: What is the default location for the ISO file when it is made automatically?
A: Introduction: ISO files is additionally known as ISO image. ISO images are utilized for…
Q: Using arrays, write a C++ program that will let a user input the array size (how many elements).…
A: The required code in C++ is : #include <iostream>using namespace std;void sum(int a[],int n){…
Q: What advantages does a binary search tree have over other data structures, such as a linked list or…
A: the complete solution is given below:-
Step by step
Solved in 2 steps with 1 images
- COMPLETE THE JAVA CODE BELOWSEE ATTACHED PHOTO FOR THE PROBLEM AND THE OUTPUT class Employee extends Person { private String companyName; public Employee(String name,String address,int age,String companyName) { super(name,address,age); this.companyName = companyName; } public Employee() { } public void setCompanyName(String cname){ companyName = cname; } public String getCompanyName(){ return companyName; } // Override the display method in the Person class // define earnings as an abstract method with a return type of double // override the toString() and equals() methods } class HourlyEmployee extends Employee{ private int hoursWorked; //total number of hours worked private double rate; // rate per hour public HourlyEmployee(String name,String address,int age,String cName,int hoursWorked,double rate) { } public HourlyEmployee(String name,String address,int age,String cName)…In Java Program - Encapsulation Write a class Animal with the following attributes: name, age, height and weightProvide constructors: (1)initialize all attributes and (2) initialize all attributes except age with default to 1 (3) default constructorEncapsulate the attributesOverride the toString to output in this manner: (name,age,height,weight)MUST BE IN ONE JAVA FILE Write a Java program A4p1.java with a public class A4p1 and no named packages to read from stdin information for several singers and dancers. You can try with the following design choices: design an abstract superclass Person with appropriate constructor(s) to initialize member variables such as name (of type String), sex (of type String), age (of type int), rank (of type int); design an interface Honorable with one method HowToHonor (of return type String); the Person class can have an abstract method HowToPerform (of return type String) and implement the Comparable interface; design two additional non-abstract subclasses Singer and Dancer of the Person class with appropriate constructor(s) and let them implement the Honorable interface. You can override the toString method of these three classes to provide a suitable string representation for objects of these classes. Put all classes and interfaces in the same file. A sample run can look like the following…
- Write a Java class called HotelRoom that represents a hotel room. The class will contain the following attributes: •RoomNo (int) •PhoneNumber (string) •Capacity (int) – Number of people that room can accommodate. •Grade (int) – Grade of room ranging 1-5, 5 being most valuable. Your class should have a constructor that takes a single parameter: RoomNo. The necessary accessors (i.e. get methods) and mutators (i.e. set methods) for class variables: Room number only accessor Phone number both mutator and accessor Capacity both mutator and accessor Grade both mutator and accessor 2.Write a Java class called Hotel that represents a hotel. The class will contain the following attributes: •Name (string) •ReceptionPhone (string) •RoomList (ArrayList of HotelRoom's) hotel class should have a constructor that takes two parameters: Hotel name and reception phone. The necessary accessors (i.e. get methods) and mutators (i.e. set methods) for class variables: Hotel name only accessor Reception phone…Code in Java Define a class named MobilePhone with the attributes brand name, model, color and price. Define 3 constructors - the first one is the default constructor, the second one initializes all data members and the third one gives an initial value to the brand name Apple, model iPhone XR and price to 54250 while allowing color to be initialized by the user. Also, write a display method that prints in this manner: Brand: Samsung Model: S10 Color: Black Price: 53300.0 Write a method updatePrice that updates the price of the mobile phone. The method accepts a price. If the value of the price is negative the price must be deducted with the value. But if positive price must be added with the value. It will not allow update of price if will result to a negative value for price. For example: Test Result MobilePhone phone = new MobilePhone("Samsung", "S10", "Black", 53300.00); phone.display(); Brand: Samsung Model: S10 Color: Black Price: 53300.0…Java program requirements:- a PesoCurrency class with an amount attribute.- Define an overloaded convertTo method that will convert amount attribute to dollars and euros.- Conversion: 1 dollar = 50 pesos while 10 dollars = 2 euros.- Implement the class to ask the user an amount in peso to convert and will display the dollar and euro equivalent of the inputted peso amount.
- Write a Java class Author with following features: Instance variables:o firstName for the author’s first name of type String.o lastName for the author’s last name of type String. Constructor:o public Author (String firstName, String lastName): A constructor withparameters, it creates the Author object by setting the two fields to the passedvalues. Instance methods:o public void setFirstName (String firstName): Used to set the first name of author.o public void setLastName (String lastName): Used to set the last name of author.o public double getFirstName(): This method returns the first name of the author.o public double getLastName(): This method returns the last name of the author.o public void print(): This method printed out author’s complete name to thescreenGiven the main class Dog.java and the following subclass Poodle.java:Instructions for Poodle.java: Variables: Double whiskerLength – the length of the dog’s longest whisker in inches An invalid value should default this field to 8.0. A value is invalid if it is not a number, infinite, nonpositive, or null. Constructors: A constructor that takes in name, length, weight, and whiskerLength. A constructor that takes in no parameters and sets name to “Bluu”, length to 52.0, weight to 720.0, and whiskerLength to 5.0. A copy constructor that deep copies all necessary instance fields. Methods: isHairy Returns a boolean reflecting if the dog is hairy. A dog is said to be hairy if its longest whisker is longer than its end-to-end length. toString Overrides the corresponding method in its super class, such that a String with the following format is returned without trailing or leading whitespace. “I’m a talking dog named <name>. My length is <feet> ft <inches>…Hand-write a complete Java class that can be usedto create a Car object as described below.a. A Vehicle has-a:i. Registration numberii. Owner nameiii. Priceiv. Year manufacturedb. Add all instance variablesc. The class must have getters and setters for all instance variablesd. The class must have two constructors, a no-args and a constructor that receivesinput parameters for each instance variable.
- In Java code: Write the class encapsulating the concept of money, assuming that money has the following attributes: dollars, cents In addition to the constructors, the accessors and mutators, write the following methods: public Money() public Money(int dollars, int cents) public Money add(Money m) public Money substract(Money m) public Money multiply(int m) public static Money[] multiply(Money[] moneys, int amt) public boolean equals(Money money) public String toString() private void normalize() // normalize dollars and cents field Add additional helper methods if necessary. Use the following test driver program to test your Money class: public class MoneyTester{public static void main(String[] args){Money m1 = new Money(8, 75); // set dollars to 8 and cents to 75Money m2 = new Money(5, 80); // set dollars to 5 and cents to 80 MoneyMoney m3 = new Money(); // initialize dollars to 0 and cents to 0System.out.println("\tJane Doe " + "CIS35A Spring 2021 Lab 4"); // useyour…Please write the Java code for a Phone class that represents a mobile phone, as detailed below: It should have instance variables (attributes) for make, model, color (all stored as Strings) and capacity (stored as int: the storage capacity in GB) Please define one constructor with parameters for all those attributes. The Phone class will be immutable, except its storage capacity can be changed. So please write only one mutator method, called .setCapacity. Please write accessor methods for each instance variable. Please write a .toString() method to display all the Phone's information. Please write a .equals method to compare two Phone objects, returning true if all their attributes are the same. Finish the Jave program to show the outputs bellow: Code: class Main { public static void main(String[] args) { Phone craigPhone, bettoPhone, tobyPhone; craigPhone = new Phone("Samsung", "Galaxy S21 5G", "Phantom Violet", 256); bettoPhone = new Phone("Apple", "iPhone 13 Pro",…Write a java program to create a class Employee which contains member variables as name (String object)empid (Integer object)salary (Float object)age (Integer object)Define a default as well as a parameterized constructor to initialize member variables with default and specified values respectively. Define and overload a method search as defined below boolean search (Employee e[ ], String name) To search an employee with name in an array of employee objects, if found return true, else false.boolean search (Employee e[ ], Integer empid) To search an employee with the empid in an array of employee objects, if found return true, else false.Also define another method to get the name of employee having highest salary in a set of employees. String getHighestSalary(Employee e[ ]) To return the name of the employee with highest salary in an array of employee objects.Input: At least 3 employee details like name, empid, salary and age.Name of employee to searchId of employee to searchOutput:…