Consider the three classes Alpha, Beta, and Gamma. Which of the following is/are true (choose all that apply)? a. Alpha is a subclass of Beta b. Beta is a subclass of Gamma c. Gamma is a superclass of Alpha d. Beta is a superclass of Alpha public class Alpha extends Gamma { public String getTwo() { return("2"); } public String getTwo(int i) { return("two"); } } public class Beta extends Gamma{ public String getThree() { return ("3"); } public String getFour() { return ("four"); } } public abstract class Gamma { public String getOne() { return ("1"); } public String getFour() { return("4"); }
Q: How to Using Randomness to Hide the Worst Cases in Randomized Algorithms explain?
A: A deterministic algorithm's running time and accuracy are often evaluated using a worst-case input…
Q: 3. From the following tables write a SQL query to display the first and last names of each employee,…
A: Fetch the columns names from emp_details table and emp_department. So these tables will be joined…
Q: Discuss Evolution of Design Methods.
A:
Q: A host was given the 192.168.2.64/27 IP address, indicate: i) Netmask of the network. ii) The…
A: Your answer is given below.
Q: Input the minimum and maximum ranges from the user (these are the values the dice will randomly…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT---------
Q: make Algorithm to Using dead reckoning messages. in: state information S; time stamp t out: state…
A: constant: convergence period c given data : in: state information S; time stamp tout: state value
Q: Python Dictionary Help: Part a) Read a text file and then convert the elements into a dictionary.…
A: Introduction: A Dictionary in Python is collection of key-value pairs, where key is always unique…
Q: What is the sub-network address if the destination address is 200.45.34.56 and the subnet mask is…
A: Introduction In this question we are asked about the sub network address if the destination address…
Q: 1. Follow the FDR to implement a function called add_average. This function must be placed inside…
A: Algorithm for the code: Start Initialize sum to 0 For each value in the dictionary: Add the value…
Q: Please do according to Data Structure in C Programming Use Depth First Search to find a path from…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Create a View to show the city name of any location that has a department. Only show the city name…
A: SQL Query:- A query is a request for data or information from a database table or set of databases.…
Q: What is Big 'Oh' Notation.
A:
Q: IMPORTANT !! Use THREE dimension Array IMPORTANT!! please make the code as short as possible Write a…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: How machine learning is used in real-world situations?
A: Machine learning:- A branch of artificial intelligence known as machine learning is the ability of a…
Q: Rewrite the BNF of Example 3.4 to add the ++ and -- unary operators of Java.
A: We are given the BNF for unambiguous grammar for expressions. We need to rewrite the BNF to add the…
Q: functio
A: def sort_word(word): # create a list of characters from the word char_list = [] for char in…
Q: What is The Time (and Space) Complexity of an Algorithm?
A: Introduction :- Algorithm analysis is a critical component of computer science. Finding the most…
Q: Write a function called get_game_dict(csv file name ) that returns (not prints) a dictionary of all…
A: Code is attached in step 2 and screenshot is also attached. Also the function makes a dictionary…
Q: Create a graphical JAVA program that simulates a simple arcade game (like Frogger) using the ACM…
A: Code for particular section :- public void drawRoadMarkers() { / Draw the solid dividing lines…
Q: Explain Modular Arithmetic.
A: The answer to the question is given below:
Q: Write Algorithm for Hertel–Mehlhorn method for convex partition. in: polygon P out: convex…
A: given data: in: polygon Pout: convex partition R
Q: Write Restaurant Menu Expert System in Python and provide flow chart for it.
A: Description In this section, a Python code is provided for implementing a Restaurant Menu Expert…
Q: Write a while loop which prints the even numbers from 20 to 30 (including 30) Rewrite as a for loop…
A: ALGORITHM:- 1. Initially print the even numbers from 20 to 30 using while loop. 2. Then print the…
Q: USING PYTHON: Create a function that takes a filename("string") of a PGM image file as input and…
A: This is very simple. You need to install OpenCV and paste this code. Note: The image file should be…
Q: What are the limitations of firewall.
A: Firewall can be a hardware or software whose responsibility is to protect a private computer or a…
Q: Describe Univariate, Bivariate And Multivariate Analysis.
A: Describe Univariate, Bivariate And Multivariate Analysis.?
Q: Create a Student class in C++ language to read and print N student's details. The output shall be…
A: For the given question, we need to design a Student class that reads and displays student…
Q: What Are Structural And Procedural Design Methods?
A: Given: Explain structural and procedural design methods.
Q: Please do according to Data Structure in C Programming Use Depth First Search to find a path from…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: (a) Consider the software development to compute the monthly electric bills of the Electric supply…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Create a View to show all the first and last names of managers and the count of their employees.…
A: ANSWER:-
Q: 2. Consider the following array: 1 3 !!!!!! 2 3 1 0 5 1 Now, if we perform the following sequence of…
A: Below I have provided the solution of the given question
Q: #Description: This program should calculate and display # the total monthly cost of home ownership.…
A: Algorithm of the code : 1. Start 2. Set the monthly limit to 1200.00. 3. Prompt the user to input…
Q: Define O-Notation.
A:
Q: Why Data Cleansing Is Important In Data Analysis?
A: What Is Data Cleansing?Data cleansing, also known as data cleaning or scrubbing, identifies and…
Q: write my sql , p/sql pr t-sql procedures to retrieve and output the item id, description, location,…
A: Your mysql query is given below.
Q: /** *Return the first index of element in the list. If element * is null or not found in the list,…
A: Here is the approach : Create the class and have some class properties like the list and the…
Q: Explain why/why not they need both authentication and access control? What is the best…
A: Dear Student, The answer to your question is given below -
Q: Sam has been very busy with his christmas preparations and he doesn't have time to look after Samosa…
A: Input-Output Explanation: The first line contains T, the number of test cases to follow. The first…
Q: Consider the subnet in Fig. 3.11.5. Distance vector routing is used and the following vectors have…
A:
Q: The average daily temperature for an area can be approximated using the following equation: T =…
A: The complete code in MATLAB is below:
Q: Suppose all the interfaces in each of three subnets are required to have the prefix 223.1.17/24.…
A:
Q: how response teams determine the severity of an incident in reference to the core security incident…
A: A computer is a digital electronic machine that can be programmed to automatically perform a series…
Q: 12 Using ipconfig command with various options (e.g., ipconfig /all), answer questions 2.1-2.11.1…
A: Hello, find below the answers to the activity questions using ipconfig commands calls on my machine
Q: Need to do this in language as a while little confused on how to do it?
A: The conversion from inches to centimeters is multiply the inches by 2.54 results in centimeters.…
Q: Does anyone know the diff between view and conflict serializability? Please explain using simple…
A: Serializable Schedule:A transaction schedule is serializable if its results are the same as those of…
Q: The coordinates of centres of these squares are (x1, a/2), (x2, a/2) and (x3, a/2) respectively. All…
A: testNum=int(input())for i in range(testNum): a,k=map(int,input().split())…
Q: Write the characteristics of AES (Advanced Encryption Standard)
A: Advanced Encryption Standard is one of the most widely used symmetric encryption algorithm.
Q: Is there a way to discard the fractional (decimal) part of a value without calling any built-in…
A: The remainder of a division can also be found out using normal while or for loops. One such…
Q: This is a program with the first part for a simple program for asking a user to enter multiple…
A: We need to write a C++ code for the given scenario.
Step by step
Solved in 2 steps
- •Person Class: Person class has attributes: String name, address and int age. Write setperson() function to set values and getPerson() to Print attributes. Also write appropriate constructors.•Employee Class: Write another class Employee having attributes department and salary of type string and double. Write methods setEmployee(), getEmployee() and appropriate constructors for Employee class.•Student Class:•Write a class Student having attributes registration number and GPA of type string and float. Also write setStudent(), getStudent() methods and required constructors. Use the concept of inheritance to achieve the above functionality. Write a main() function to display the information of employee and student.• Note: Call the constructors/methods of parent class in child class where required in java code•Person Class: Person class has attributes: String name, address and int age. Write setperson() function to set values and getPerson() to Print attributes. Also write appropriate constructors. •Employee Class: Write another class Employee having attributes department and salary of type string and double. Write methods setEmployee(), getEmployee() and appropriate constructors for Employee class. •Student Class: •Write a class Student having attributes registration number and GPA of type string and float. Also write setStudent(), getStudent() methods and required constructors. Use the concept of inheritance to achieve the above functionality. Write a main() function to display the information of employee and student. • Note: Call the constructors/methods of parent class in child class where required1 - Student class Make a class student (in student.py) that stores the following information for a student: Name (name) Student number (student_nr) Points per assignment (points_per_assignment) Exam grade (exam_grade) a) Behind each point of information is the name of the parameter to the initializer method. Store this information from the parameters in the object attributes with the same name. b) Add a method course_points() which returns the number of course points the student has gotten. Example: mary = Student("Mary", 15789613, [10, 9, 8, 10, 9, 10], 9)print(mary.course_points()) > 121 The calculation of the course points is explained in the course overview, course setup slides (Links to an external site.) and the first lectureLinks to an external site.. c) Add a method grade() which returns a the final grade of the student, rounded to nearest half (upwards, 6.75 -> 7). As per regulations, a 5.5 becomes a 6. If the student did not pass both the assignments (>= 95…
- Create a class Animal Create 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 makes Sound () with the implementation printing out a generic animal sound. Next, override (add) the makes Sound() 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 makeSound method called will be: cat -> from Cat class, dog-> from Dog class, bearded Dragon -> from Animal class ) EC:…Write a code for a banking program.a) In this question, first, you need to create a Customer class, this class should have:• 2 private attributes: name (String) and balance (double)• Parametrized constructor to initialize the attributes• Methods:i. public String toString() that gives back the name and balanceii. public void addPercentage; this method will take a percentage value andadd it to the balanceb) Second, you will create a driver class and ask the user to enter 6 customers’ informationand then you will create an array of Customer objects.c) Then you use this array used for various operations as shown in the output.• Using the array of customer objects, you need to search for all customers whohave less than $150• Using the array of customer objects, you need to get the average balance of thebalances in this array• Using the array of customer objects, you need to get the customer with thehighest balance and lowest balance• Using the array of customer objects, you need to show all…Java- Suppose that Vehicle is a class and Car is a new class that extends Vehicle. Write a description of which kind of assignments are permitted between Car and Vehicle variables.
- public class date { private int day; // from 1 to 31 private int month; // from 1 to 12 private int year; // from 2000 upwards public void advance (); // move to next day }; Implement a constructor that initializes new objects of date class to be set to the 1st of January 2000. Implement setters for day, month, and year. Implement the advance method, which moves to the next day, ensuring that all data members are updated appropriately.Create a class BeautyProduct with name, color, brand. Provide Constructors, getters, setters and also write toString method. Now create a class Lipstick which extends the class BeautyProduct as Lipstick is-a Beauty Product it has totalVolume, remainingVolume, price, texture (gloss, matt) as private data members. Provide Constructors, getters, setters and an apply() method whenever this method is called a beauty item is applied and its volume decreases by 10.This should also check that volume must not be zero if it then u have to throw exception. Also write toString method which prints all details like name, color, brand, price, texture and volume. Create another class foundation having totalVolume, remainingVolume, price, texture (liquid, cake) and lastingTime (number of hours foundation remain intact on face and does not crease) as private data members. This also extends the base class i.e. BeautyProduct. Provide Constructors, getters, setters and an apply() method whenever this…Implement the Seller class as a derived class of Person class. Create the seller.h and seller.cppfiles for this class. The Seller class contains additional data members that hold a seller’s:o average star rating received from the buyers, ando total number of items sold.These data should be accessible by its derived classes. (should these data be private, public, orprotected?) The following methods are included in the seller class:• A default constructor and a copy constructor• A constructor that receives all of the data for a seller.(for the constructors, make sure to call the base class constructor as appropriate)• Appropriate get and set functions for the new data in this class• print() – overrides the base class print() to print the base class data and print all additionalseller data with appropriate messages. Make sure to call the base class print to print thebase class data.• read() – overrides the base class read() to read the base class data and reads all additionalseller data…
- public class MyGenClass { private T1 name; private T2 stulD; private T3 CGPA; public void setStuData( ){ I/ parameters name = n; stulD = d: CGPA = g; } public void printAsString() { System.out.println( } ); I/ print all information as string public static void main(String args||) { Il Create an object stu by parameters String, Integer, Double Il Call setStuData() with any values you like /l Call printAsString() } }(1) Extend the ItemToPurchase class to contain a new attribute. item_description (string) - Set to "none" in default constructor Implement the following method for the ItemToPurchase class. print_item_description() - Prints item_description attribute for an ItemToPurchase object. Has an ItemToPurchase parameter. Ex. of print_item_description() output: Bottled Water: Deer Park, 12 oz. (2) Build the ShoppingCart class with the following data attributes and related methods. Note: Some can be method stubs (empty methods) initially, to be completed in later steps. Parameterized constructor which takes the customer name and date as parameters Attributes customer_name (string) - Initialized in default constructor to "none" current_date (string) - Initialized in default constructor to "January 1, 2016" cart_items (list) Methods add_item() Adds an item to cart_items list. Has parameter ItemToPurchase. Does not return anything. remove_item() Removes item from cart_items list.…For the following four classes, choose the correct relationship between each pair. public class Room ( private String m type; private double m area; // "Bedroom", "Dining room", etc. // in square feet public Room (String type, double area) m type type; m area = area; public class Person { private String m name; private int m age; public Person (String name, int age) m name = name; m age = age; public class LivingSSpace ( private String m address; private Room[] m rooms; private Person[] m occupants; private int m countRooms; private int m countoccupants; public LivingSpace (String address, int numRooms, int numoccupants) m address = address; new int [numRooms]; = new int [numOceupants]; m rooms %3D D occupants m countRooms = m countOccupants = 0; public void addRoom (String type, double area)