Please encode these classes and run them for inspection/analysis/scrutiny
Q: The main idea and Purpose of MODAF Operational point of view? Answer:
A: The British Ministry of Defence Architectural Framework (MODAF) was an architecture framework design...
Q: Given the IP address: 78.56.2.6/18 (basis is /16) Determine the following addresses for subnet 2...
A: Given IP address is 78.56.2.6/18 Here is the IP address is 78.56.2.6 CIDR Notation is /18
Q: Climber is a class that has been defined, and the variable cat refers to a Climber instance. With an...
A: Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
Q: Explanatory material, such as references to other standards, references to related sections of this ...
A: Essential material, such as definition standards, references to related sections of this Code, or in...
Q: 23. In Javascript write a program to print the first 5 even natural numbers and the sum of the first...
A: Write a Javascript program to print the first 5 even natural numbers and the sum of the first 5 even...
Q: Is the Big Data Market Being Driven by Mass Hysteria? What are the two advantages and disadvantages ...
A: Introduction: This phenomenon is known as mass hysteria, and it is marked by uncontrollable emotion...
Q: praw the state diagram for the finite-state machine with the following state table: Iпрut Iпрut
A:
Q: The equation of a straight line is written as y = mx + b where m is the slope of the line and b is t...
A: The standard types of the situation of a line are: Incline catch structureBlock structureTypical str...
Q: Why is data encryption so critical?
A: Introduction: Encryption is a means of modifying data in such a manner that it is unreadable by ever...
Q: How does the Multi-level Feedback Queue scheduler ensure that interactive jobs are running quickly? ...
A: INTRODUCTION: This scheduling is similar to Multilevel Queue(MLQ) scheduling, except that you can m...
Q: What exactly do you mean by Data Purging?
A: Introduction: Data purging is a method that deletes inactive or obsolete records from a database per...
Q: Can you implement the Derived Class Parameterized constructor? A solution is placed in the "solution...
A: In class Laptop we already have the constructor and thus in derived class we have to invoke the same...
Q: OUTPUT : LYNNE, your total score is 19 and your average score is 3.8. SAMPLE RUN 2: INPUT : Enter st...
A: #include <iostream>using namespace std;void TEST(){ int a[5]; string x; int sum=0; ...
Q: 1. Write a C program that will use an amray that stores 3 numbers. Then, the program vwill detemmine...
A: #include <stdio.h> #include <conio.h> int main(){ int a[1000],i,n,min,max; pri...
Q: column/width), what is the total capacity of the memory system? Show your answer in power of 2. (hin...
A: The answer is
Q: Why is it a good idea to first write out an algorithm in pseudocode rather than jumping immediately ...
A: Answer:
Q: the key: 10101100100... Find the probable recurrence relation generating that key.
A: grouped in blocks of 7 bits. Given theorem "The maximum sequence length generated by an LSFR of degr...
Q: Print out if a number is prime or not from 1 to 10. Challenge (if finished) Take any number and figu...
A: Algorithm: if condition then something if; elseif condition then somethin...
Q: reate a Java program using a Linked list by adding 5 nodes and then removing 1 node from the list. T...
A: Python is a very famous programming language these days, It is an Object oriented programming, which...
Q: at (num, end=" ") num 1
A: The output as,
Q: Input: A list of currency exchange rates separated by ';'. A currency pair to calculate separated by...
A: The solution to the given problem is below.
Q: What exactly are multimedia systems? Describe the obstacles that multimedia systems face, as well as...
A: Introduction: A multimedia system is in charge of developing a multimedia application. A multimedia ...
Q: 6. Determine whether each of the following Python identifiers is valid or invalid. If it is valid, s...
A: There are some rules defined for defining the names of a variable in any programming language.
Q: 5. Eliminate the exclusive-OR and then factor to obtain a minimum product of sums. C) + C’D’ (AB
A: By eliminating the exclusive-OR and then factor to obtain a minimum product of sums is as follows.
Q: What precisely is the JDBC Driver?
A: Answer: A JDBC driver is a piece of software that allows a Java application to interact with a datab...
Q: People who work with computers and humans use a lot of different ways to measure how well they work ...
A: Usability testing is a proven method to evaluate your product with real people. And usability testi...
Q: I am learning c++, I have trouble understanding bool command. Please explain it to me, and give me s...
A: Hi, let us understand "bool" in c++. Bool is a data type in c++. Just as an "int" data type stores a...
Q: Add a method, printEvenNodes, to the SinglyLinkedList class that prints all integers stored in the n...
A: Note: Answering the question in python as no language is mentioned. Task : Given the singly linked ...
Q: describe what is the agility from organizational pros strategy to be more agile in your company? Why...
A: Lets see the solution.
Q: Suppose you have to make a FIGHTING GAME, what sudden situations can occur in that game? How a human...
A: The following are the unexpected circumstances and actions: 1. The game is halted due to a lack of n...
Q: 2. Given a string, compute a new string where identical characters that are adjacent in the original...
A: the answer is given below:-
Q: Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to th...
A: Introduction : Plan of Action: Set the header files and the primary () function to their default val...
Q: Dihan has completed his bachelor degree from University .the University offers bachelor programs of ...
A: Given: Dihan has completed his bachelor degree from University .the University offers bachelor prog...
Q: ame of the PL/SQL operation that sends one row of data of a table into one variable for each column?
A: SQL is the component responsible for retrieving and updating data in the database, whereas PL/SQL is...
Q: a prolog function reverse(X,Y) that takes a list X as the input and returns the reverse of the list ...
A: Here we need Prolog program to reverse a list. The two rules we need are: reverse of empty list is e...
Q: What is the runtime complexity of the stable matching algorithm that would equilibrate this?. N stud...
A: since there are N students applying in M collges where each college has S slots where each college h...
Q: Write a program in S that computes the function f1(x) = 3x – 3. If you need any macros, please defin...
A: In this question, we are asked to write a program which display the solution of f1(x) f1(x) = 3 * x ...
Q: 2. What is Special Use of Airspace (Non-regulatory)? 3. What are the other Airspace?
A: Airspace is the portion of the atmosphere controlled by a country above its territory including its ...
Q: 4) [8]Write code for a function multBy3divBy4, that for argument int x, computes 3*x/4, but follows ...
A: Given :- Write code for a function multBy3divBy4, that for argument int x, computes 3*x/4, but follo...
Q: A 15 bit data word along with parity bits received by the receiver is as follows: 101010 111111 0111...
A: Odd parity check When the data is sent in data blocks it is subjected to parity check. In case of od...
Q: What SQL statement in the Oracle database is required to display system rights associated with my ro...
A: In computer programming, structured query language (SQL) is a programming language that is used to e...
Q: What are the advantages and disadvantages of utilising logical views to connect rows together in dat...
A: Introduction: This is mainly because databases ensure data consistency, concurrency, integrity, secu...
Q: Food Delivery Service Food Discount Delivery Charge (1) Food Tiger 2% +20php (2) Pick-Up Food 5% +40...
A: Here I have taken input from the user for the food and its delivery service from the menu. Next, I h...
Q: why is this html does not shows the "logout button ? how to fix it ?
A: You need to log in first then the "LogOut" button appears to you... When you log in then you see the...
Q: ing questions:
A: An integrated circuit made out of millions of capacitors and transistors that can store data or can ...
Q: 20.a. What should be done with a cable that contains an obsolete connector? A. The connector should ...
A: 20 a ) obsolete connecter means the connector that is out of date or no longer in use. for such case...
Q: c++ program which takes a series of numbers from the user and outputs a sorted array using a. Merge...
A: #include <iostream> using namespace std; // A function to merge the two half into a sorted dat...
Q: Question 2 Next you will need to create classes to implement the interface and extend the abstract c...
A: class Circle extends AbstractShape{ private double m_radius; //Constructor public Circl...
Q: Without using any loop In PHP programming languague The value of the input variable is 9 3,5,578 How...
A: Here is your solution with an output.
Q: START Check the time of Vladimir as he arrive in his home. Check Time Before 4 ves He is in plavgrou...
A: The solution to the given problem is below.
Please encode these classes and run them for inspection/analysis/scrutiny.
Step by step
Solved in 2 steps with 1 images
- toString() and equals() Methods This lab will demonstrate how the toString() and equals() methods work when they are not overridden. Type up the code and submit the BOTH results. CODE public class ObjectToString( public static void main(String[] args) { ClassOne co new ClassOne(); ClassTwo ct = new ClassTwo(); } } public class Classone { System.out.println(co); System.out.println(ct); System.out.println(co.equals(ct)); public void printfle() { System.out.println("I am from ClassOne"); } public class ClassTwo ( public void printMe() { } System.out.println("I am from ClassTwo"); Run the program and notice the output.public class Base { public void PrintName() { System.out.println("Base"); } static void PrintClass() { System.out.println("ClassBase"); } private void PrintPrivate() { System.out.println("PrintPrivate"); } class Derived extends Base { public void PrintName() { System.out.println("Derived"); } static void PrintClass() { System.out.println("ClassDerived"); } private void PrintPrivate() { System.out.println("PrintDerived"); } public static void main(String[] args) { Base x = new Derived(); Derived y = new Derived(); x.PrintClass(); y.PrintPrivate(); x.PrintName();Code: interface Bicycle{ //interface for bicycle void changeGear(int val); //abstract methods void changeSpeed(int inc); void applyBrakes(int dec); void ringBell(int count); } class NewCycle implements Bicycle{ //class for a new cycle int speed=0; //stores the speed value int gear=0; //stores the gear value @Override public void changeGear(int val) { //method to change the gear gear=val; } @Override public void changeSpeed(int inc) { //method to change the speed speed=speed+inc; } @Override public void applyBrakes(int dec) { //method to apply brakes speed=speed-dec; } @Override public void ringBell(int count) { //method to ring the bell for(int i=0;i<count;i++){ System.out.print("Clang!!"+" "); } System.out.println(""); } public void printState(){ //method to print the states System.out.println("Ring bell, Speed, Gear,…
- public class Base public void methodOne () { System.out.print ("A"); methodTwo (); } } public void methodTwo () { System.out.print("B"); } public void methodThree () { } public void methodThree (String s) { System.out.print("Hello, " + s); } System.out.print("Hello"); } class Derived extends Base { public void methodOne () { super.methodOne (); System.out.print ("C"); } public void methodTwo () { super.methodTwo (); System.out.print("D"); What is the name of the parent class? What is the name of the overloaded method? What is the name of the overriden method? What is the name of the child class? ich of Choose... Choose... Choose... Choose... following statements will give an error?interface StudentsADT{void admissions();void discharge();void transfers(); }public class Course{String cname;int cno;int credits;public Course(){System.out.println("\nDEFAULT constructor called");}public Course(String c){System.out.println("\noverloaded constructor called");cname=c;}public Course(Course ch){System.out.println("\nCopy constructor called");cname=ch;}void setCourseName(String ch){cname=ch;System.out.println("\n"+cname);}void setSelectionNumber(int cno1){cno=cno1;System.out.println("\n"+cno);}void setNumberOfCredits(int cdit){credits=cdit;System.out.println("\n"+credits);}void setLink(){System.out.println("\nset link");}String getCourseName(){System.out.println("\n"+cname);}int getSelectionNumber(){System.out.println("\n"+cno);}int getNumberOfCredits(){System.out.println("\n"+credits); }void getLink(){System.out.println("\ninside get link");}} public class Students{String sname;int cno;int credits;int maxno;public Students(){System.out.println("\nDEFAULT constructor…2. Using Encapsulation concept for Test1 class. package Exam; public class Test1 { private static int index = 0; public int x; Test1(){ index ++; } public static int getlndex () { return index; } public void prints(){ System.out.println("Hi Students!"); } } public class Test2 extends Test1 { @Override public void prints(){ System.out.println("OOP!"); } } public class Main { public static void main(String[] args) { } }
- 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() } }public class LabProgram { public static void main(String args[]) { Course course = new Course(); String first; // first name String last; // last name double gpa; // grade point average first = "Henry"; last = "Cabot"; gpa = 3.5; course.addStudent(new Student(first, last, gpa)); // Add 1st student first = "Brenda"; last = "Stern"; gpa = 2.0; course.addStudent(new Student(first, last, gpa)); // Add 2nd student first = "Jane"; last = "Flynn"; gpa = 3.9; course.addStudent(new Student(first, last, gpa)); // Add 3rd student first = "Lynda"; last = "Robison"; gpa = 3.2; course.addStudent(new Student(first, last, gpa)); // Add 4th student course.printRoster(); } } // Class representing a student public class Student { private String first; // first name private String last; // last name private double gpa; // grade point average…class Vehicle{String s = "This is my vehicle" ;}class Car extends Vehicle{String s = "This is my car" ;{System.out.println( super .s);}} class Truck extends Car{String s = "This is my truck" ;{System.out.println( super .s);}}public class MainClass{public static void main(String[] args){Truck t = new Truck ();System.out.println(t.s);}}
- Question 13 What is outpout? public class Vehicle { public void drive(){ System.out.println("Driving vehicle"); } } public class Plane extends Vehicle { @Override public void drive(){ System.out.println("Flying plane"); } public static void main(String args[]) { Vehicle myVehicle= = new Plane(); myVehicle.drive(); } Driving vehicle syntax error Flying plane Driving vehicle Flying plane }/* TestCarSensor.java - program to test the CarSensor class.*/public class TestCarSensor{public static void main (String[] args){CarSensor generic = new CarSensor();CarSensor tempCel = new CarSensor("temperature sensor", -50, +300, "C"); CarSensor speed = new CarSensor("speed sensor", 0, 200, "km/h"); CarSensor speed2 = new CarSensor("speed sensor 2", 0, 200, "m/h"); // 2. test changing desc and limitsSystem.out.println ();System.out.println ( generic ); // display generic sensor (zero)generic.setDesc ("special sensor"); // change descriptiongeneric.setLimits (-5,5,"units"); // change limitsSystem.out.println ( generic ); // display generic sensor again// 3. test displaying object (calling .toString() )System.out.println ();System.out.println ( tempCel );System.out.println ( speed );System.out.println ( speed2 );// 4. test setlimits() ruleSystem.out.println ();System.out.println ( generic ); generic.setLimits (10, -10, "blah"); System.out.println ( generic ); generic.setLimits (-10,…8. OOPS Theory #6 public class Car { public void horn() { System.out.println("Horn horn"); } } public class Ferrari extends Car { public void horn() { System.out.println("Ferarriiiiii"); } } public static void main(String[] args) { Ferrari ferrari = new Car(); ferrari.horn(); } Pick ONE option Horn horn Ferarriiii Cannot compile Runtime exception Clear Selection 9. OOPS Theory #7 In Java, we can achieve the abstraction by creating the blueprint of an object and only have abstract methods. What do we call this? Pick ONE option Interface Encapsulation Instance Protected Clear Selection