Q: SETC, ROLC, SHR, COM, JNZ,TEST, xOR, JC, JNE, LOOPE, XCHG, INC
A: SETC The SETC instruction assigns a character value to a SETC symbol. You can assign whole characte...
Q: In a class there are twenty students and each student undergoes five courses.Write C program to find...
A: Solution:
Q: C++ The program asks for the number n. Next, we enter n numbers and store all entered numbers into a...
A: The array is a homogenous collection of elements that are stored in consecutive memory locations. Th...
Q: You are planning to work from home for several days, but you are unsure of whether you are allowed t...
A: The steps are listed below. Note the program/software specifications Space required for installati...
Q: The signature of "public int getStringLength(String str)" method is: O public int getStringLength(St...
A: In the method signature, we do not have return type of method and the names of the parameters.
Q: Write the canonical expression (Minterm & Maxterm) of the truth table below! A BCI F 1 1 1 1 1 1 1 1...
A: MINTERMS: The mintem using the truth table are written for the terms whose functional value is true...
Q: Question 1: Array offset computation Compiling code that accesses an element of an array involves co...
A: Given: The offset to array elements must always be computed statically
Q: Make a program that would ask the user to input examination score and return the letter equivalent o...
A: Program Description: A program that would ask the user to input the examination score and return the...
Q: Write a Pseudocode for the following program : #include <iostream>#include <cstdlib>#in...
A: Algorithm Pseudocode: def main(): secretNum = 25 guess = eval(input("Guess a number between 1 and 10...
Q: i need it in util.java.scanner form and can you make it so i can copy and past it please thanks In...
A: Code: Java: //Create a class public class MyRectangle2D { //Declare the necessary variables of ...
Q: Write a single c++ Program using multilevel inheritance having input validation, encapsulation, poly...
A: 1- multilevel inheritance having input validation. 2- encapsulation, 3- polymorphism, 4- static ...
Q: Write a C program to find the position of a target value within an array using Linear search In comp...
A: Given: Write a C program to find the position of a target value within an array using Linear search ...
Q: Write java code, which throws index out of bound exception, with three catch block and one final blo...
A: CODE:- import java.util.*;public class Main{public static void main(String[] args) {Scanner input = ...
Q: QUESTION 3 an exception may occur within method A, O Hethod A must define the exception as its retur...
A: Exception Handling: The exception handling makes sure that the continuous flow of the program execut...
Q: ddress lines for address bus and 64 bits’ data buses. Answer the followi .Show the design of fully a...
A: Q
Q: Re-write the following program by changing ternary operator to conditional if-else statement. #i...
A: Conditional statements, are also referred as selection statements, are used to make decisions based ...
Q: Given the following devices: 2911 Router DHCP Server 2960 Switch DHCP Client PC1 DHCP Client PC2 D...
A: Given: Given the following devices: 2911 Router DHCP Server 2960 Switch DHCP Client PC1 DHCP Clien...
Q: Create new class DbConn containing a connection string and a single function to insert,update and de...
A: Create new class DbConn containing a connection string and a single function to insert,update and de...
Q: Write a script that will print the following multiplication table: (Do not type individual elements ...
A: Note; As programming language is not mentioned, it is coded in C language #include<stdio.h> i...
Q: 1. Referring to the above figure, perform resource leveling. Assume that each task can be performed ...
A: GIVEN: 1. Referring to the above figure, perform resource-leveling. Assume that each task can be per...
Q: A. is a connecting device that operates in the physical and data link layers of the Internet model. ...
A:
Q: What are the advantages and disadvantages of installing application software in computing devices an...
A: Software: Softwares are a collection of programs, that contain the instructions to perform specific ...
Q: Simplify the Boolean function F = a’(b+c’)(a+b’+c) a’b’c’ in the SOP Form SOP : F= X'Y'Z+X'YZ'+XY'...
A: Boolean Algebra is used to represent and analyze digital circuits. In Boolean algebra each variable ...
Q: Confidentiality, Integrity and Availability comprise the basis for network security of an Organizati...
A: EXPLANATION: Network security is basically the complete process that include prevention from variou...
Q: Create a Pseudocode and a C++ program for a number guessing game. Your program is required to guess ...
A:
Q: "In the chance of collision can be reduced if a station senses the medium before trying to use it." ...
A:
Q: A petrol pump company started their card services like ATM so that users do not need to carry cash a...
A: a) Since, we have to search for ATM cards, which are not arranged in an order i.e neither ascending ...
Q: The following function is given. Implement it using a 3x8 multiplexer F (A, B, C, D) = ∏ (0, 2, 5, ...
A:
Q: It has been observed by management that some faculty members at theuniversity demonstrate a lackadai...
A: Given: It has been observed by management that some faculty members at theuniversity demonstrate a l...
Q: Write for Learning Management System In Software Engineering That Must Include: Project Scheduling ...
A: Write for Learning Management System In Software Engineering That Must Include: Project Scheduling ...
Q: Write a Java Program To Calculate CGPA Percentage
A: Given: Write a Java Program To Calculate CGPA Percentage
Q: the Logisim circuit at modulo-5 counter (counts 0 1 2 3 4)؟
A: GIVEN: the Logisim circuit at modulo-5 counter (counts 0 1 2 3 4)؟
Q: Attacks on wireless mice and keyboards are not uncommon. How do the attacks occur? What is the vuln...
A: How do the attacks occur? Over The Air. Wireless computer accessories function near the devices t...
Q: Assign number_segments with phone_number split by the hyphens. Sample output with input: '977-555-3...
A: Given:- Assign number_segments with phone_number split by the hyphens. Sample output with input: '97...
Q: What An organization has been assigned the prefix 212.1.1.0/24 and wants to form subnets for four de...
A: (a) Giving each department a single subnet, the nominal subnet sizes are 27 ,26 ,25 ,25 respectively...
Q: E-commerce is a popular term for electronic commerce or even internet commerce. The name is self-exp...
A: Given: E-commerce is a popular term for electronic commerce or even internet commerce. The nameis se...
Q: B2B use electronic data interchange (EDI) system to exchange none standard format information. Sel...
A: False
Q: Computer Science Question
A: Dispense_Coffee state needs to be modified.
Q: Write a function that reads a single line of numbers from a file named "question1.txt", and returns ...
A: Given: Write a function that reads a single line of numbers from a file named"question1.txt", and re...
Q: A network technician is able to connect the switches between two offices, but the offices cannot com...
A: Given: A network technician is able to connect the switches between two offices, but the offices can...
Q: How character 'a' is stored in memory?
A: How character 'a' is stored in memory?
Q: Compute and write the final value of C
A: The value of C is 0 C code: #include <stdio.h> int main(){ int A=15, B=10, C; C = A%=5 |...
Q: Use the following variables to write your CV in a Linux bash script. Variable Script Output ...
A: Given: Use the following variables to write your CV in a Linux bash script. Variable Script ...
Q: i need it in util.java.scanner form and can you make it so i can copy and past it please thanks A...
A: Please save the file as RegularTriangle.java
Q: What are the functions performed by a network operating system?
A: Given: What are the functions performed by a network operating system?
Q: Assume the function: void F(stack<T> &S){ } and we send a stack S to the function F, as a ...
A: Constructor is called When an object of the class is passed (to a function) by value as an argument,...
Q: With suitable illustration, discuss the relationship between processes and threads and how a process...
A: Answer 1: Process and thread both are related to each other means that thread is nothing but the exe...
Q: Draw a bar chart of 5 values entered by the user (>=0), where the y-axis is along the rowsand the...
A: PROGRAM CODE: #include<iostream>#include<string>#include<sstream>#include<ioman...
Q: - As a renowned Event Organizer, you have been advisingyour clients to buy soft drinks from vending ...
A: pseudo-code for vending machine
Q: A system has three processes (P1, P2, P3) and three reusable resources (R1, R2, R3). There is one in...
A: Given: A system has three processes (P1, P2, P3) and three reusable resources (R1, R2, R3). There is...
Can you use it in a scanner so i can copy paste please.
Part 1
A regular triangle is one for which all sides are congruent and all interior angles.
Create a class RegularTriangle with a field side (int)
Create a constructor which accepts an int parameter and will assign the parameter to field side
Create assessor and mutator for this class
Create a method getPerimeter() which should return 3*side;
Part 2
in the constructor, add a logic that if the input parameter is less than 5 then set the side to 5, if it is >10 then set the side to 10, otherwise set the side to the input value.
Screenshot final output
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Java - Access Specifiers Create a class named Circle that has attributes radius, area, and circumference and make the attributes private. Make a public method that sets the radius and a method that prints all attributes. Ask the user input for radius. Note: Use the PI from the math functions Inputs A line containing an integer 10 Sample Output Radius: 20 Area: 1256.64 Circumference: 125.66Create a Class Pet with the following data members Identification: String species : String (e.g. cat, dog, fish etc) breed: String Age (in days): int Weight: float Dead: boolean 1. Provide a constructor with parameters for all instance variables. 2. Provide getters for all and setters for only breed, and weight 3. Provide a method growOld() that increases the age of the pet by one day. A dead pet wont grow old 4. Provide a method growHealthy(float w) that increases the weight of the pet by the given amount w. A dead pet cannot grow healthy. 5. Provide a method fallSick(float w) that reduces the weight of the pet by the given amount. The least weight a pet can have is 0 which will mean that the pet has died. If the value of weigh is 10 kg and the method is called with an argument of 11 kg then you will set it to 0 and set the dead to an appropriate value to mark the death of the pet 6. Provide a toString method that shows an appropriate well formatted string…Using JAVASCRIPT write an object prototype for a Person that has a name and age, has a printInfo method, and also has a method that increments the persons age by 1 each time the method is called. Create two people using the 'new' keyword, and print both of their infos and increment one persons age by 3 years. Use an arrow function for both methods */ // Create our Person Prototype // Use an arrow to create the printInfo method // Create another arrow function for the addAge method that takes a single parameter // Adding to the age
- Define the Circle2D class that contains: Two double data fields named x and y that specify the center of the circle with get A data field radius with a get A no-arg constructor that creates a default circle with (0, 0) for (x, y) and 1 for radius. A constructor that creates a circle with the specified x, y, and radius. A method getArea() that returns the area of the circle. A method getPerimeter() that returns the perimeter of the circle. A method contains(double x, double y) that returns true if the specified point (x, y) is inside this circle. See Figure 10.14(a). A method contains(Circle2D circle) that returns true if the specified circle is inside this circle. See Figure 10.14(b). A method overlaps(Circle2D circle) that returns true if the specified circle overlaps with this circle. See the figure below. (a) (b) (c) Figure 10.14 (a) A point is inside the circle. (b) A circle is inside another circle. (c) A circle overlaps another circle. Draw…Object Oriented Programming: 213COMP, 214COMP (Feb-2022) Assignment- I [10 marks] Academic honesty: O Only pdf file accepted & student ID, will be your upload file. O Student who submit copied work will obtain a mark of zero. O Late work or attach file by email message not allowed. Q1: Write the signature for a method that has one parameter of type String, and does not return a value. Q2: Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q3: Write the constructor's headers of the followings? new Student (202101156, “Ahmed"); new Address(51, "jazan university","CS&IT" ); new Grade(true, 505235600, 4.5); Q4: a) Write a class Student that define the following information: name, stid , age. b) Explain a mutators (setters) and accessors(getters) methods for each attributes(fields). c) Add three constructors: • with empty constructor. one parameter constructor (name of student) two parameters constructor (name and stid) d) Create two…Implement the following classes: Polygon numSide: int /* constructor */ /* accessor-mutator */ + area (): double + perimeter (): double Triangle sideA: double sideB: double sidec: double /* constructor */ /* accessor-mutator */ + area () : double + perimeter (): double Create an object for Triangle class and invoke area and perimeter method. Input Format Take triangle sides (sideA,sideB,sideC) as input from user. Constraints For Triangle, sideB+sideC > sideA
- Create a RightTriangle class given the following design: RightTriangle variables: base, height methods: 2 constructors, 1 that set default values and another that accepts to parameters. setBase - changes the base. Requires one parameter for base. setHeight - changes the height. Requires one parameter for height. getBase - returns the triangle base. getHeight - returns the triangle height. area - returns the area of the triangle (1/2bh) given the current base and heightCreate an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class: private string make private string model private string color private int year private int mileage Your program should have appropriate methods such as: default constructor parameterized constructor add a new vehicle method list vehicle information (return string array) remove a vehicle method update vehicle attributes method. All methods should include try..catch constructs. Except as noted all methods should return a success or failure message (failure message defined in "catch"). Create an additional class to call your automobile class (e.g., Main or AutomobileInventory). Include a try..catch construct and print it to the console. Call automobile class with parameterized constructor (e.g., "make, model, color, year, mileage"). Then call the method to list the values. Loop through the array and print to the screen.…Modify the Car class example and add the following: A default constructor that initializes strings to “N/A” and numbers to zero. An overloaded constructor that takes in initial values to set your fields (6 parameters). accel() method: a void method that takes a double variable as a parameter and increases the speed of the car by that amount. brake() method: a void method that sets the speed to zero. To test your class, you will need to instantiate at least two different Car objects in the main method in the CarDemo class. Each of your objects should use a different constructor. For the object that uses the default constructor, you will need to invoke the mutator methods to assign values to your fields. Invoke the displayFeatures() method for both objects and display the variables. Demonstrate the use of the accessor method getColor() by accessing the color of each car and printing it to the console. Use the method accel to increase the speed of the first car by 65 mph. Use…
- Create an Object class and a test class to accomplish the following: Write a convertToMetric class that has the following field: standard - holds a double, standard length value in feet. The class should have the following methods: Constructor - that accepts a length in feet (as a double) and stores it in the standard field. setStandard - accepts a standard length in feet and stores it in standard. getStandard - returns the value of the standard field, as a length in feet, no conversion required. getMeters - returns the value of the standard field converted to meters. getCentimeters - returns the value of the standard field converted to centimeters A second class will be created and used to test the new object class. This, executable class, is to instantiate an object of 'convertToMetric' type. Then it will allow the user to use keyboard input to input a value for standard. That value will then be converted to meters and centimeters, and displayed. Make sure that your output (or…Create an Object class and a test class to accomplish the following: Write a convertToMetric class that has the following field: standard - holds a double, standard length value in feet. The class should have the following methods: Constructor - that accepts a length in feet (as a double) and stores it in the standard field. setStandard - accepts a standard length in feet and stores it in standard. getStandard - returns the value of the standard field, as a length in feet, no conversion required. getMeters - returns the value of the standard field converted to meters. getCentimeters - returns the value of the standard field converted to centimeters A second class will be created and used to test the new object class. This, executable class, is to instantiate an object of 'convertToMetric' type. Then it will allow the user to use keyboard input to input a value for standard. That value will then be converted to meters and centimeters, and displayed. Make sure that your output (or…Define the Circle2D class that contains: Two double data fields named x and y that specify the center of the circle with get methods. A data field radius with a get method. A no-arg constructor that creates a default circle with (0, 0) for (x, y) and 1 for radius. A constructor that creates a circle with the specified x, y, and radius. A method getArea() that returns the area of the circle. A method getPerimeter() that returns the perimeter of the circle. A method contains(double x, double y) that returns true if the specified point (x, y) is inside this circle. See Figure 10.14(a). A method contains(Circle2D circle) that returns true if the specified circle is inside this circle. See Figure 10.14(b). A method overlaps(Circle2D circle) that returns true if the specified circle overlaps with this circle. See the figure below. Figure (a) A point is inside the circle. (b) A circle is inside another circle. (c) A circle overlaps another circle. Draw the UML diagram for the class.…