SELECT ALL of the valid statements that instantiate an object from the Bicycle class shown below
Q: Who made the first flash drive?
A: These gadgets store data without external power and turn it on when a commuter connects through a ...
Q: use Java to output the character "Z" and make it to rotate 360 degrees clockwise
A: Java Code to print Z and rotate it by 360 degree clockwise. import java.util.Scanner;public class My...
Q: Instructions Songlyrics.java 1 class Songlyrics { public static void main(string[] args) { // write ...
A: Given The answer is given below.
Q: why each device has more than one MAC address
A: A Devices may have more than one MAC address if the device has more than one network card. For examp...
Q: What is the ARM statement which correspond to the each following statement and find the value of RO?
A: The answer is
Q: number = input() while number!=id: print("This is not your ID number.") number = input() ...
A: Actually you can do without f strings too. Just put whatever you want to put after "...ID number:(he...
Q: Using OpenGL and stipple lines do: 1. a long dash and a dot, ( __________ . __________ . __________...
A: 1) a long dash and a dot - glEnable(GL_LINE_STIPPLE); glBegin(GL_LINES);
Q: What are the differences between internal and external file labels? What is the purpose of them?
A: Intro What are the differences between internal and external file labels? What is the purpose of t...
Q: Requirements prioritising and negotiation is one of the steps of requirements elicitation and analys...
A: Intro In SDLC,One of the stages of the Requirements elicitation and analysis is, Requirements priori...
Q: Q2 Define hardwired control unit and explain its working with the help of a neat and clean diagram.
A: Connected Control Unit: The control signal to be achieved with doors, flip-flops, converters, and ot...
Q: Write the pseudocode for a program that will process attendance records of CA students. The students...
A: In the below code, two arrays are created for inserting the value when student enter the college and...
Q: Make a class 'StringMethods'. It contains a private instance String variable. Add these instance met...
A: public class StringMethods { private String line; public StringMethods(String line) { ...
Q: Suppose that we have the following 128-bit AES key, given in hexadecimal representation: ...
A: Encrypting crucial components: AES employs cryptographic techniques, which entails using only one pr...
Q: A contemporary laptop has how many transistors?
A: It all depends on how much RAM you have and whether or not you have a solid-state drive (SSD). The t...
Q: ecture that has two sepa
A: It's a type of memory architecture that has two separate channels for each piece of memory.
Q: 2. Consider the system to be 64 bit, answer the following question in accordance to C language, i) ...
A: To find the size of int, char, int *, and char *, consider the system to be 64-bit and in accordance...
Q: 1- a)What tool or technique do you think is most effective at finding vulnerabilities? b)Why i...
A: INTRODUCTION: We asked here tools and technique i.e useful in finding vulnerabilities.
Q: Write a function void RotateLeft(int A[ ], int n, int x). which will rotate the elements of array ...
A: If x is greater than n then rotating array will repeat every n times so changing the value of x to i...
Q: Prepare a program that can read the price (RM) of two books. Calculate and print the total price (RM...
A: Java code: import java.util.Scanner; public class Main{ public static void main(String []args...
Q: Illustrate using schematic diagram the “wires connected to the front panel electrical connector moth...
A: As we know that Motherboard provides provides connectivity between hardware components of the comput...
Q: Show that the language {www | w e {a,b}*} is not context-free.
A: We can show a language is not context-free using Pumping lemma for context free languages Pumping le...
Q: What are the disadvantages of having an email provider monitor a user's emails?
A: Introduction: You may receive a large amount of spam, which may clog the system. If junk mail is ope...
Q: What model is used to assess the reliability of software?
A: Introduction: Models of software reliability growth are statistical interpolations of defect detecti...
Q: Explain why the following series of steps is not an algorithm. Washing the dog 1. Rinse 2. Lather 3....
A: right step of the washing dog is in the series : stage : 1 (lather) stage : 2 (rinse) and next ...
Q: Big data has become a part of every organization's information technology systems in today's world.,...
A: like you doing utilizing big data at your own business or any work .some of the benefits are Using...
Q: could you please give the code(use any language) website for solve the rush hour puzzle by using A* ...
A: The answer is given below:-
Q: Let f(n) and g(n) be asymptotically positive functions. Prove or disprove each of the following conj...
A:
Q: "Rabenstein code was used to send a message with 4 information bits, you receive 100110001 , if you ...
A: I have provided hand written solution as above problem describe. See below step for full explanation...
Q: A special static method named_is used to provide a starting point for the execution of a program usi...
A: special static method method named is
Q: A tank having vertical sides and a bottom area of 100 ft2 is used to store water. The tank is initia...
A: According to the information given:- We have to follow the instruction and write MAtlab code.
Q: Describe why web application security is critical. What may go wrong with an unsecured application? ...
A: As per our guidelines, only 3 sub parts will be answered. So, please repost the remaining questions ...
Q: What is the most crucial piece of computer hardware in a personal computer?
A: Introduction: Computer Hardware and Software: A computer is a digital device made up...
Q: JAVA: You are required to model a vehicle parking lot system. The parking lot has a facility to par...
A: #vehicle parking system: // superclasspublic class Vehicle { private String model;private String col...
Q: 24. Suppose that set1 (Set) is a set that contains the strings "red", "yellow", "green", and that se...
A: a.It will give output {"red","yellow","green","blue"}
Q: What do assembly language instructions like MIV signify, and what are they called?
A: Introduction: Assembly language instructions. The designer can program in assembly language in terms...
Q: Suppose the implementation of an instruction set architecture uses three classes of instructions, wh...
A: It is given that: total dynamic instruction count = 2 x 106 Processor's clock rate = 3.2 GHz Sin...
Q: Alice and Bob use the ElGamal scheme with a common prime q= 131 and a primitive root a =6. Let Bob’s...
A: ANSWER:-
Q: Modify the attached code to generate the display. Your code must use the given variables and use the...
A: Find the answer below.
Q: components are used? the answer to this part is 32/4 = 8 components (2-bit wide) I need the answer t...
A: The answer is
Q: There are different stages in the instruction cycle.
A: Introduction: there are different stages in the instruction cycle
Q: Class CPI % of instructions 1 20% 50% C 30% 3. A B.
A: The answer is
Q: C++ Programming Instructions Write a program that prompts the user for a sequence of characters (...
A: Use strlength () function to count the number of characters . Below is the code:
Q: Who was the first to develop a flash memory device?
A: Intro Who was the first to develop a flash memory device?
Q: Write a program that reads a four-digit number from user, then the program separates digits of the n...
A: code
Q: Question 2: A student will not be allowed to sit in exam if his/her attendance is less than 75%. Tak...
A: According to the information given:- We have to follow the instruction and code to get desired outpu...
Q: elative Motion please give an A mathematical example(if applicable), A real world example, A memory...
A: According to the information given:- We have to define the Relative Motion.
Q: Any class that does not explicitly specify its superclass through an extends declaration implicitly ...
A: SUMMARY: -Hence, we discussed all the points.
Q: re ADC1 injecte pdate event)
A: I am giving both code in writing and also code screenshot with the output please see to it .. screen...
Q: Complete the following program so that it prints the odd numbers from 3 through 501 inclusive. for i...
A: Here is the complete code with some modifications for space and a statement to find the odd number. ...
Q: Q)write and apply porngme inc+t) to convert Srom centigrate to fahrenleite where %3D
A: We have given the formula to calculate the Fahrenheit value from the user entered centigrade value. ...
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
SELECT ALL of the valid statements that instantiate an object from the Bicycle class shown below.
Step by step
Solved in 2 steps
- public class Application { public static void main(String[] args) { Employee empl = new Employee(); empl.firstName = "Ali"; empl.lastName = "Omar"; empl.salary = 20000; Employee emp2 = new Employee(); emp2.firstName = "Mohamed"; emp2.lastName = "Nour"; emp2.salary = 30000; System.out.println("- System.out.printin("- empl.employeeSalary(); System.out.println("- empl.checkEmployeeSalary(emp1.salary, emp2.salary); System.out.printin("- System.out.println("- printEmployee(emp2); System.out.printin("- Employee employeeArr[] = new Employee[2]: employeeArr[0] = empl; employeeArr[1] = emp2; Application a = new Åpplication(); a.printArrayofEmployee(employeeArr); Non static (instance) start to call Static function to print ---------"); "); - Non Static function to print - --"); Non static (instance) start to call same class Static function to print --------); -"); Non Static function to print ----); System.out.println("- System.out.printin("- System.out.printin("Salary : " + Employee.salary);…Public classTestMain { public static void main(String [ ] args) { Car myCar1, myCar2; Electric Car myElec1, myElec2; myCar1 = new Car( ); myCar2 = new Car("Ford", 1200, "Green"); myElec1 = new ElectricCar( ); myElec2 = new ElectricCar(15); } }Public Class SavingsAccount { float interest; float FixedDeposit; SeniorAccount(float interest, float FixedDeposit) { this. interest = interest; this.fixedDeposit= FixedDeposit; } float calculateInterest(); { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*interest/100); } } Public Class SeniorAccount extends SavingAccount { float seniorInterest; SeniorAccount(float interest, float FixedDeposit) { this.seniorInterest=interest; super(interest, FixedDeposit) } float calculateInterest() { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*seniorinterest/10); } } Public static void main(String args[]) { SavingsAccount saving = new SavingsAccount(6,100000); System.out.println(saving.calculateinterest()); SeniorAccount senior=new seniorAccount(10,100000); System.out.println(Senior.calculateInterest()); } Correct the syntax and logical error
- Public Class SavingsAccount { float interest; float FixedDeposit; SeniorAccount(float interest, float FixedDeposit) { this. interest = interest; this.fixedDeposit= FixedDeposit; } float calculateInterest(); { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*interest/100); } } Public Class SeniorAccount extends SavingAccount { float seniorInterest; SeniorAccount(float interest, float FixedDeposit) { this.seniorInterest=interest; super(interest, FixedDeposit) } float calculateInterest() { System.out.println(“Calculating Savings Account Interest”); return(FixedDeposit*seniorinterest/10); } } Public static void main(String args[]) { SavingsAccount saving = new SavingsAccount(6,100000); System.out.println(saving.calculateinterest()); SeniorAccount senior=new seniorAccount(10,100000); System.out.println(Senior.calculateInterest()); } Rubric: Correct the syntax and logical errors Proper working codeBased on Figure 3, create a class named Child that inherits the Father class. Declare an instance name location (String) for class Child. [3 marks]Class Quiz public Quiz (int quesList, int quesMissed) {quesList = this.quesList;quesMissed = this.quesMissed;} private void calculate(){// get the point worth of each question and calculate final scorepointsPerQues = (100/quesList);scoreQuiz = quesList - quesMissed;} Class PassFailQuiz public PassFailQuiz (int quesList, int quesMissed, int scoreQuiz) { super(quesList, quesMissed);} How do I move scoreQuiz from private void calculate() to equal the third constructor value in PassFailQuiz?
- Incorrect Question 6 public class Shape { Color fillColor; } public Shape() { fill Color = Color. RED; } } public Shape(Color fillColor) { this.fill Color = fillColor; } public class Circle extends Shape { int radius; public Circle() { radius = 1; } public Circle(int radius) { this.radius = radius; } public Circle(int radius, Color fillColor) { } super(fillColor); this.radius = radius; Circle c1= new Circle(); Circle c2= new Circle(5); Circle c3 = new Circle(10, Color.BLUE); Which of the following are correct? c2 has radius 5 c1 is red c2 is red c3 has radius 10 c3 has radius 1 c3 is red c1 is blue ✔c2 has radius 10 c3 is blue c1 has radius 5 c1 has radius 1 c2 has radius 1 c2 is bluepublic 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); System.out.print("\nAddress = " +address); } public String…public 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); System.out.print("\nAddress = " +address); } public String…
- //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);…public class Player { private int jerseyNumber; private int rating; public Player(int jerseyNumber, int rating) { this.jerseyNumber = jerseyNumber; this.rating = rating; } public int getJerseyNumber() { return jerseyNumber; } public void setJerseyNumber(int jerseyNumber) { this.jerseyNumber = jerseyNumber; } public int getRating() { return rating; } public void setRating(int rating) { this.rating = rating; } @Override public String toString() { return "Jersey number: " + jerseyNumber + ", Rating: " + rating; }}public class RosterManager { private ArrayList<Player> roster; public RosterManager() { roster = new ArrayList<>(); } public void addPlayer(Player player) { roster.add(player); } public void updatePlayerRating(int jerseyNumber, int newRating) { for (Player player : roster) { if (player.getJerseyNumber() ==…class Course { private String courseNumber; private String courseName; private int creditHrs; public Course (String number, String name, int creditHrs){ this.courseNumber = number; this.courseName = name; this.creditHrs = creditHrs; } public String getNumber() { return courseNumber; } public String getName() { return courseName; } public int getCreditHrs() { return creditHrs; } public void setCourseNumber(String courseNumber) { this.courseNumber = courseNumber; } public void setCourseName(String courseName) { this.courseName = courseName; } public void setCreditHrs(int creditHrs) { this.creditHrs = creditHrs; }} class Student { private String firstName; private String lastName; private String gender; private String phoneNumber; private String email; private String jNumber; protected ArrayList<MyCourse> courseList; public String…