basic java code, self-learner here so pls do use more // comments ya if needed pls label the solution with the question label Just needed the the question b &c , a I have done
Q: How can I make the program display duplicates ONLY please.
A: In this question we will write a C# program to display duplicates alphabets in the sentences. Let's…
Q: Which of the following is not the rule for writing PHP? A Whitespace sensitive B Case…
A: Which of the following is not the rule for writing PHP? We have four options White space sensitive…
Q: Suppose the function x1 = (a + c) mod m is used to generate pseudo random number. Assume:…
A: Given function xn+1 = (axn+c)mod m m=11 a=6 c=2 x0 = 5
Q: (1) Prompt the user to input an integer, a double, a character, and a string, storing each into…
A:
Q: Write a program that reads an integer, a list of words, and a character. The integer signifies how…
A:
Q: Given two regular expressions α = 0∗ + 1∗ β = 01∗ + 10∗ + 1∗0 + (0∗1)∗ find a.- a word that belongs…
A: Here are all the words required.
Q: 1. Use C PROGRAMMING LANGUAGE ONLY 2. Use RECURSION type of program 3. Copy and paste your code(no…
A: code- #include<stdio.h>int fibonacci(int n){ if (n <= 1) return n; return…
Q: Given a hard drive with the following characteristics: 1024 B sector 15,000rpm 4 ms average seek…
A: Hard drive is used to store the informations. It is the hardware component that used to store the…
Q: Why will two ISPS at the same level of the hierarchy often peer with each other? How does an IXP…
A: Why will two ISPS at the same level of the hierarchy often peer with each other? How does an IXP…
Q: What is overloading and overriding in java?
A:
Q: What is the evaluation of the print statement in the code below? int a = 2: int b 3…
A: The Statement is evaluated as follows Statement 1 : ( a==b || a+1>=b && a*b>5 )…
Q: Why will two ISPS at the same level of the hierarchy often peer with each other? How does an IXP…
A: Why will two ISPS at same level of hiearachy often peer each other how does IXP earn money??
Q: Some signalling errors can cause entire ranges of bits in a packet to be overwritten by all Os or…
A:
Q: Consider the following P = {P1, P2, P3, P4, P5) R = (R1, R2, R3, R4) E = {P3 R1, P2R2, R4P4, R2→P1,…
A: Given that, P = {P1, P2, P3, P4, P5} R = {R1, R2, R3, R4} E = { P3→R1, P2→R2, R4 →P4, R2→P1, P5→R3,…
Q: Directions: Create a C++ program for the case problem below. Encode and run the program in Dev C++…
A: CODE: #include <iostream> using namespace std; int main() { int n1, n2, n3, n4; cout…
Q: ARP Request Destination MAC: FF:FF:FF:FF:FF:FF
A: Introduction: Below describe the How its function Destination MAC
Q: (i) Create a method called checkLast Digit that receives a String parameter. The method will display…
A: the answers is an given below :
Q: What do you mean by inline function?
A: answer is
Q: 9) Let f: RR be such that f(x) = 2x+5. Is f an injection? A surjection? A bijection? Is f…
A:
Q: The one-way communication model by Berlo refers to component? A. Penerima Mesej-Komputer-Maklum…
A: Answer : Pengirim-Mesej-Saluran-Penerima / Sender-Message-Channel-Receiver is the correct answer.
Q: Suppose that the roundtrip delay between sender and receiver is constant and known to the sender.…
A: Assume that the sender and receiver have a constant roundtrip delay and that the sender is aware of…
Q: in c# Write a console app that inputs a sentence from the user (assume no punctuation), then…
A: The program is written in step 2
Q: What enhancements would you make to the current safety and security provided by Windows OS? Do…
A: The correct answer for the above question is given in the following steps for your reference.
Q: Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes.…
A: Here we have given solutions to the multiple questions asked. you can find the solution in step 2.
Q: Suppose that the roundtrip delay between sender and receiver is constant and known to the sender.…
A: Assume that the sender and receiver have a constant roundtrip delay and that the sender is aware of…
Q: I will give you multiple downvotes and report yo
A: SUMMARY I might suggest to use strong encryption and decryption methods for the extra safety of the…
Q: Why will two ISPS at the same level of the hierarchy often peer with each other? How does an IXP…
A: The answer is given in the below step
Q: What will be the output of the given program class A { int m=20, n=30; void display() {…
A: Here A and B are two classes. Class B inherits from class A. Class A has two data members m and n.…
Q: 7. Assuming that an operator overload for the stream extraction operator is created for class Planet…
A: 7. option c , cin>>Planet p; 8. True 9. option c, both a and b are correct
Q: Remove all errors from the C++ program given below as #include using namespace std; int main(){ int…
A: Here is all the errors and fixed code:
Q: What is an appropriate children friendly game that can be developed to educate on Climate change?
A: Game that is based on concept of Increasing pollution level and wastes is best for children that can…
Q: In Java, If a semicolon is placed at the end of a for statement, the action of the for loop is…
A: The statement is true. The explanation is given below:
Q: 1. Which of the following will display the last value in vector x? a. cout << x[last] << endl; b.…
A: Q1 (c) is the correct answer end() function return an iterator pointing to the the lastmost element…
Q: .4 Consider a microprocessor that has a block I/O transfer instruction such as that found on the…
A: please check the solution below
Q: Consider sending a large file of F bits from Host A to Host B. There are three links (and two…
A:
Q: Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the…
A: Here we have given the effect of TCP flow control.You can find the solution step 2.
Q: Write a do-while loop that continues to prompt a user to enter a number less than 100, until the…
A: The correct java code with while loop in use is given below
Q: How can I display this program with ONLY duplicates instead of removing them?
A: Here we have represented code with duplicates instead of removing them. You can find the solution in…
Q: What is constructor chaining and how is it achieved in Java ?
A: - We have to talk about constructor chaining in Java.
Q: A PC-relative mode branch instruction is 3 bytes long. The address of the instruction, in decimal,…
A: EA for the pc address = next instruction address + offset(signed number) next instruction address…
Q: A stage of an n x n banyan network consists of (n/2) 2×2 switching elements. The first stage directs…
A: Here we have given solution for the question asked. You can find the solution in step 2.
Q: Given the MileageTrackerNode class, complete main() in the MileageTracker LinkedList class to insert…
A: Here is Java code : //MileageTrackerLinkedList.java import java.util.Scanner; public class…
Q: R17. Describe the purpose of two types of OpenFlow messages (of your choosing) that are sen from a…
A:
Q: Assume that a computer system is having 4-page frames for holding process pages in the main memory.…
A: In FIFO algorithm, frame which has been occupied first will be first choosen for replacement. In…
Q: Suppose you want your firewall to block all incoming Telnet connections but to allow outbound Telnet…
A: Telnet Connections We need to modify our firewall in such a way that we can obstruct all the…
Q: 0 2 A. 0 OB. 1 2 3 4 5 6 7 20 15 16 13 10 12 30 0 20 1 2 3 4 5 6 7 20 15 16 13 10 12 2 C. 1 2 3 4 5…
A: Given array of elements is: 30, 20, 15, 16, 13, 10, 12, 2 respectively. The address of the array…
Q: Given the following regular expressions, write, for each of them, a word that belongs to the…
A: a. Given regular expression is, (1*+0*)(1*+0*)(1*+0*) The string or the word that belongs to this…
Q: DTSC670: Foundations of Machine Learning Models Assignment 2: COVID-19 Data Wrangling Name:…
A: Note: The code functions as the problem is described above. For your reference, I have included…
Q: Write a new static method of the IntBTNode class to meet the following specification. public…
A: BELOW A NEW STATIC METHOD OF THE intbtnode CLASS
Q: Question 1 (a) For each statement below, state whether the statement is true or false (i) The…
A: Answers : The precedence of operator && is the as operator || . (False) The default value…
basic java code, self-learner here so pls do use more // comments ya if needed
pls label the solution with the question label
Just needed the the question b &c , a I have done
Step by step
Solved in 5 steps with 7 images
- 1 - 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…Please complete the following tasks: Write a class “Actor” that contains two attributes with the appropriate level of visibility explicitly defined. “Name” which is a String, Private, “NumberofAwards” which is an integer, private Write a default Constructor for this class that initializes the name to “Bob Smith” , and the number of awards to 0. Write an overload the constructor for this class that accepts actor’s name as a parameter Write accessor methods for each of the attributes. Write a method “winsAnOscar” that increases the number of awards by one and prints “The crowd applauds for <actor’s name>!” Be sure to use accessors where appropriate. Make sure your header is complete, with the appropriate level of visibility and any required keywords.Write a graphical application that contains a class named RV whose objects are the recreational vehicle designed and digitized as described in Knowledge Exercises 20 and 21 (you can design your version as well. Simple car shape is will be appreciated. The class’s private data members should be the vehicle’s body color and (x, y) location. a) Give the UML diagram for the class. It should include a three-parameter constructor, a toString method, a method to input the values of all of an object’s data members, and a show method to draw the RV at its current (x, y) location. b) Progressively implement and test the RV class by adding a method and verifying it before adding the next method. A good order to add the methods to the class is the three-parameter constructor, followed by the toString method, the show method, and finally the inputmethod. The client code should create an RV object using the three-parameter constructor to test all of the methods as they are progressively added to the…
- Imagine a publishing company that markets its works. Create a class publication that stores the title (a string), author (string), pages (int), pulicationDate (string) and price (type float) of a publication. There should be two constructor i.e. default and parameterized. The default Constructor should initialize the data members to 0 or 0.0 or “” if integers, floating point or string respectively. The parameterized constructor should assign user defined values to the data members. The default constructor should be inline while the parameterized constructor should not be inline. There should be an input/get function to input the values to the data members and a Print() to display the contents of the class variables/datamembers. Create two objects of the class named book, and tape. The book should be created with default constructor, while tape with parameterized constructor. Call input/get for book object only. Then call Print() for both the objects to display the contents. Mention…Part (1) Define a class as follow: a. create a class called Student that has four instance variables - a (String) name, a (long) StudentID, a (String) College, and a (double) GPA. b. A constructor that takes student name, StudentID, College and GPA. The constructor sets the class variables to these values . c. Make the instance variable GPA private and provide a mutator method (set) and an accessor method (get) to access this variable. In set method if the GPA negative or grater than 4.00 print an invalid message and do not change the instance variable GPA. d. A method Student_Status () that check the GPA if it is less than 2, display the warning message, otherwise display Normal student. e. A method Print() that displays the name, StudentlD, College and GPA of the student as shown below: Sample output: Enter the Student name: Ali Ahmed Enter the Student ID: 20180011 Enter the College: Information Technology Enter the GPA: 3.2 Normal student Name: Ali Ahmed Student ID: 20180011…Part (1) Define a class as follow: a. create a class called Student that has four instance variables - a (String) name, a (long) StudentID, a (String) College, and a (double) GPA. b. A constructor that takes student name, StudentID, College and GPA. The constructor sets the class variables to these values . c. Make the instance variable GPA private and provide a mutator method (set) and an accessor method (get) to access this variable. In set method if the GPA negative or grater than 4.00 print an invalid message and do not change the instance variable GPA. d. A method Student_Status () that check the GPA if it is less than 2, display the warning message, otherwise display Normal student. e. A method Print() that displays the name, StudentiD, College and GPA of the student as shown below: Sample output: Enter the Student name: ALİ Ahmed Enter the Student ID: 20180011 Enter the College: Information Technology Enter the GPA: 3.2 Normal student Name: Ali Ahmed Student ID: 2018ee11…
- Part (1) Define a class with the following specifications: The class name is HeightWeightRatio with three private data members: gender (String as male or female in any letter case), height (double in cm), and weight (double in kg). Write a constructor that accepts gender, height and weight as input parameters to initializes the private data members. Provide an accessor (get) method and a mutator (set) method for the height data member. d. Define a public method called checkRatio() which checks the height/weight ratio and returns the decision as Boolean. The height/weight ratio decision is checked as the following: а. b. С. Male: Acceptable when weight is between (height-105) and (height-95); otherwise, is not acceptable Female: Acceptable when weight is between (height-100) and (height-90); otherwise, is not acceptable е. Define a public method called showDetails() to show all details as in the following sample: Gender is Male Height is 170 CM Weight is 74 KG Part (2) Write a Java…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…1. Create a Student class that implements the Person interface. As well as storing the students name and email, also store their course grade (e.g A, B, C) in a member variable. The grade should be accessible via a getGrade method. For the implementation of getDescription return a message along the lines of “A C grade student”, substituting the students actual grade.2. Create a Lecturer class that implements the Person interface. This class should also store the subject that the lecturer teaches. Add a getSubject method, and implement getDescription so that it returns a suitable message, e.g. “Teaches Biology”.3. Create a third class, Employee that implements the interface. This should also store the name of the department the Employee works in (available via getDepartment). Again, getDescription should return a suitable message.
- Java Object Oriented Programming Create a Shape class that shall have color and filled instance variables of enum Color and boolean type. The filled boolean variable shall show, whether the shape is filled (colored). The enum Color shall be defined within the class having 4 color names (choose any four). Also define getArea and getPerimeter method in Shape class, both shall return 0. Create Rectangle class with length and width attributes and a Circle class with radius attribute, of type double. Properly encapsulate all fields. Circle and Rectangle shall extend Shape class and override getArea and getPerimters methods as per its type and specific formula. In Test class, create an object of Rectangle and Circle, by initializing all attributes in constructor and print both shapes' area and perimters. In Test class, define a static method with following signature, public static void printEachShapeCount(Shape... shapes) As you know, the parent type variable can hold the…Part (1) Define a class with the following specifications: The class name is HeightWeightRatio with three private data members: gender (String as male or female in case), height (double in cm), and weight (double in kg). Write a constructor that accepts gender, height and weight as input parameters to initializes the private data members. Provide an accessor (get) method and a mutator (set) method for the height data member. d. Define a public method called checkRatio() which checks the height/weight ratio and returns the decision as Boolean. The height/weight ratio decision is checked as the following: а. any letter b. С. Male: Acceptable when weight is between (height-105) and (height-95); otherwise, is not acceptable Female: Acceptable when weight is between (height-100) and (height-90); otherwise, is not acceptable е. Define a public method called showDetails() to show all details as in the following sample: Gender: Male Height: 170 cm Weight: 74 kg Part (2) Write a Java…1. Create a class called Plant with the data member plant name and color. 2. Create a child class called Tree with data member tree name, tree number and color. Inherit all the properties and behaviors from the base class to the child class. 3. Find the total number of times, character ‘a’ available in the plant name and tree name and display the method name as compare. 4. Use display method in both the classes to display“I am Plant” in parent class, and “I am Tree” in child class with all inputs needs to be displayed. Note: Get all the inputs through scanner class.