Write a class called Name that has one instance variable to store the full name of a person. A name can have multiple words, separated by single spaces. The only non-letter characters in a name will be spaces or -. The class has one constructor that takes a parameter to initialize the instance variable. However, the parameter string could have spaces at either ends and the constructor must trim the extra spaces before assigning it to the instance variable. The class has the following methods.
Q: Let G be a directed graph with positive and negative weights. It is known that the shortest paths fr...
A: The algorithm is Bellman- ford.Time complexity is O(ne ),Where n is number of node ,e is number of e...
Q: H.W: Given the following matrices, please solve the questions below and if you can't solve the probl...
A:
Q: Identify two possible scenarios each under which an active or passive attack can occur to the user o...
A: We will understand what is active and passive attacks How we can prevent these attacks ? We will lo...
Q: What is the role of current technology in effective communication and how is it used?
A: Introduction Communication is the most important expect of human life. To generate, pass and organiz...
Q: What actions should Equifax have taken to prevent and handle the breaches? Provide specific examples...
A: When it comes to incident response, it isn't all about forensics and technology. Solution providers ...
Q: What do you mean by subnet mask?
A: IP Address: Ip address stands for Internet Protocol address. An IP address is a unique number provid...
Q: What is the name of the configuration file that includes the systemd-journald service's configuratio...
A: Introduction: systemd-journald is a system service that gathers and saves logging information. It ge...
Q: Explain briefly the controls you would consider for protecting the organization's network against cy...
A: Introduction Protection of organization network against cyber threats. Day in and day out we rec...
Q: Write a program in C-language that will accept any positive number and will count down to 1, startin...
A: #include <stdio.h> int main(){ unsigned int n; unsigned int i; printf("Input a number...
Q: (a) Compare and contrast structured design methodologies in general with rapid application developme...
A: A) Strategic Design Methods:- Systematic steps, step by step- The project goes in stages in a system...
Q: Instructions Write a C++ code based on the Sample Dialog Validate input. Offer to "Try Again". Uploa...
A: Step-1: StartStep-2: Declare a char variable ch and assign with yStep-3: Print message "------------...
Q: Give a (complete) pseudocode algorithm for an in-place Quicksort in which the pivot is chosen by tak...
A: Quicksort is basically a divide and conquer algorithm. It works based on the pivot element and the p...
Q: For database experts, normalization is a critical topic. It is useful for creating, scenario verific...
A: Introduction Normalization is the process of organizing data in a database that includes creating t...
Q: 23 ___ 2 == 5 Which operator would make this expression true?
A: 23 can be written as 00010111. The Right Shift Operator shifts the bits of the number towards right ...
Q: Write a program in C-language that will accept any positive number and will count down to 1, startin...
A: #include <stdio.h> int main() { int n; //take input from user printf("Input a number:...
Q: X X + 1 What is the value of result after the code segment is executed? a. с. 15 b. 10 d. 21 11
A: For the given code, the steps result=result+X and x=x+1 will execute till the condition x>5 holds...
Q: Discuss in depth any two Artificial Intelligence application areas.
A: Artificial Intelligence Artificial Intelligence (AI) is a type of computer intelligence that mimics...
Q: Celsius Temperature Table - prog 6 pg 291 * formula for fahrenheit to celsius is c = 5/9(f-32) *...
A: I give the code in java along with output and code screenshot
Q: Answer how we could reduce Common Subsequence to Edit Distance in poly time?
A: Explanation The long common subsequence and edit distance are usually in the middle of the most imp...
Q: Which CPU component is presently processing data? register ALU cache in RAM
A: Introduction RAM is the computer's electronic memory. RAM helps to make a computer fast. The term ...
Q: Part 2: [2 A U-N flip-flip works as follows: UN=00 the next state of the flip-flop is 1. UN=01 the n...
A: a. From given data, table will be as below: Present State Q Next State Q+ U N 0 0 1 1 0 1...
Q: Compute the least-squares regression line for predicting the diastolic pressure from the systalic pr...
A: Here i am write the concept how to find the value of y in linear regression : ======================...
Q: >> a=[1;4;7]l; b=[2;-1;5]; >> c=dot (a,b) C = 33 >> d=cross (a, b) d = 27 6. -9 > x=a;y=Db'3; >> z=d...
A: Since you took transpose of a and b as x and y ,hence cross product is also transpose. But as dot pr...
Q: Explain how creating a wireless network might be beneficial in the event of a catastrophe recovery.
A: Intro A network disaster recovery plan is a set of procedures designed to prepare an organization to...
Q: PYTHON!! Solve pro blem by using PYTHON Program to remove the ith occurrence of the given word in li...
A: To write python code to remove the ith occurrence of the given word in list where words can repeat.
Q: ompeting demands for resources cause all deadlocks.
A: Introduction: A deadlock is a stalemate that arises when many processes compete for the same resourc...
Q: 28. In a linear linked list, a. the next pointer of each node has the value NULL b. the last node po...
A: Introduction to Linear Linked List: Linear Linked list is the default linked list and a linear data ...
Q: Q: Write a program in Q and print the the numbe matrix (as shown below of the first three numhe
A: given - Q: Write a program in Qbasic language to readand print the the numbers of the one dimensiona...
Q: Identify and explain the five features of an algorithm.
A: Introduction The following are the features of a good algorithm: Precision: a good algorithm must ...
Q: Explain the vulnerabilities that lead to successful reflection attacks and what methods can be appli...
A: The vulnerabilities that lead to successful reflection attacks and methods can be applied to prevent...
Q: Explain the relational database paradigm, as well as the logical and physical design concerns for da...
A: Introduction: While designing a logical database, consider the following factors: minimum redundancy...
Q: One of the benefits of a Hadoop installation is the high level of compute redundancy. Why is this so...
A: Introduction: One of the benefits of a Hadoop installation is the high level of compute redundancy. ...
Q: a. Write a python program that writes data to a file. The data consists of a series of records, each...
A: a) Create a file say 'file1.txt' to which program writes data. Python program that writes data to fi...
Q: Are these 8-bits a signed or unsigned value: 10101101 Yes, the most significant bit is a 1 so the nu...
A: Signed numbers contain sign flag, this representation distinguish positive and negative number. Beca...
Q: 1. Solve T(n) - k T(n/3) + n where T(1) - 0. Note your solution will be a function of k. You need to...
A: Given questions are not interlinked. So, as per our guidelines only one question will be answered. S...
Q: 1a) Pick any commercial CPUs available in state-of-the-art and identify their multilevel caches and ...
A: A central processing unit also know as central processor, the main processor is the electronic cir...
Q: What was the motivation behind the development of computer programming languages?
A: Introduction: Language for showing a precise set of digital computer commands, such as computer prog...
Q: ii) In JAVA language input the elements of an integer array A of size 10 and find the count of all h...
A: Required:- ii) In JAVA language input the elements of an integer array A of size 10 and find the cou...
Q: In terms of applications, distinguish between Web 1.0, Web 2.0, and Web 3.0.
A: Web 1.0It is the “readable” phrase of the World Wide Web with flat data. In Web 1.0, there is only l...
Q: Network maintenance is an important task in organizations today who entirely rely on their network i...
A: In the third раrty mаintenаnсe (TРM) industry, netwоrk mаintenаnсe is essentiаlly whаt y...
Q: Identify and briefly evaluate the benefits and drawbacks of solid-state secondary storage devices vs...
A: Introduction Solid-state secondary storage devices: Advantages of SSDs: Speed: Primary benefit of s...
Q: Which tools and applications will be needed to set up GitHub on your own machine?
A: Intro GitHub: GitHub is a Microsoft-owned distributed version control system. GitHub provides bot...
Q: Which of these are predefined JavaScript objects? O document O browser O window O htmlDocument O nav...
A: answer is
Q: Describe how the three characteristics of big data are related to data collected by healthcare provi...
A: Introduction: The first stage is to acquire big data, which can come from a variety of sources, incl...
Q: What are some popular CLI troubleshooting commands for diagnosing and resolving network issues?
A: Sometimes, time out, long buffering, bad online call quality, etc. commonly exist in any user's syst...
Q: 1. Many companies pay time-and-a-half for any hours worked above 40 in a given week. Write a program...
A: PROGRAM INTRODUCTION: Take the number of hours from the user. Convert the number of hours into floa...
Q: Describe the requirements elicitation issues.
A: Introduction Actually, given the question regarding requirements elicitation.
Q: hen we use the new operator to produce a String, where does it go? a. Stack b. String storage c...
A: Introduction: When we use the new operator to generate a String, the Java compiler will construct a ...
Q: MBRs
A: According to the question we need to answer: Given two MBRs (R,S) provide conditions to test Overl...
Q: What are the most pressing IT security challenges confronting businesses today? Have these altered i...
A: IT security threats The first threat is exploitation in which attackers steals important trade secr...
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- C# languageCreate a class for “Plane” having functionalities (methods) startengine(), fly() and land(). When ever engine starts it should reset the attribute TTK (Total travel kilometer) to zero and attribute Fuel to 100. On fly() it should add 10 kilometers if the Fuel attribute is greater than zero and decrement Fuel by 20.On land() it should print total distance covered. Write the code providing all necessary details. And then show working object of Plane in main().1. Employee Class Write a class named Employee that has the following fields: name. The name field references a String object that holds the employee's name. •idNumber. The idNumber is an int variable that holds the employee's ID number. • department. The department field references a string object that holds the name of the department where the employee works. • position. The position field references a string object that holds the employee's job title. The class should have the following constructors: • A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name, employee's ID number, department, and position. • A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name and ID number. The department and position fields should be assigned an empty string ("*). • A no-arg constructor that assigns empty strings ("") to the name, department, and position fields, and…INVENTORY CLASS You need to create an Inventory class containing the private data fields, as well as the methods for the Inventory class (object). Be sure your Inventory class defines the private data fields, at least one constructor, accessor and mutator methods, method overloading (to handle the data coming into the Inventory class as either a String and/or int/float), as well as all of the methods (methods to calculate) to manipulate the Inventory class (object). The data fields in the Inventory class include the inventory product number (int), inventory product description (String), inventory product price (float), inventory quantity on hand (int), inventory quantity on order (int), and inventory quantity sold (int). The Inventory class (java file) should also contain all of the static data fields, as well as static methods to handle the logic in counting all of the objects processed (counter), as well as totals (accumulators) for the total product inventory and the total product…
- 1. Part 1: A point in the x-y plane is represented by its x-coordinate and y-coordinate. Design the class Point that can store and process a point in the x-y plane. Your class should contains the following methods. Default constructor without parameters that initializes the private data member to the suitable values Constructor with parameters sets the values of the instance variables to the values of the parameter. Accessor methods that return the values of the x-axis and y-axis. setPoint method which set the values of x-axis and y-axis makeCopy method that make a copy of a received object of type Point. getCopy method that returns a copy of the current object toString method that returns the object string isEqual that returns true if the current object is equal to the received object of type point distance, which receives two objects of type Point and returns the distanceRetailItem Class Write a class named RetailItem that holds data about an item in a retail store. The class should have the following fields: description. The description field references a string object that holds a brief description of the item. • unitsonHand. The unitsOnHand field is an int variable that holds che number of units currently in inventory. price. The price field is a double that holds the item's retail price. Write a constructor that accepts arguments for each field, appropriate mutator methods that store values in these fields, and accessor methods that return the values in these fields. Once you have written the class, write a separate program that creates three RetaillItem objects and stores the following data in them: Description Units on Hand Price Item #1 Jacket 12 59.95 Item #2 Designer Jeans 40 34.95 Irem #3 Shirt 20 24.951. Employee Class Write a class named Employee that has the following fields: • name. The name field references a String object that holds the employee's name. • idNumber. The idNumber is an int variable that holds the employee's ID number • department. The department field references a String object that holds the no of the department where the employee works. • position. The position field references a String object that holds the employee's job title. The class should have the following constructors: • A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name, employee's ID number, department, and position. • A constructor that accepts the following values as arguments and assigns them to the appropriate fields: employee's name and ID number. The department and position fields should be assigned an empty string (""). • A no-arg constructor that assigns empty strings ("") to the name, department, and position fields, and…
- The reference this can be used to refer to an object or to invoke another constructor of the same class. True Falsearrow_back Starting Out With Visual C# (5th Edition) 5th Edition Chapter 11, Problem 1PP arrow_back_ios PREVIOUS NEXT arrow_forward_ios Question share_out_linedSHARE SOLUTION Chapter 11, Problem 1PP Program Plan Intro Employee and ProductionWorker Classes Program plan: Design the form: Place a three text boxes control on the form, and change its name and properties to get the employee name, number, and hourly pay rate from the user. Place a four label boxes control on the form, and change its name and properties. Place a two radio buttons control on the form, and change its name and properties. Place a one group box control on the form, and change its name and properties. Place a command button on the form, and change its name and properties to retrieve the object properties and then display the values into label box. In code window, write the code: Program.cs: Include the required libraries. Define the namespace “Program11_1”. Define a class “Program”. Define a constructor for the…IN C++ Write a class named Employee that has the following member variables: name. A string that holds the employee’s name.idNumber. An int variable that holds the employee’s ID number.department. A string that holds the name of the department where the employee works.position. A string that holds the employee’s job title. The class should have the following constructors: A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: employee’s name, employee’s ID number, department, and position. A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: employee’s name and ID number. The department and position fields should be assigned an empty string (""). A default constructor that assigns empty strings ("") to the name, department, and position member variables, and 0 to the idNumber member variable. Write appropriate mutator functions that store values in these member…
- Object Oriented Programming in JAVA You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is…2. Car Class Write a class named car that has the following fields: ▪ yearModel. The year Model field is an int that holds the car's year model. ▪ make. The make field is a String object that holds the make of the car, such as "Ford", "Chevrolet", "Honda", etc. ▪ speed. The speed field is an int that holds the car's current speed. In addition, the class should have the following methods. ■ Constructor. The constructor should accept the car's year model and make as arguments. These values should be assigned to the object's year Model and make fields. The constructor should also assign 0 to the speed field.Temp Class - Create Temp class whos job is to hold a temp in degrees F and gives methods to get the temp in F, Celsius, and Kelvin. The class should follow the instance variable (field): ftemp (double type that holds F temp)Follow these methods with the class.. Constructor --Will accept Fahrenheit temperature as a double to store it in the ftemp field. setFahrenheit - The setFahrenheit method accepts a Ftemperature as a doubleto stores it in the ftemp field. getFahrenheit - Returns the value of the ftemp field, as a Fahrenheit temperature (no conversion required). getCelsius - Returns the value of the ftemp field converted to Celsius. [C e l s i u s = ( 5.0 / 9.0 ) × ( F a h r e n h e i t − 32 )] getKelvin - Returns the value of the ftemp field converted to Kelvin. [K e l v i n = ( ( 5.0 / 9.0 ) × ( F a h r e n h e i t − 32 ) ) + 273] Exemplify the temp class by writing a (test) program that is separate and promotes users for an F Fahrenheit temp. The program must create an…