Write a class called Circle with the required constructor and methods to get the following output. Subtasks: 1. Create a class called Circle. 2. Create the required constructor. Use Encapsulation to protect the variables. Assign the variables in private] 3. Create getRadius() and setRadius() method to access variables. 4. Create a method called area to calculate the area of circles.
Q: 1.list at least 10 ways to protect your network from malicious and harmful attacks. 2.Based on your ...
A: Solution: The attacker tries to harm your personal as well as your company network, there are certai...
Q: How can we keep our data safe from cybercriminals?
A: How can we keep our data safe from cybercriminals?
Q: 1. Define a class Appointment that has three instance variables: Id (int), slotld (int) and isAvaila...
A: Define a class Appointment that has three instance variables: Id (int), slotld (int) and is Availabl...
Q: Do the follow by using jupyter notebook. Implement a function to solve the multilinear regression p...
A: Hey there, I am writing the required solution of the above stated question.Please do find the soluti...
Q: C++ codes for finding the surface area of cylinder
A: The surface area of cylinder is found by using formula S = 2πrh+2πr2 where r and h are the input rad...
Q: Which data-hiding tactics pose the most onerous challenges for law enforcement officials to overcome...
A: Each country establishes law enforcement agencies to prevent and reduce crime.
Q: Discuss the significance of indexing in relation to database implementation.
A: Significance of indexing in relation to database implementation Indexing helps to optimize the perfo...
Q: How can you avoid the four most typical types of database failure?
A: Introduction: According to this definition, a database failure is described as the system's inabilit...
Q: Express the following mathematical expression in MATLAB form: a. ln(2 + t + t2)
A: Introduction Express the following mathematical expression in MATLAB form:a. ln(2 + t + t2)
Q: a) Open a text file "input.txt" and read all characters into an array in memory. Limit the length of...
A: In this program we have to count the number of letters, digits and words from the saved text file in...
Q: Q2/ Find the derivative ( dt2 ) of the following functions using the Matlab program 1) f(t) = e3t co...
A: We need to write Matlab code for given functions.
Q: EMPNO ENAME JOB M...Y HIREDATE SAL t COMM DEPTNO 1 7521 WARD 2 7654 MARTIN SALESMAN 7698 28-SEP-81 1...
A: I have written the query below:
Q: Describe the essential structures that are employed in the organization of files in the operating sy...
A: We need to describe the essential structures that are employed in the organization of files in the o...
Q: Discuss how you would go about implementing the Boyer-Moore string search algorithm to conduct a str...
A: Solution:- In computer science, string/pattern searching is a significant problem. When someone trie...
Q: This program in C++ will obtain from the user a full name, a current annual salary, and a percent in...
A: The required code for the C++ program is coded using a for loop in the next step.
Q: What is a digital security risk, and what causes it? Explain in a few words two digital security iss...
A: The above question that is what is digital security risk and what causes it ? and also explain two d...
Q: Is there an output format supported by a S/PDIF port?
A: S/PDIF is an optical audio connection type that allows digital audio signals to be transferred from ...
Q: For systems with many processors to be able to share memory, the processors must be synchronized wit...
A: Introduction: On a multiprocessor system, each thread may run simultaneously on its processor. Appli...
Q: When it comes to cloud computing, for instance, what exactly is virtualization and how does it funct...
A: Answer :
Q: Write a program that reads a list of integers, and outputs whether the list contains all multiples o...
A: Hey there, I am writing the required solution of the above stated question.Please do find the soluti...
Q: given a file(use any text file) write MIPS instruction to count all words in that file. note: A si...
A: Creating a new variable to store the total number of words in the text file. And then open the text ...
Q: What are the different types of legacy systems and their evolution strategies?
A: A legacy system is outdated computing software and hardware that is still in use.
Q: Please elaborate on why the primary information systems are so important to the business. Security m...
A: A sophisticated information system stores the data in a database, which simplifies the process of re...
Q: Can you tell the difference between data definition commands, data manipulation commands, and data c...
A: Introduction: Recognize the differences between data definition, data manipulation, and management c...
Q: Many big corporations' database systems have been hacked, resulting in the theft of customer informa...
A: Introduction: The phrase "database security" refers to a collection of tools, rules, and processes f...
Q: Each of the following IP addresses belongs to a particular block. Find the first and last address an...
A:
Q: Discuss the functionality of Disk Provisioning Architecture in the Cloud computing model in detail. ...
A: Introduction Discuss the functionality of Disk Provisioning Architecture in the Cloud computing mo...
Q: make a dictionary where the keys are the numbers below 50 with EXACTLY two distinct prime factors an...
A: Use a function to check whether a number is prime or not Keep a list of all prime factors and if the...
Q: For each category of data owner, provide specifics on data security, data ownership types, and dutie...
A: Data security is the process of defending digital data against unauthorized access, corruption, or t...
Q: Q1/ Find the derivative () of the following functions using the Matlab dx program 1) f(x) = sin ( 6x...
A: Differentiate each term with respect to xx, then solve for f dfdx = -y sinxyx + 6 cos6xx - ...
Q: What is inheritance? State the different types of inheritance supported by java with example and rea...
A: Inheritance:Inheritance is a system of driving another class from a current class. The current (old)...
Q: Create a C# class called Matrix and have methods that can add,subtract,multiply, and inverse the mat...
A: Your C# program is given below as you required with an output.
Q: Create a POS System for a small business . Make it beautiful and simple. Creating a Simple POS progr...
A: DbConnection.java /* * To change this license header, choose License Headers in Project Properties. ...
Q: What database administration solutions are available for managing data integrity at the field level?
A: Introduction: The operations required to maintain and make a database accessible are referred to as ...
Q: PLease help to me to fix my code by following the sample output --- python code size = int(input("...
A: Given program is Taking size from user and creating two dimensional array of size with 0's Nex...
Q: I have started working on the changes below I do not know how to properly Implement them and I need ...
A: Hey there, I am writing the required solution of the above stated question.Please do find the soluti...
Q: Use a graphing utility or computer software program with matrix capabilities to write v as a linear ...
A: Since no programming language is mentioned, I am using Matlab. The logic behind code: We need to fin...
Q: Given: e-NFA M2 = ({A,B,C}, {0,1}, delta, A, {C}) where delta: (A,0) -> {C}, (A,1) -> {B}, (A,e) -...
A: We are given a e-NFA and we are going to convert it to its equivalent DFA. And then we will find out...
Q: List the genre name and count of all tracks in each genre, in descending order of track count (so th...
A: Hey there, I am writing the required solution of the above stated question.Please do find the soluti...
Q: What types of networks are employed in educational institutions? Explain why and how it differs from...
A: The Answer is in given below steps
Q: In a computer system, the bus is defined as a set of wires that are used to carry data from one loca...
A: let us see the answer:- INTRODUCTION:- In computer architecture, a bus is a communication system tha...
Q: Describe the security measures you're thinking about putting in place to guard against the specific ...
A: After we've identified a specific danger, we know there are a variety of techniques to assess securi...
Q: List at least 10 ways to protect your network from malicious and harmful attacks. Based on your OS, ...
A: Introduction: A good network security system helps business reduce the risk of falling victim of da...
Q: What are the five regions of databases where data security vulnerabilities are present?
A: Introduction: Database security refers to the many steps taken by businesses to secure their databas...
Q: Visual Basic Programming - Project #6 – Tuition Calculator
A: Windows Forms Application in Visual Basic is created with name TuitionCalculatorApplication. frmTuit...
Q: Develop a System Security Plan (SSP) using the sample provided in NIST SP 800-18 revision 1, Appendi...
A: Hey there, I am writing the required solution of the above stated question.Please do find the soluti...
Q: Is it possible that we are on the verge of witnessing a personal privacy crisis as the real and digi...
A: Introduction: Given: As the physical and digital worlds collide with intelligent technology, are we ...
Q: Express the following mathematical expression in MATLAB form: b. et(1 + cos(3t))
A: Given mathematical expression: et(1 + cos(3t))
Q: Define a function to find a given target value in an array, but use pointer notation rather than arr...
A: Define a function to find a given target value in an array, but use pointer notationrather than arra...
Q: Let there be a set P of ‘m’ integers. Let there be an integer ‘n’. Write a O(mlogm) time algorithm w...
A: CPP Code: #include <iostream> using namespace std; int main(){ int m=8,n=11,stop=0,present=...
Step by step
Solved in 2 steps with 1 images
- (The Rectangle class) Following the example of the Circle class in Section 8.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 andheight of the rectangle. The default 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 and then implement the class. Write a testprogram that creates two Rectangle objects—one with width 4 and height 40and the other with width 3.5 and height 35.9. Display the width, height, area,and perimeter of each rectangle in this order.Write a program in BlueJ using the_following hints. 1. Create a class named Book and declare the fields author , title and pages with suitable field types . 2. Declare the constructor and initialize the fields author and title with the assigned constructor parameter . 3. Name the constructor parameter as your own . 4. Add two accessor methods to the class getAuthor , getTitle and getPages — that return the author and title fields as their respective results . Add mutator method to change the pages of the Book class . 5. Add two methods , printAuthor and printTitle , to this Book class project . These should print the author and title fields , respectively , to the terminal window .Write a program in BlueJ using the following hints. 1. Create a class named Book and declare the fields author, title and pages with suitable field types. 2. Declare the constructor and initialize the fields author and title with the assigned constructor parameter. 3. Name the constructor parameter as your own. 4. Add two accessor methods to the class getAuthor, getTitle and getPages—that return the author and title fields as their respective results. Add mutator method to change the pages of the Book class. 5. Add two methods, printAuthor and printTitle, to this Book class project.
- Write a class encapsulating the concept of a student, assuming student has the following attributes: a name, a social security number, and a GPA (for instance 3.5). Include a constructor, the accessors and mutators, and methods toString() and equals(). Write a client class to test all the methods in your class.The Rectangle class) Following 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. The default 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 and then implement the class. Write a test program that creates two Rectangle objects—one with width 4 and height 40and the other with width 3.5 and height 35.9. Display the width, height, area, and perimeter of each rectangle in this order.a. Write a FractionDemo program that instantiates several Fraction objects and demonstrates that their methods work correctly. Create a Fraction class with fields that hold a whole number, a numerator, and a denominator. In addition: Create properties for each field. The set access or for the denominator should not allow a 0 value; the value defaults to 1. Add three constructors. One takes three parameters for a whole number, numerator, and denominator. Another accepts two parameters for the numerator and denominator; when this constructor is used, the whole number value is 0. The last constructor is parameterless; it sets the whole number and numerator to 0 and the denominator to 1. (After construction, Fractions do not have to be reduced to proper form. For example, even though 3/9 could be reduced to 1/3, your constructors do not have to perform this task.) Add a Reduce() method that reduces a Fraction if it is in improper form. For example, 2/4 should be reduced to 1/2. Add an operator+() method that adds two Fractions. To add two fractions, first eliminate any whole number part of the value. For example, 2 1/4 becomes 9/4 and 1 3/5 becomes 8/5. Find a common denominator and convert the fractions to it. For example, when adding 9/4 and 8/5, you can convert them to 45/20 and 32/20. Then you can add the numerators, giving 77/20. Finally, call the Reduce() method to reduce the result, restoring any whole number value so the fractional part of the number is less than 1. For example, 77/20 becomes 3 17/20. Include a function that returns a string that contains a Fraction in the usual display format—the whole number, a space, the numerator, a slash (D, and a denominator. When the whole number is 0, just the Fraction part of the value should be displayed (for example, 1/2 instead of 0 1/2). If the numerator is 0, just the whole number should be displayed (for example, 2 instead of 2 0/3). b. Add an operator*() method to the Fraction class created in Exercise 11a so that it correctly multiplies two Fractions. The result should be in proper, reduced format. Demonstrate that the method works correctly in a program named FractionDemo2. c. Write a program named FractionDem03 that includes an array of four Fractions. Prompt the user for values for each. Display every possible combination of addition results and every possible combination of multiplication results for each Fraction pair (that is, each type will have 16 results).
- Java Question - Using the bottom code, create another class named "DigitalBook" as a subclass of the given "Book" class. Then, Make sure that the "DigitalBook" class contains two constructors: (1) one is the default constructor that takes no parameter, and (2) the other is a parameterized constructor that take 6 parameters. Be sure to use the “super” keyword in the constructors of the "DigitalBook" class. In the “main()” method of the “EX12_1” class, create four instances: “b1”, “b2”, d1”, and “d2”. Let “b1” and “b2” be the instances of the “Book” class, and let the “d1” and “d2” be the instance of the “DigitalBook” class. Be sure to use the specified constructor (as shown in attached picture) to initialize these instances. The Final Output is shown in the attached pictures. Please make sure that no errors show up in the Java Compiler when testing the code. Thank you. Add the following code to the "class Book" code (Below the ___ line). public class EX12_1{public static void…Java Question - Using the bottom code, create another class named "DigitalBook" as a subclass of the given "Book" class. Then, Make sure that the "DigitalBook" class contains two constructors: (1) one is the default constructor that takes no parameter, and (2) the other is a parameterized constructor that take 6 parameters. Be sure to use the “super” keyword in the constructors of the "DigitalBook" class. In the “main()” method of the “EX12_1” class, create four instances: “b1”, “b2”, d1”, and “d2”. Let “b1” and “b2” be the instances of the “Book” class, and let the “d1” and “d2” be the instance of the “DigitalBook” class. Be sure to use the specified constructor (as shown in attached picture) to initialize these instances. The Final Output is shown in the attached pictures. Add the following code to the "class Book" code (Below the ___ line). public class EX12_1{public static void main(String[] args){/////add your code here}}…D Create a class Sum with the following fields, constructors and methods:Fields: create two integer fields Constructors:- a no-argument constructor- a constructor with two parameters Methods:- write a getter to return the sum of fields- Create 4 overloaded calculate methods 1. method receives two integer parameters and returns the sum 2. method receives four integer parameters and returns the sum 3. method receives two double parameters and returns the sum 4. method receives two String parameters and returns the sum Create a demo class to test the two constructors, all the methods and display the returned values. You can hard code the parameters values. Make sure the four methods created are toverloaded i.e. same method name for all four.
- Change the Fraction class so that its instance variables (numerator and denominator) are hidden (i.e. private). Check that the client class (after this change) will now not compile. Why does it not compile? Provide the changes to the Fraction class and the TestFraction class such that the program can work with the private instance variables by implementing appropriate accessor and mutator methods. import java.util.Scanner;//test programpublic class testfraction{public static void main(String[] args) {//create a Scanner objectScanner in = new Scanner(System.in);//create new fractionFraction frac = new Fraction();//declare numerator and denominatorint n=1,d;System.out.print("Enter Fraction's Numerator: ");//input numeratorn = in.nextInt();System.out.print("Enter Fraction's Denominator: ");//input denominatord = in.nextInt();//loop execute until the numerator is negativewhile(n>=0){//call input with n and dfrac.input(n, d);//call displayfrac.display();System.out.print("Enter…This is the question I am struggling on - Create a class named Horse that contains the following data fields: name - of type String color - of type String birthYear - of type int Include get and set methods for these fields. Next, create a subclass named RaceHorse, which contains an additional field, races (of type int), that holds the number of races in which the horse has competed and additional methods to get and set the new field. This is the code I have but it will not accept it at all - public class DemoHorses { public static void main(String args[]) { Horse horse1 = new Horse(); RaceHorse horse2 = new RaceHorse(); horse1.setName("Old Paint"); horse1.setColor("brown"); horse1.setBirthYear(2009); horse2.setName("Champion"); horse2.setColor("black"); horse2.setBirthYear(2011); horse2.setRaces(4); System.out.println(horse1.getName() + " is " + horse1.getColor() + " and was born in " +…I need to write a jave program to keep track of a team sport. Write a class, Team.java, that has the following: * two private instance variables: a String named color and an int named score. * a default constructor with no parameters that initializes color to "Red" and score to zero. * a constructor that takes two parameters (one for each instance variable) and sets the values of the instance variables. * a public getter and setter method for each instance variable. * a toString method that returns the color and score in the following format: "Red Team with 0 points."