1. Write a class "Ball" which extends the class disk. It has deltax and deltay attributes. 2. Write the constructor of this class. 3. Write the mothods move(), reverseDeltaX(), reverseDeltaY() methods which multiplies the coordinates with -1. 4. Write the getters and the setters of the class.
Q: How system call works in file management like reading and writing from files
A: The Answer is given below step.
Q: (Sum a Sequence of Integers) Write a program that sums a sequence of integers. Assume thatthe first…
A: C is a programming language that is used for general purpose. C language is considered to be a…
Q: What is bubble sort? Explain the algorithm of bubble sort in detail.
A: Bubble sort : A basic algorithm for arranging a string of numbers or other elements in the correct…
Q: What steps are involved in making a new version of software? Go through the versioning information…
A: New Software version refers to a major software release whose main function involves enhancing or…
Q: Question 1: Use the pumping lemma for context free languages to prove that the language B = {ww w E…
A: Answer:
Q: Write a C program to interchange smallest and largest element in the array with following function…
A: Coded using C language.
Q: Which of the following is NOT true about operation contract? Select one: a. It describes an…
A: Operations Contract implies an understanding, agreement or buy request went into between the Society…
Q: write a c++ code to check a given integer number is a multiple of 7
A: We need to write a program about to check a given any number or integer is a multiple of 7 or not.…
Q: What is the function of the syntax tree component in a language processing system?
A:
Q: What is a shift reduce parser? Explain in detail the conflicts that may occur during shift reduce…
A: Please refer below for your reference: According to company guidelines we are restricted to answer…
Q: The ______________function is used to set the random number seed to randomize a program.
A: Let's see which function used to set the random number seed to randomize a program
Q: linear system: Ax = b x1 + 2x2 + x3 = 1 > 3x1 + 5x2 - x3 = 2 x2 + x3 = 10 Find the solution to the…
A: We know that a matrix inversion and matrix dot product are the two operations required to solve a…
Q: We don't have any authority over how operating systems carry out processes, right?
A: Given: The operating system is responsible for assigning resources to processes and scheduling those…
Q: Given two strings, s1 and s2, select only the characters in each string where the character at the…
A: Coded using JavaScript.
Q: Imagine a project, and then map it both with and without architecture. what effect it will have on…
A: Software architecture denotes the mapping of strategic requirements to architecture decisions. It…
Q: The Rohit has N marks. Each marker has a cap. For each valid i, the ith tag has color ai and…
A: Input - Output Description: First input contains a single integer T denoting the number of test…
Q: Could you perhaps provide us a more thorough explanation of how metrics are used to the software…
A: A software development process is a process of dividing software development work into smaller,…
Q: Given two integers as user inputs that represent the number of drinks to buy and the number of…
A: Start Input purchase Input restore Call the function and print the updated inventory Stop
Q: Which one is the formula to compute the integral f f(x) dx with the trapezoid rule?
A: Let f(x) be a continuous function on the interval [a, b]. Now divide the intervals [a, b] into n…
Q: In HCI, describe linear and non-linear text structures.
A: The answer of the question is given below
Q: Design a class named BaseBallGame that has the fields for two names and a final score for each team.…
A: The following is the pseudocode for the class BasebalGame: class Baseball Game Declarations private…
Q: used: (a) Circuit switching; (b) Virtual circuit and datagram packet switching. The stations are…
A: The answer is
Q: If you wanted to find a solution at this point, what variables could the MRV (minimum remaining…
A: C1, Class 1 - Intro to Programming: meets from 8:00-8:50am• C2, Class 2 - Intro to Artificial…
Q: Should we compare and contrast two different security architecture models
A: The web has been known with two security engineering paradigms. One of the approaches, the…
Q: Question 1: Use the pumping lemma for context free languages to prove that the language B = {ww w E…
A: Given language: B={ww | w∈{a,b}*} To prove: B is not a CFL Concepts used: Context-free…
Q: English language is amalgamation of 26 standard characters. The characters are either in upper case…
A: I have provided the answer based on Python Programming. Detailed comments are included for a better…
Q: Suppose a TCP Vegas connection measures the RTT of its first packet and sets BaseRTT to that, but…
A: RTT is the measure of the measure of the latency of the network in the milli second i.e. the time…
Q: Had this but couldn't make it work
A: Given code:
Q: 2. Problem 2: Rabin Karp Hashing You are given a polynomial P(x) = a₁ + ª₁x-a₂x² + ...-an-1-¹. The…
A: To sort out the above problem firstly, let's sketch some equations: P(x)= ao + aix-1 a2x2+ ... a_…
Q: Draw flowchart:1.
A: Flow chart is the step by step representation of program which are connected. In flow chart, the…
Q: Question 2: Use the pumping lemma for language C = {a'b'ek|0<i≤j≤k}is no discuss all the cases.
A: SUMMARYA environment-free alphabet( CFG) conforming of a finite set of alphabet rules may be a…
Q: Under what use of the staged representation circumstances would you recommend the of the CMMI?
A: The decision to choose one or the other depends on the goals of the…
Q: Which missing code will create and start this thread? public class MyRunnable implements Runnable {…
A: Given : Which missing code will create and start this thread?public class MyRunnable implements…
Q: A grammar G that produces more than one different parse tree for the same sentence is said to be…
A: A grammar is said to be ambiguous if there exists more than one left most derivation or more than…
Q: following Boolean expressions to the indicated number of literals: 1) A’C’ + ABC + AC’ to t
A: Introduction: Below Reduce the Boolean expressions to the indicated number of literals: 1) A’C’ +…
Q: 1. In a BST, if the right sub tree is not empty, then the successor is The maximum in the left sub…
A: The minimum in the right subtree
Q: Suppose you are downloading a large file over a 3-KBps phone link. Your software displays an…
A: Consider downloading a huge file over a 3-KBps phone link. A counter for average bytes per second is…
Q: Under what circumstances use of the staged representation of the CMMI? would you recommend the
A:
Q: 4. Write a Matlab program to compute the value of 30*10 without using the operator. Attach the…
A: ANSWER:
Q: As a software developer, we want you to capture user needs effectively. Your customer has consented…
A: - We need to talk about the demand elicitation strategy.
Q: What does service Let's Encrypt! provide?
A:
Q: Suppose a TCP Vegas connection measures the RTT of its first packet and sets BaseRTT to that, but…
A: ANSWER:-
Q: Oerview of a Polyglot Persistence for Electronic Health Record Management Systems
A: Polyglot persistence is a term used to describe a software development approach in which a single…
Q: 1. Is the following code legal? try { } finally { }
A: The answer is given below.
Q: In an experiment to determine the spring constant of an elastic cord of length 0.60 m, a student…
A: I have provided the answer based on Matlab Programming. Detailed comments are included for a better…
Q: Give a brief explanation of the C++ standard library word "iterator".
A: Iterators are tools for processing a list of values. They are the primary aspect of STL that permits…
Q: Suppose a TCP Vegas connection measures the RTT of its first packet and sets BaseRTT to that, but…
A: TCP Vegas TCP Reno and TCP Tahoe models can decide the congestion in the network just when there…
Q: What is a relatonal data model? explain any three objectives of the relational model
A: Disclaimer: “Since you have asked multiple questions, we will solve the first question for you. If…
Q: write a c++ code to check a given integer number is a multiple of 7
A: We need to write a program about to check a given any number or integer is a multiple of 7 or not.…
Q: ____________are used to modularize programs.
A: You can reuse components of working applications thanks to modularization. You get to the…
I need answer within 10 min
Step by step
Solved in 4 steps with 2 images
- Consider this scenario, a mehtod in some class needs to access a data field in another class, here are two possible implementations: public class Process { /* * Check if student qualifies for financial help */ void check(Student student) { //.... } /* * Check if student qualifies for financial help */ void check(double studentGPA) { //.... }} In class Process, which check method you think is better, why? In other words, should we pass the object to the method or just the data member it needs? Disucuss the Pros and Cons of each approach (if any). Assume class Student has a mehod called getGPA( ).Implement a class Season that represents a season during a specified year. For purposes of thisproblem, assume that the seasons in each year are, in order, 'Winter', 'Spring', 'Summer', 'Autumn' .__init__, __repr__A Season object is created by calling the constructor and supplying two optional arguments:1. season, defaults to 'Winter'2. calendar year, an int , defaults to 2023For the __repr__ , see the usage below: The next and prev methods modify a Season object by changing it to the next season or previousseason in sequence, respectively. Note that the seasons can "roll over" or "roll back" and that this maychange the year by +/-1. 1. During each year, the seasons occur in this sequence: 'Winter', 'Spring', 'Summer', 'Autumn' 2. next - change to next season, if the current season is Autumn then year will increase by 1 3. prev - change to previous season, if Winter then year will decrease by 1 Implement the == operator ( __eq__ method) to compare two Season…This question concerns writing a Student class to model a student's name, composed of a first name, middle name and last name. The Student class should meet the following specification:Class StudentA Student object represents a student. A student has a first name, middle name and last name.Methodspublic void setNames(String first, String middle, String last)// Set the first, middle and last names of this Student object.public String getFullName()// Obtain the full name of this Student with the middle name converted to an initial only.2Thinking of the problem in terms of testing, there are three requirements that must be met:1. The setNames() method sets the names stored in the object i.e. the values of firstName, middleName, lastName.2. The getFullName() method obtains the name of the student with the middle name converted to an initial only.3. The getFullName() method does not change anything – i.e. it does not modify the values of firstName, middleName, lastNameHINT: To start your…
- Write a class Point with instance variables as: xCoordinate(int) and yCoordinate(int). Write public instance methods (getters & setters) for each instance variable. Now, write a class Circle with private instance variables as radius and Pi (value is 3.14). Write public setter, getter for radius, Area method for calculating Area, Draw method for radius. Formula for calculating area=pi*r^2 Formula for calculating radius= Math.sqrt (xCordinate^2+yCordinate^2) a. Extend a Circle class from Point class such as Class Circle extends Pointb. Write a Default constructor in Circle class that sets radius, xCoordinate & yCoordinate to some default value e.g. -1;c. Write a Parameterized constructor in Circle class which takes xCoordinate, yCoordinate and radius as a parameter.Now write a ColoredCirlce class with private instance variable as color (String) and public setter & getters. Extend the ColoredCircle from Circle and do the following operations.d. Write a default constructor…Answer the given question with a proper explanation and step-by-step solution. The base class Pet has protected fields petName, and petAge. The derived class Cat extends the Pet class and includes a private field for catBreed. Complete main() to: create a generic pet and print information using printInfo(). create a Cat pet, use printInfo() to print information, and add a statement to print the cat's breed using the getBreed() method.Write a class Point with instance variables as: xCoordinate(int) and yCoordinate(int). Write public instance methods (getters & setters) for each instance variable. Now, write a class Circle with private instance variables as radius and Pi (value is 3.14). Write public setter, getter for radius, Area method for calculating Area, Draw method for radius. Formula for calculating area=pi*r^2 Formula for calculating radius= sqrt (xCordinate^2+yCordinate^2) Extend a Circle class from Point class such as Class Circle extends Point Write a Default constructor in Circle class that sets radius, xCoordinate & yCoordinate to some default value e.g. -1; Write a Parameterized constructor in Circle class which takes xCoordinate, yCoordinate and radius as a parameter. E.g. Circle (int xCoordinate, int yCoordinate, double radius) { this.xCoordinate= xCoordinate; this.yCoordinate= yCoordinate;…
- Write in java an abstract class Student that includes the following hidden attributes: id(int), name(String), major(String) and grade(double), then create setter and getter for each of them. Write two classes that inherited from Student: ItStudent and ArtStudent. The grade for ItStudent is calculated as: grade = mid*0.30 + project*0.30 + final*40 and the grade for ArtStudent is calculated as: grade = mid*0.40 + report*0.10 + final*50. Crate main class that achieve the following:a. Create an array of some Student objects from both ItStudent and ArtStudent classes.b. Sort the Student objects by grade in descending order using functions.c. Save the sorted objects into file.Implement the following class and write a driver classImplement a new class Contact :public Person I provided person.h you don't have to touch person.h just need help on contact.h class public person and private person please help me
- Create a parent class Person with one attribute age and one method greet() that prints out "Hello, world!". By default, the age is 20. Then create a subclass CollegeStudent that inherits from Person and has its own attributes School_Name and Major. Then create an object (a college student, his name is Harry, age is 21, School_Name is "Felician University", and Major is "Computer Science"), then let Harry say"Hello World!".1/ Write a BankAccountTester class whose main method constructs a bank account, deposits $1,000, withdraws $500, withdraws another $400, and then prints the remaining balance. Also print the expected result 2/ Implement a class Employee. An employee has a name (a string) and a salary (a double). Provide a constructor with two arguments public Employee(String employeeName, double currentSalary) and methods public String getName() public double getSalary() public void raiseSalary(double byPercent) These methods return the name and salary, and raise the employee's salary by a certain percentage. Sample usage: Employee harry = new Employee("Hacker, Harry", 50000); harry.raiseSalary(10); // Harry gets a 10 percent raise Supply an EmployeeTester class that tests all methods. 3/Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon or liters/km—pick one) and a certain amount of fuel in the gas tank. The efficiency is specified in…*using java* Create a class AnimalCreate a class Cat, and a class Dog, and a class Bearded Dragon which extend Animal. Add to your Animal class: Member: name Methods: Public Animal(String name) //constructor public void makesSound()with the implementation printing out a generic animal sound. Next, override (add) the makesSound()method to your Cat and Dog class, with the implementation specific to each animal (i.e, cat says purr..). Do not override the makesSound() for your Dragon (bearded dragons don’t make sounds!)Note, you’ll also need a constructor in each of your subclasses which calls super(name) to initialize the common ‘name’ member of Animal. --- Next (in your test harness) create a List of different Animals ( a couple cats, a dog, a dragon... ) and add these Animals to your list. Iterate through your list & call makeSound on each. ( you should observe the implementation of the makeSound() method called will be: cat -> from Cat class, dog-> from Dog class,…