Create a class named Book that contains data fields for the title, author and number of pages. Include get and set methods for these fields. Create a constructor that sets the book title to "Java book", author to "Deitel" and number of pages to 160. Create a subclass named Textbook, which contains an additional field that holds a grade level for the Textbook and additional methods to get and set the grade level field. 4 Create a subclass named Report which contains two additional fields for publication year and topic as well as methods to get and set the publication year and topic.
Q: How would you turn your title block into a block? Why?
A: A blockchain is a border drawing embedded as an AutoCAD block in another drawing. The block utility…
Q: Trainers at Tom's Athletic Club are encouraged to enroll new members. Write an application that…
A: As Language is not provided , doing it in Java Programming Language.
Q: Name the three categories of crimes against the corporation and describe each. Provide an example…
A: The question instructs to mention the three categories of crimes against corporate and describe each…
Q: List out any two practical examples of Closed-loop control systems and explain anyone in detail with…
A: Solution:: Practical examples of Closed-loop control systems in (happening or viewable…
Q: Determine the three most common challenges faced with concurrent transaction processing. In your…
A: Intro Controlling concurrency: Concurrency control is the practice of coordinating the simultaneous…
Q: How does EnCase verify the contents of an evidence file, using the default settings? EnCase…
A: EnCase is used to find some evidence from the damaged (seized) hard drive by creating an evidence…
Q: DMA access to main memory is prioritized above processor access to main memory in almost all systems…
A: DMA is Direct memory access, it is a feature of computer systems. It allows some hardware subsystems…
Q: Examples are a great tool to use when trying to explain something. In order to do network analysis,…
A: An organized method for illustrating the flow of communications, information, and decisions inside…
Q: Description: For this assignment, you will create a function to calculate the maximum length of the…
A: Sum of two sides of a triangle is equal to the third side. Given in questions that Maximum length f…
Q: Construct a truth table to prove if the argument is valid or invalid. The argument is Ovalid invalid…
A: AND -- True if both the inputs are true. OR -- True if any one of the input is true. NOT -- invert…
Q: The simplest format or representation modification to the most complex data integration procedure…
A: Introduction: Data transformation is the process of converting one data form to another so that…
Q: Do you think it's ethical for app developers to ask for your personal information in return for…
A: Introduction: With the help of software, computers are now capable of doing a wide range of jobs.…
Q: Showcase the server operating systems that are today the most extensively utilised.
A: Intro I'll answer about a Server Operating System, albeit there are several varieties. 2021:…
Q: Companies like Amazon and Facebook and Google are so dominant that they really have very little…
A: Employees are said to be truly motivated to achieve their goals via healthy competition in the…
Q: Write the Fibonacci Function program with: Recursive and iterative method respectively using the…
A:
Q: What does FFT, RSS, and THD mean?
A: FFT (Fast Fourier Transform): A fast Fourier transform (FFT) is a calculation that processes the…
Q: Write a Java program to read the value of a double variable z and print the value of 2³-12z² + 5z +…
A: Start Take input as z value Compute z3 - 12z2 + 5z + 6 Print result Stop
Q: wrire a select statement to select year and the total numbers of the movie that year by using…
A: Answer starts from step 2
Q: 1-How can the CPU recognize the device requesting an interrupt? 2-Since different devices are likely…
A: INTRODUCTION An interrupt is an interconnection that is shipped off the processor that interrupts…
Q: It is possible that the use of data analytics may help to modernise the technologies that are used…
A: Beginning: The Many Benefits That Data Analytics Can Bring To The Field Of Aircraft Maintenance…
Q: looking at adding some other mathematical formulas to our calculator, crat the code th determine the…
A: A triangle is shape of geometry of polygon in which three vertices and edges join to make a…
Q: ts Question 6 Which of the following statements describes an abstraction? O Hiding the…
A:
Q: Write a program that: reads a double from user input casts the double value to an int prints the…
A: Java Programming is the object oriented programming languages. The code created can be used by an…
Q: It may be useful to characterise a recent security breach involving access control or…
A: Intro A "security breach" is any occurrence that results in unauthorized access to computer data,…
Q: What are some examples of the many categories of issues that simulation models might be used to…
A: Introduction Simulation modelling: Simulation modelling is the process of creating and analyzing a…
Q: What is the origin of the file space's hierarchical structure?
A: Introduction: Hierarchy must be built in the file space here.
Q: Create a user based 9 x 9 sudoku game using C Language with multidimensional array
A: Lets see the program in the next steps
Q: In what ways are the two disciplines distinct from one another? For example, when it comes to the…
A: Starting, planning, overseeing, and regulating the activities necessary to fulfil the project's…
Q: Which of the following is a Dword? fe de fe af 12 0001 0101 1010 0111 112
A: First lets understand what is a dword: it is a un signed integer of 32 bits now lets analyse each…
Q: Determine the time complexity function of the program snippet below, int f1(int n) { if (n = 1)…
A: A) Let the original time complexity be T(n) Here recursion is used where in each iteration we reduce…
Q: In the future, what role will machine learning play? What artificial intelligence applications are…
A: Introduction: In the manufacturing business, machine learning techniques may be used to monitor…
Q: Find a closed form representation for the function defined recursively by f(0) = 5 and…
A: We have to find the solution of the given recurrence relation and prove the solution using induction…
Q: List out the benefits of biometric authentication?
A: Introduction Biometric identification: It is used to authenticate a person by using physical…
Q: - For the given IP address 196.62.146.174/25, answer the following questions: Subnet Mask Number of…
A: The answer is..
Q: Consider the LFSR represented by the polynomial x4 + x² + x + 1. What are the tap bits of the LFSR?…
A: LFSR is a Linear Feedback Shift Register. Its input bits are usually driven by the XOR gates. In…
Q: The spectrum of realities enable users to have different experience of interactions that consist of…
A: Augmented reality is the one surrounded by digital elements in a live view. For instance, GPS has…
Q: PROBLEM 9 The Darby Company manufactures and distributes meters used to measure electric power…
A: Answer: We have explain in more details in step by step in a simple way
Q: Determine the time complexity function of the program snippet below, int f1(int n) { if (n = 1)…
A: The given C program is: int f1(int n) { if (n <= 1) return n; return 2*f1(n/2); } int…
Q: So, in a telecommunications network, what precisely is a protocol and how does it work?
A: Definition: A communication protocol is a system of rules that allows two or more entities of a…
Q: Complete the logical proof for the following argument. (pvr) q 9-1 r :.t Step 1 2 3 4 5 6…
A: The answer is given below
Q: Q2. For the purpose of merge sorting, separate T[1..n] into three arrays of sizes as equal as…
A: A typical merge sort algorithm divides an array in half continuously until it can no longer be…
Q: MCQ3102: The physical layer is concerned with the movement of which of the following over the…
A: This mcq is related to physical layers.
Q: What precisely do you mean by software engineering, and why do you think it should be used while…
A: Intro Software engineering is the application of engineering principles to the design, development,…
Q: Conduct in-depth examination of the properties of enormous volumes of data, and classify the…
A: Given: Think about big data's properties and how various data kinds are defined in terms of data…
Q: Modify the program from Project 4 to compute the area of a triangle. Issue the appropriate prompts…
A: As language is not specified, doing it in C Programming as well as in Java Language
Q: Assume you have access to your department's DNS servers' caches. How would you go about determining…
A: Introduction: A DNS server is a computer server that maintains a database of public IP addresses and…
Q: Find a piece of writing that describes how to use technologies that don't need you to use your hands…
A: The following states have passed legislation that makes it illegal for drivers to use hand-held…
Q: Ex. Calculate the PA for the follow assembly code which is assume the DS = 4500h, SS = 2000h, BX =…
A: The given code is: 01 org 100h02 MOV BX+20, AX03 MOV SI+10, AX04 MOV BP+2, AL04 ret It is given…
Q: Put your understanding of normative ethics to use by arguing either for or against allowing pupils…
A: Normative ethics: Normative ethics is a straightforward aspect of morals that provides us with a set…
Q: SHA-1 produces a ___ bit value. 64 128 160 254
A: Let us see the answer below.
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Step by step
Solved in 2 steps
- Using classes, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle a maximum of 500 entries. Define a class addressType that can store a street address, city, state, and ZIP code. Use the appropriate functions to print and store the address. Also, use constructors to automatically initialize the member variables. Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in this chapters Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables. Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process a maximum of 500 entries. The program should perform the following operations: Load the data into the address book from a disk. Sort the address book by last name. Search for a person by last name. Print the address, phone number, and date of birth (if it exists) of a given person. Print the names of the people whose birthdays are in a given month. Print the names of all the people between two last names. Depending on the users request, print the names of all family members, friends, or business associates.1. Create an interface OnlineQuiz with the following details: Member variables: totalMarks=10 Member Methods: · nQuestions(): An abstract method that calculates and return the number of questions. Defined in subclass. · display(): An abstract method that displays all details. Defined in a subclass. 2. Create a class Staff that inherits OnlineQuiz with the following details: Member variables: · staffD // id of the staff string type · staffName // Name of the staff string type · nMCQ // Number of MCQ type questions int type · nTF // Number of true/false type questions int type · nMatch // Number of match type questions int type Member Methods: · Define the parameterized constructor to set the member variables. · Define the method nQuestions(): which calculate and return the total number of questions. Total number of question= nMCQ + nTF +…Assignment - LocationsFor this assignment, we will be creating our location class and then a few locations to subclass from it. Most of these classes will be rather short so you can put them all in locations.py if you would likeCreate the Location classCreate the Town classCreate the Palace and Lumbermill classes Location ClassThe Location class establishes the basic properties of a location: manager - holds the character that manages the locationforeColor - holds the fore color of the locationbackColor - holds the back color of the locationEnter() - default method for entering a location. By default, the manager should greet you and all text displayed should use the foreColor and backColor of the location.Exit() - default method for leaving a location. By default, the manager should say bye to you and all text displayed should use the foreColor and backColor of the location.Upkeep() - default method that is called when time is advanced Town ClassThe Town class will inherit from the…
- JAVA PROGRAMMING: Lesson – Overloading Constructors Create a class named House that includes data fields for the number of occupants and the annual income as well as methods named setOccupants(), setIncome(), getOccupants() and getIncome() that set and return those values respectively. Additionally, create a constructor that requires no arguments and automatically sets the occupants field to 1 and income field to 0. Create an additional overloaded constructor . This constructor receives an integer argument and assigns the value to the occupants field. Create a third overloaded constructor this time, the constructor receives 2 arguments, the values of which are assigned to the occupants and income fields respectively. Create another class named I_house that instantiates the House class and see if the constructors work correctly.Question 6 Create a set of classes and interface for the following scenario: Define an interface called Classical Music, which contains a get Year method that returns the year the classical album released. Create an abstract class Called CD. This class contains the title as String, and playingTime as integer (e.g. 60 minutes). Include a constructor to initialize all the data fields. Create an abstract method called printPlayingTime to show the CD playing details. Make sure all the data fields can be accessed directly from the child classes. Create a class called Album that inherits from the CD and Classical Music. Include a data field called year as integer type. Create a constructor to initialize all the data members. Override the getYear method to return the released year. Override the printPlayingTime method. If the CD title is more than 10 characters, this method will print the first 10 characters, followed by the three ellipse dots and the playing time. For example: Thriller 60…Assignment 2 A Student class has the following attributes: String name; String streetAddress; int age; String phonNumber; String mobileNumber; Requirements: . Create the setters and getters . Create one default constructor • create one paramertized constructor • Create an object of the class using the default constructor . ● . Create another object of the class using the paramertized constructor Make sure to suply the values from the keyboard Print the information about each employee . Make sure to add comments to you code and that your code is indented corectly . Use the camelCase naming convension. . Use try and catch block. After you are doneo a samle run and tak a screenshot of it. zip the screenshot and the sourc code file and upload the zipped file to the Blackboard.
- Design a class named Employee. The class should keep the following information infields:• Employee name• Employee number in the format XXX-L, where each X is a digit within the range0-9 and the Lis aletter within the range A-M.• Hire date* Write one or more constructors and the appropriate accessor and mutator methods for theclass.Next, write a class named ProductionWorker that extends the Employee class. TheProductionWorker class should have fields to hold the following information:• Shift (an integer)• Hourly pay rate (a double)The workday is divided into two shifts: day and night. The shift field will be an integer valuerepresenting the shift that the employee works. The day shift is shift 1 and the night shift isshift 2. Write one or more constructors and the appropriate accessor and mutator methodsfor the class. Demonstrate the classes by writing a program that uses a ProductionWorkerobject. have to use beginner code because this is an intro class.Programming exercise (in java eclipse , please add comment for each step)thank you Create a class called "Bird" and do the following: 1)Define two data fields, 2)Define one default constructor 3)Define one constructor that takes two arguments 4) Define one method Inside the main() method, you have to create two objects for the class "Bird" one by using default constructor and another by using the constructor that takes two arguments. Also call the instance method inside the main() method (The class data fields and method should be meaningful clearly representing the entity 'Bird' . Do not define irrelevant data fields and method.)Create a class named Poem that contains the following fields: title - the name of the poem (of type String) lines - the number of lines in the poem (of type int) Include a constructor that requires values for both fields. Also include get methods to retrieve field values. Create three subclasses: Couplet, Limerick, and Haiku. The constructor for each subclass requires only a title; the lines field is set using a constant value. A couplet has two lines, a limerick has five lines, and a haiku has three lines. ***Can I also get an explaination for each step thank you so much for all of your help ^_^**** import java.util.*; public class DemoPoems { public static void main(String[] args) { Poem poem1 = new Poem("The Raven", 84); Couplet poem2 = new Couplet("True Wit"); Limerick poem3 = new Limerick("There was an Old Man with a Beard"); Haiku poem4 = new Haiku("The Wren"); display(poem1); display(poem2); display(poem3);…
- Create a class named Poem that contains the following fields: title - the name of the poem (of type String) lines - the number of lines in the poem (of type int) Include a constructor that requires values for both fields. Also include get methods to retrieve field values. Create three subclasses: Couplet, Limerick, and Haiku. The constructor for each subclass requires only a title; the lines field is set using a constant value. A couplet has two lines, a limerick has five lines, and a haiku has three lines. These are the provided classes and subclasses : public class Poem { // Define the Poem class here } public class Limerick { // Define the Limerick class here } public class Haiku { // Define the Haiku class here } public class Couplet { // Define the Couplet class here } import java.util.*; public class DemoPoems { publicstaticvoidmain(String[] args) { Poem poem1 =newPoem("The Raven",84); Couplet poem2 =newCouplet("True Wit"); Limerick poem3 =newLimerick("There was an…Design/code/test a Java program containing an abstract the class absWelcome. This class should contain: 1. A public abstract void method (you name it) that is empty 2. A public regular method (you name it) that prints "Welcome to " Next, create a subclass clsHello that extends absWelcome. This class should contain: • A public regular method (you name it) that prints "Java Programming" Finally, inside the Main class create an object (you name it) from the clsHello class. Use this new object reference to: 1. Output "Welcome to " from the abstract class 2. Output "Java Programming" from the subclass Your output should resemble that shown below >sh -c javac -classpath -type f-name '*.java') java -classpath :targe Welcome to Java ProgrammingClass: Square Create a class called "Square", which is inherited from“TwoDimensionShape” class. The "Square" class is used to calculate theArea and the Perimeter of square shapes when their side-length is given, or in contrast,finding the side-length of the square when the Area or the Perimeter of the square is given.The specifications of this class are below. Data Members (Attributes): All are private. sideLength: the sidelight (L) of the square. Methods/Operations/Getters/Setters: Default Constructor: when creating an object this constructor must set the side-length of the square by calling the method setSideLength(). Also, this constructor willcall the findArea() and the findPerimeter() in addition to summaryPrint() to calculateand print all needed information. User-Defined Constructor: when creating an object this constructor shouldfind the side-length of the square by calling the method findSquareSideLength()and pass the Area or the…