Given the following class definitions and a declaration of Book b = new Dictionary() which of the following will cause a compile-time error?
Q: write a program in c++ that contains declares a student_t data structure and defines functions to:*…
A: write a program in c++ that contains declares a student_t data structure and defines functions to: *…
Q: Complete the truth table by filling in the required columns. p q ~p q-> ~p ~(q-> ~p) T T…
A: According to the information given:- We have to fill the blanks of the mentioned truth table.
Q: F=ab+abc+b'c'+a'b'c' Simplify above Boolean function algebraically
A: Provided function is: F = ab + abc + b'c' + a'b'c'
Q: One of the benefits of a honey pot is that it affords a person the opportunity to commit crimes…
A: The above question is solved in step 2 :-
Q: pq is logically equivalent to a.-pv-q b. -p ^q c. pv-q d.-pvq
A:
Q: Hello, I tried the this code, but I am not getting any output.
A: Given C++ program is, #include <iostream>#include <vector>using namespace std;void…
Q: How is the proliferation of mobile devices that are locally powerful, use apps instead of…
A: The complete answer is given below:-
Q: IN Java Overloaded Sorting. In class, we have primarily used integer arrays as examples when…
A: Complete answer is Java Programming is below:
Q: Here are some example program dialogues to guide your efforts: Feed Me: 5 55555 5 5 5 5 5 5…
A: Given sample code: int i, n, j;printf( "Feed Me:" );scanf( "%d", &n );for (i=1; i<=n; i++)…
Q: 1. Consider the network shown in Figure 4.28, in which horizontal lines represent transit providers…
A:
Q: - Suppose a TCP message that contains 1024 bytes of data and 20 bytes of TCP header is passed to IP…
A:
Q: Suppose the Ethernet transmission algorithm is modified as follows: After each successful…
A: Before transferring the data, the channel is detected in accordance with the Ethernet Transmission…
Q: There are blank 3 digit counting numbers that are made using only the odd digits 1,3,5,7,9?
A: To form a 3 digit number using 1,3,5,7,9. We know that all the 3 digit places are must be one of the…
Q: Prompt Problem: A company wants a program that will calculate the weekly paycheck for an employee…
A: Flowchart:
Q: using HTML Create a web page that will pop up an alert message that welcomes the user to the web…
A: The above question is solved in step 2 and step 3 :-
Q: Describe ways in which social media platforms are abused
A: Social media platforms can be misused in a variety of ways. For instance, someone may use them to…
Q: Develop a WBS based on the following project description: “The project consists of developing a new…
A: please check the step 2 for WBS for a new website development project,
Q: c-2. Figure below shows a code written in C to run on a Linux-based operating system. (a) What are…
A: steps needed to compile and run this code.
Q: Q1) Which encryption method is better: stream cipher or block cipher and why?
A: ANSWER:-
Q: index=0 for 1 to 20 //get user input value into array arr[index]=input index-index +1 //calculate…
A: C++ program for ( 2a. ) #include<iostream> using namespace std; //2a. complete c++ program…
Q: Using python, consider the following function: f(x)= sin (4(x-1/4)) for x€[0,2]. 1. Plot the…
A: Answer:- Given Function :- f(x)= sin (4(x−1/4)) for x∈[0,2] The expression in Sin() function can be…
Q: A program to converts a binary value between 0 and 9 in R4 into its ASCII representation is to be…
A: Input: str = “0110000101100010”Output: abExplanation:Str is divided into 8 bits as follows: 01100001…
Q: Write a similar program to compare two vectors. we should make 6 test : same length the first is…
A: Here below i am writing c++ program to compare two vectors:…
Q: Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order…
A: 1) The smallest working value for MaxSeqNum is 8 It suffices to show that if DATA[8] is in the…
Q: I am writing a method to remove the first element in a doubly linked list. However I am supposed to…
A: While handling exceptions, In the 'catch' block we need to provide exactly what our 'try' block can…
Q: Suppose a router has built up the routing table shown in Table 3.19. The router can deliver packets…
A:
Q: What are the main differences between the BSS and ESS wireless topologies? Create the topologies and…
A: The Answer is in step2
Q: In cell g2, enter a formula using the AND function that includes structured references to display…
A: According to the information given:- We have to perform the above formula in excel.
Q: 1. Write a JavaScript statement to accomplish each of the following tasks: a) Declare variables…
A: JavaScript:- Java Script can be both server side and client side. Client-side javascript is the…
Q: c) Assuming an 8-bit system is used (i.e. the system uses 8 bits to represent an integer): (i) (ii)…
A: This question comes from Number System which is a paper of Computer Science. Let's discuss it in the…
Q: Trying opening my computer screen online for my class please send me a computer to address Dallas…
A: See second step.
Q: ose of Garbage Collection in lay
A: Purpose of Garbage Collection in Java: Java applications obtain objects in memory as needed. It is…
Q: I need help in this question in C program. Assume the following declarations: struct EmployeeTag {…
A: The question is to write C code for the given problem.
Q: Give some details of how you might augment the sliding window protocol with flow control by having…
A: We assume ACKs carry an additional variable k, which indicates the available buffer space of the…
Q: Path MTU is the smallest MTU of any link on the current path (route) between two hosts. Assume we…
A:
Q: Do fast, I have no time left Write a java program to check if a string contains the vowels or not
A: import java.util.Scanner;import java.util.regex.Matcher;import java.util.regex.Pattern;public class…
Q: Suppose that we run the sliding window algorithm with SWS = 5 and RWS = 3, and no out-of-order…
A: The sliding window algorithm can be a very effective tool for solving issues that call for verifying…
Q: . Consider the sliding window algorithm with SWS = RWS = 3, with no out-of-order arrivals and with…
A:
Q: Assume that a file containing a series of integers is named numbers.txt . Write a program that…
A: GIven: Assume that a file containing a series of integers is named numbers.txt . Write a program…
Q: How would I translate this c++ code into assembly? Done on CCS for MSP432
A: The g++ compiler can be utilized to convert the C++ code into assembly language. To view the…
Q: Suppose the Ethernet transmissi follows: After each successful tra one or two slot times before atte
A: According to Ethernet transmission algorithm, the channel is sensed before transmitting the data. If…
Q: 1. Given L₁ = {a, abc, a c) and L₂ = {ab, c ba) are the languages over = {a, b, c), determine L₁ L2…
A: Given :
Q: Discuss THREE (3) key features of digital watermarks.
A: A digital watermark is a process of embedding digital data into the photograph or other media that…
Q: . Suppose A is connected to B via an intermediate router R, as in the previous problem. The A-R link…
A: Consider the situation wherein there are two computers, A and B as shown below, with a router R in…
Q: #include #include using namespace std; //Function 1 void vectorOutput(vector doubleVector) {…
A: Changes to your program has been made according to the demand of the question. All the changes have…
Q: a) A paging system with 512 pages of logical address space, a page size of 2* and number of frames…
A:
Q: Question 01: Write a program in to display the pattern using a Nested for loops. C -C P-C rP-C orP-C…
A: Solution : #include<stdio.h> #include<string.h> int main() { char a[20]; int i,j;…
Q: Your task is to create a program that could be used to calculate the cost of purchasing several…
A: Program Plan: Create a class ShoppingCart as follows: Initialize variables to store TAX, index, and…
Q: What is needed to build a database in the physical world? Make a list of some of the most popular…
A: Introduction A database is a coordinated assortment of organized data, or information, normally put…
Q: need help in this C Program. Write a program that will read the contents of "essay.txt". The output…
A: We are asked to write a program that will read the contents of "essay.txt". The output of the…
Step by step
Solved in 2 steps
- Answer the given question with a proper explanation and step-by-step solution. public class MainClass{ public static void main(String[] args) { SomeClass myObject = new SomeClass(4, 5); int fred = SomeClass.SOME_VALUE; int barney = myObject.method1(); int wilma = SomeClass.method2(4); }} Which of the following is a static variable a method1 b method2 c SomeClass d SOME_VALUE e This cannot be determined by examining the above codeThe Java Programming class has two types – remote and in-person. For remote students, the weighted score comprises of midterm, final, assignments and discussion. The weights for each are 30%, 30%, 30% and 10% respectively. For in-person students, the weighted score comprises of midterm, final and assignments. The weights for each are 30%, 30% and 40%. Write a generic class Students.java which has a constructor that takes three parameters – id, name, and type. Type will represent if the student is ‘remote’ or ‘in-person’. A toString() method in this class will display these details for any student. A generic method score() will be part of this class and it will be implemented by inherited classes. Write accessors and mutators for all data points. Write two classes RemoteStudents.java and InPersonStudents.java that inherits from Student class. Show the use of constructor from parent class (mind you, RemoteStudents have one additional parameter – discussion). Implement the abstract method…Computer Science import java.time.LocalDate; import java.util.List; public class Birthdays { //todo A // Java 8 added an improved date & time API. // New classes were added like LocalDate, Period and others. // What does API mean in this context? // Answer: // // // //todo B // In the main method initialize birthdays of all of your team mates (do not have to be real birthdays). // Call function "oldest" to find out who is the oldest. You will have to modify "oldest" to work properly. // Hint: when googling add java 8 to your search // Print out the result (oldest date). //todo C // Create a function to find out the age of person. // Hint: all the classes you require are mentioned on line 10 // Print out the result (age in years). public static void main(String[] args) { } /** * returns the oldest/earliest date */ public static LocalDate oldest(List<LocalDate> birthDays){ return null; } }.
- Consider the following class hierarchy: class Animal { ... } class Mammal extends Animal { ... } class Cat extends Mammal { ... } Write a generic method printArray that takes an array of any type and prints each element of the array. If the element is an instance of Animal or its subclass, the method should call the toString method of the object to print its details. Otherwise, the method should simply print the element. Your method should have the following signature: public static <T> void printArray(T[] array)Given a class Square with an instance variable width, provide a recursive getArea method. Construct a square whose width is one less than the original and call its getArea method. Make a resource class that contains all of the methods and make a driver class in a separate file, and the driver class only needs to call those methods. The driver class needs to have only 5 lines of code. The code will need to be written in Java. Please help me with exactly what I asked for helpplease i need add interface to my code please // Java Program interface University { public void add(int id, String name); } class Person { String name; int id; Person(String name, int id) { this.name = name; this.id = id; } } class Student extends Person { String Specialization; double gpa; Student(String name, int id, String Specialization, double gpa) { super(name, id); this.Specialization = Specialization; this.gpa = gpa; } } class Employee extends Person { String jop; int salary; Employee(String name, int id, String jop, int salary) { super(name, id); this.jop = jop; this.salary = salary; } } public class Main { public static void main(String[] args) { // creating the Objects of sub classes Student s = new Student("Ritika", 20, "CSE", 7.5); Employee e = new…
- //PLEASE CORRECT MY MISTAKES, THANK YOUpublic class Person { private String personID; private String firstName; private String lastName; private String birthDate; private String address; public Person(){ personID = ""; firstName = ""; lastName = ""; birthDate = ""; address = ""; } public Person(String id, String first, String last, String birth, String add){ setPerson(id,first,last,birth,add); } public void setPerson(String id, String first, String last, String birth, String add){ personID = id; firstName = first; lastName = last; birthDate = birth; address = add; } public String getFirstName(){ return firstName; } public String getLastName(){ return lastName; } public String getBirthdate(){ return birthDate; } public String getAddress(){ return address; } public void print(){ System.out.print("\nPerson ID = " + personID); System.out.print("\nFirst Name = " +firstName); System.out.print("\nLast Name = " +lastName); System.out.print("\nBirth Date = " +birthDate);…Draw the UML diagram for the classes and its relationships for this code: import java.util.ArrayList;public class Main { public static void main(String[] args) {Market superMarket = new Market(10);}class Market { private ArrayList<String> fruits = new ArrayList<>(); private int fruitsNumber; public Market(int fruitsNumber) { if (fruitsNumber > 0) { this.fruitsNumber = fruitsNumber; }else { throw new IllegalArgumentException("This argument is not valid"); } } private synchronized boolean isFull() { return fruits.size() == this.fruitsNumber; } private synchronized boolean isEmpty() { return fruits.isEmpty(); } public synchronized void farmer(String fruit) { if (isFull()) { System.out.println("We can not accept more fruites at the moment !!"); try { wait(); }catch (InterruptedException e) { System.out.println("Interruption"); } } fruits.add(fruit); System.out.printf("fruit : %s is added !!!%n", fruit); }…The Doctor program described in Chapter 5 combines the data model of a doctor and the operations for handling user interaction. Restructure this program according to the model/view pattern so that these areas of responsibility are assigned to separate sets of classes. The program should include a Doctor class with an interface that allows one to obtain a greeting, a signoff message, and a reply to a patient’s string. To implement the greeting, define a method named greeting for the Doctor class. To implement the signoff message, define a method named farewell for the Doctor class. Both greeting and farewell should return a string with a greeting or farewell message respectively. The reply function is defined for you, it should be added as a method for the Doctor class. The rest of the program, in a separate main program module, handles the user’s interactions with the Doctor object. Develop this program with a terminal-based user interface. Note: The program should output in the…
- Write a generic class Students.java which has a constructor that takes three parameters – id, name, and type. Type will represent if the student is ‘remote’ or ‘in-person’. A toString() method in this class will display these details for any student. A generic method score() will be part of this class and it will be implemented by inherited classes. Write accessors and mutators for all data points. Write two classes RemoteStudents.java and InPersonStudents.java that inherits from Student class. Show the use of constructor from parent class (mind you, RemoteStudents have one additional parameter – discussion). Implement the abstract method score() of the parent class to calculate the weighted score for both types of students. Write a driver class JavaProgramming.java which has the main method. Create one remote student object and one in-person student object. The output should show prompts to enter individual scores – midterm, finals, ...... etc. and the program will…A class Pet is the superclass of the class Dog. The Dog class has a fetch() method defined, but the Pet class does not. Does the following code compile? If not, how can it be modified so that it will compile? Pet p = new Dog(); System.out.println(p.fetch());Consider that a system has two entities, Student and Course. The student has the following properties:student name, number, SSN and GPA. Similarly, the course has the following properties: course name,course number, credit hours and a set of students who are currently registering on the course.Implement the above system taking into account the following requirements:1.Write a getStudentpByName method in class course that takes a student name and returnsa list of all students who share the same name.2. Write a getStudentByGPA method in class course that takes a GPA and returns a list ofStudents in that course who have the same GPA.