Q: Help me please
A: The answer is given in step 2.
Q: Create a C++ student enrollment system using classes and objects. The program should ask the student...
A: #include<iostream>using namespace std;class student{ private: char name[30]; char add[50]; ...
Q: PLZ helpw the following IN JAVA A button fires events know as: static events passive events dynamic...
A: EXPLANATION: Dynamic events are basically those events that enables the programmar to define variou...
Q: c++ programming
A: Given Code: int main(){ int x=5, y=3; string s = "Hi", r="There"; cout<<add(x,y)<&...
Q: Write a Java program that includes a try... catch statement in it that does the following: Implement...
A: Java Code for the question :- import java.util.*;class Main { public static String[] mergeUniq...
Q: Let A = {1, 2, 3, 4} and R be a relation on A described by the matrix below. [1 0 0 1] 0 0 0 1 MR = ...
A: Answer to the above question is in step2.
Q: Write the static method dayOfWeek, which returns the integer value representing the day of the week ...
A: Actually, program is an executable software that runs on a computer.
Q: Relational Database Consider the following relation: Invoice(Order_ID, Order_Date, Customer_ID, Cust...
A:
Q: Help me please
A: For efficiency reasons it is often useful to keep fixed parameter values for many users of a cryptog...
Q: Discuss the use of the personas, scenarios and prototypes in the user experience design process
A: Use of personas: In user centered-design, personas help the design team to target their designs arou...
Q: Write a C++ program that takes an integer from user and check whether the number is multiple of 4 or...
A: PROGRAM CODE: #include <bits/stdc++.h> // include header file for standard c++ lib...
Q: C++ program
A: PROGRAM CODE: #include <iostream> // include header file for input output stream...
Q: Help me please
A: The assumption that is made when assessing the security of a protocol is that the attacker is able t...
Q: C++code
A: Please find the answer below
Q: Please solve this problem in java language
A: The program code for the given scenario, in the main class Declare the variable choice, ch as char....
Q: Write program for Kurskal’s algorithm to finding the MST of a weighted graph.
A: Sample Response: //C++ program for the Kurskal’s algorithm to finding the MST of a weighted graph#in...
Q: Muscat marketing research company is conducting a rating survey of different chains of supermarkets....
A: Code: #include<iostream>#include<conio.h>#include<fstream>#include<string>#i...
Q: Explain - Help me please
A:
Q: 1. What is the output of the following program? 2. Also, explain the functionality and output of the...
A: EXPLANATION: In the main function, the object is declared for the type M which is not declared in t...
Q: 12- Find the result for the following. a- (-27)10 +(-41)10 (in binary, then convert the answer to de...
A: a) (-27)10 +(-41)10 (in binary, then convert the answer to decimal) Answer : According to my cal...
Q: Muscat marketing research company is conducting a rating survey of different chains of supermarkets....
A:
Q: Java program: Implement a mergeUniqueValues(arr1, arr2) method. When passed two arrays of strings, i...
A: Given : Java program: Implement a mergeUniqueValues(arr1, arr2) method. When passed two arrays of st...
Q: Database Management A relation R is given which is R(A,B,C,D,E,F). It has the following functional d...
A: AB -> CDE, B -> F. Here, we can see the partial dependency so the given relation is not in ev...
Q: Define a recursive function that will add the sum of of the numbers in a finite sequence.
A: Answer : Python program to illustrate recursion to find sum of finite sequence.
Q: Four-Variable K-Maps Exercise
A: Q.
Q: When designing a class hierarchy, it is important that common features be ________________________ ....
A: Class hierarchy is the structure of classes. In other words it is layout .
Q: The product of sum (max term) form of the boolean function F= x+y'z is (x +y' +z) (x + y' + z') (x' ...
A:
Q: Muscat marketing research company is conducting a rating survey of different chains of supermarkets....
A: Answer is given below .
Q: Write a C++ program that counts the number of even digits (including the number of zeros) and oddsfr...
A: // C++ program to count// even and odd digits// in a given number#include <iostream>using name...
Q: Exercise 3.1:Write a C++ program for a recruitment agency. The program takes candidates personal ,ed...
A: I have provided detailed solution in step2
Q: QUESTION 6 The Queue data structure follows principle: O First in First Out (FIFO) O Last-in-First-O...
A:
Q: Let p: Sarah orders a cake for her sister, q: Sarah buys some cookies, r. Sarah goes to bakery shop....
A: Answer to the above question is in step2.
Q: plz help IN JAVA What is wrong in the following code?
A: //we are getting the error because X is an Number and new Integer is an integer so we are not able t...
Q: It will be written in C ++ language. Ostim Technique University Proffessor is teaching two courses, ...
A: //GradeBook.h interface File#include<iostream>using namespace std;class GradeBook{ public: st...
Q: explain how Human centred design (HCD) principles inform the practice of User Experience design (UXD...
A: The answer is given in step 2.
Q: Choose the most appropriate word from Symmetry, Similarity, Closure, Continuity or Proximity to desc...
A: I have provided a solution in step2
Q: Consider a cipher block with an 8-bit key. This cipher has how many input blocks? What is the total ...
A: I Have answered this question in step 2.
Q: Write an algorithm to calculate even numbers between 1 and 100
A: Algorithm Explanation: Step1: Declare an integer iterator. Step2: Initialise the iterator to 1. Run ...
Q: 7. Consider the following high-level code snippet. Assume that the base addresses of temp is held in...
A: 7. Answer:- Mov R0, #1; i=0 start loop CMP R0, #100 BGT endloop Mul tempi, tempi, 128 Add R0, R0, #...
Q: Classify the languages below into the categories regular (R), context-free but not regular (C), deci...
A: It is defined as a language which is generated by a context-free grammar or Type 2 grammar(according...
Q: Can you write a student grade averaging program with a project hadder file from classes in C ++ lang...
A: Code: def read_test_scores() : print("ENTER STUDENT ID: ") id = int(input()) print("ENTER...
Q: Find a topological sort of the following graph using DFS. You must label each vertex ソ with its DFS ...
A: DFS :- Depth First Search It is a recursive algorithm for searching all the vertices of a graph . C
Q: PLZ help with the following IN JAVA Suppose that statement2 causes an exception in the following tr...
A:
Q: Java Write a method to return the first duplicated string in an array. Comparison must check case (e...
A: Answer: ublic class arrays { public static void main(String[] args) { String[] myNumbers =...
Q: A (A v q) is a Select one: a. all of the mentioned b. non of the mentioned O c. Contingency O d. Tau...
A: The above given expression is in contingency, it may be tautology if it gets mapped with A. But the ...
Q: ***python only*** Write a function votes_by_race() which takes a list of dicts as a parameter and re...
A: code :-- # demo data votes = [{'for': 'A', 'age': 35, 'race': 'w'}, {'for': 'B', 'age':...
Q: Help
A: Actually, string is a sequence of characters.
Q: ► Construct a formal proof of validity for the following arguments: - If rain continues, then the ri...
A: According to the given paragraphEach sentence of the paragraph is given by, If rain continues, then...
Q: Create a C++ student enrollment system using classes and objects. The program should ask the student...
A: Given : Create a C++ student enrollment system using classes and objects. The program should ask the...
Q: Java Write a method to perform an enhanced sequential research for an integer array. The regular bin...
A: Java Source Code: // class name as CST1201Test3public class CST1201Test3 { public static vo...
PLZ help with following in JAVA
Consider the following class
Step by step
Solved in 2 steps
- this is the whole problem i did 1 to 3 im stuck at 4 Create a class called Student, with the following attributes/variables:a. studentName (String)b. studentNumber (int)sc. regYear(long)d. faculty(String)e. department(String)2. Add the following methods in Student:a. accessors and mutators for all variablesb. toString methodi. Formulate your toString so that it only shows studentName,studentNumber and faculty3. Create a class called MyFriends, with the following attributes variables:a. studentArray(Student[])4. Add the following methods in MyFriends:a. fillArrayi. Using scanner ask how many students does the user want to inputii. Capture user input for all of his friends(Of course we are assuming all your friends would be similarUWC students, go ask around and meet new friends, alsopreferably not in the same Computer Science department … ifpossible … only if possible)b. maini. Call the fillArray methodii. Count how many Computer Science studentsiii. If half or more students are…Add a private method simplify() to your Fraction class that converts a fraction to its simplest form. For example, the fraction 20 / 60 should be stored in the class instance variables as 1 / 3 (i.e. numerator = 1, denominator = 3). N.B.you will need a method to determine the Greatest Common Divisor (GCD.both of these methods (simplify and gcd) must be private. Asthese methods are private, client programs cannot access them. They can only be accessed within the Fraction class. Given their purpose, it would mean that any Fraction class method that modifies theinstance variables (e.g.: input, add, constructor, set) should call the simplify() method to reduce the instance variables to their minimum values. import java.util.ArrayList;import java.util.Scanner; class Fraction{private int n, d;public Fraction(){this.n = this.d = 0;}public Fraction(int n, int d){this.n = n;this.d = d;} public int getNum(){return n;}public int getDen(){return d;}public boolean isZero(){return(getNum() == 0…class TenNums {private: int *p; public: TenNums() { p = new int[10]; for (int i = 0; i < 10; i++) p[i] = i; } void display() { for (int i = 0; i < 10; i++) cout << p[i] << " "; }};int main() { TenNums a; a.display(); TenNums b = a; b.display(); return 0;} Continuing from Question 4, let's say I added the following overloaded operator method to the class. Which statement will invoke this method? TenNums TenNums::operator+(const TenNums& b) { TenNums o; for (int i = 0; i < 10; i++) o.p[i] = p[i] + b.p [i]; return o;} Group of answer choices TenNums a; TenNums b = a; TenNums c = a + b; TenNums c = a.add(b);
- Write all the code within the main method in the Test Truck class below. Implement the following functionality. a) Constructs two truck objects: one with any make and model you choose and the second object with gas tank capacity 10. b) If an exception occurs, print the stack trace. c) Prints both truck objects that were constructed. import java.lang.IllegalArgumentException ; public class TestTruck { public static void main ( String [] args ) { heres the truck class information A Truck can be described as having a make (string), model (string), gas tank capacity (double), and whether it has a manual transmission (or not). Include the following methods in your class definition. . An overloaded constructor which takes the make and model. This method throws an IllegalArgumentException if the make is "Jeep". An overloaded constructor which takes the gas tank capacity. This method throws an IllegalArgumentException if the capacity of the gas…Create a Main class. Create a static method in the main class isPalindrome and implement the functionality to check whether a number is a palindrome or not. Declare variables: inputNumber, reversedNumber, remainderNumber. Initialize the inputNumber and store it in the new variable originalNumber. Use a while loop and perform logic to print the reverse number of inputNumber. Compare reversed reversedNumber with originalNumber. After comparing the numbers, print "Palindrome” or "Not a Palindrome" to reflect the results. PalindromeNumberTest.java: public class Main { public static void main(String[] args) { // Paste the code for your tests here. } } PalindromeNumber.java: public class Main { public static void main(String[] args) { // Paste your code for testing a palindrome here. } }Python:Please read the following. The Game class The Game class brings together an instance of the GameBoard class, a list of Player objects who are playing the game, and an integer variable “n” indicating how many tokens must be aligned to win (as in the name “Connect N”). The game class has a constructor and two additional methods. The most complicated of these, play, is provided for you and should not be modified. However, you must implement the constructor and the add_player method. __init__(self,n,height,width) The Game constructor needs to initialize three instance variables. The first, self.n, simply holds the integer value “n” provided as a parameter. The second, self.board, should be a new instance of the GameBoard class (described below), built using the provided height and width as dimensions. The third, self.players, should be an initially empty list. add_player(self,name,symbol) The add_player method is provided a name string and a symbol string. These two values should be…
- Read the quistion entirely before ansewring the code should compile and run Create a java class called Question2, and inside this class implement a non static public method called void printLargestInEachRow( int [][] ), which takes as a formal parameter a two-dimensional array of int type, and prints the largest element in each row of the array.Also, create a main method Inside class Question2. In the main method, declare a two-dimensional array of size 4x4, and initialize it with the following values:{[1,2,3,14],[15,13,12,10],[33,35,23,22],[14,18,28,7] }Then, call the method printLargestInEachRow and pass the initialized array as an actual parameter to printLargestInEachRow.private int b; public int method3() { return b; } // in another class an object of the first class was introduced and inside the second class : float y = tester.method3(); are there any errors ? and explain pleaseWrite in python. Write a class named Employee that has **private** data members for an employee's name, ID_number, salary, and email_address. It should have an init method that takes four values and uses them to initialize the data members. It should have get methods named get_name, get_ID_number, get_salary, and get_email_address.Write a separate function (not part of the Employee class) named **make_employee_dict** that takes as parameters a list of names, a list of ID numbers, a list of salaries and a list of email addresses (which are all the same length). The function should take the first value of each list and use them to create an Employee object. It should do the same with the second value of each list, etc. to the end of the lists. As it creates these objects, it should add them to a dictionary, where the key is the ID number and the value for that key is the whole Employee object. The function should return the resulting dictionary.For example, it could be used like…
- Define a member method print_all() for class PetData. Make use of the base class' print_all() method. Sample output for the given program with inputs: 'Fluffy' 5 4444Name: FluffyAge: 5ID: 4444 this is what i have class AnimalData: def __init__(self): self.full_name = '' self.age_years = 0 def set_name(self, given_name): self.full_name = given_name def set_age(self, num_years): self.age_years = num_years # Other parts omitted def print_all(self): print('Name:', self.full_name) print('Age:', self.age_years) class PetData(AnimalData): def __init__(self): AnimalData.__init__(self) self.id_num = 0 def set_id(self, pet_id): self.id_num = pet_id # FIXME: Add print_all() member method ''' Your solution goes here ''' user_pet = PetData()user_pet.set_name(input())user_pet.set_age(int(input()))user_pet.set_id(int(input()))user_pet.print_all()*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,…class Param3 { public int x; private void increase(int p) { x = x*p; } public void calculateX(int y) { increase(y); } public int getX() { return x; } } // in another class Param3 q3 = new Param3(); q3.x = 5; q3.calculateX(7); System.out.println(q3.getX()); what would be the answer for the last two lines ? also above were x = x*p do both x in here are the fields? wouldn't that be cnofusing?