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
- i need it in util.java.scanner form and can you make it so i can copy and past it please thanks 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;Create a class Rectangle with attributes length and width with are variables, each ofwhich defaults to 1. Provide methods that calculate the rectangle’s perimeter and area.It has set and get methods for both length and width. The set methods should verify thatlength and width are each floating-point numbers (double datatype) larger than 0.0 andless than 20.0. Write a Test class to test all the methods from class Rectangle.RectangleTest.java source file should looks like this:class Rectangle{//data fileds//methods}//end Rectangle classpublic class RectangleTest{ //main method}//end RectangleTest classImplement the main method below in a class called Grade. The program should read integer points (use the Scanner class) and print the grade (“A”, “B”, “C”, “D”, or “F”) based on the final score associated with a student. Grades are classified as follows: Number of Points Final Grade Greater than or equal to 90 A Between 80 (inclusive) and 90 (exclusive) B Between 70 (inclusive) and 80 (exclusive) C Between 60 (inclusive) and 70 (exclusive) D Less than 60 F Restrictions/Assumptions Use the message “Enter final score” to prompt the user to enter the number of points. Use the Scanner class to read the number of points, i.e., Scanner sc = new Scanner(System.in); Use System.out.println(...) to print the final grade. Assume that the user correctly enters an integer score. Start with this code: import java.util.Scanner; public class Grade { public static void main(String[] args) { For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac)
- can you please answer number 4 for me 1. 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 Computer Science…Define the method printValue() that takes two integer parameters and outputs the product of all integers starting with the first and ending with the second parameter, followed by a newline. The method does not return any value. Ex: If the input is 3 7, then the output is: 2520 Note: Assume the first integer parameter is less than the second. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import java.util.Scanner; public class ValuePrinter { /* Your code goes here */ publicstaticvoidmain(String[] args) { Scannerscnr=newScanner(System.in); intnumber1; intnumber2; number1=scnr.nextInt(); number2=scnr.nextInt(); printValue(number1, number2); } }Write a class RangeInput that allows users to enter a value within a range of values that is provided in the constructor. An example would be a temperature control switch in a car that allows inputs between 60 and 80 degrees Fahrenheit. The input control has “up” and “down” buttons. Provide up and down methods to change the current value. The initial value is the midpoint between the limits. As with the preceding exercises, use Math.min and Math.max to limit the value. Write a sample program that simulates clicks on controls for the passenger and driver seats. PLEASE USE THE TEMPLATES PROVIDED AND ENSURE THAT IT WORKS WITH THE TEST CLASS
- Write a class RangeInput that allows users to enter a value within a range of values that is provided in the constructor. An example would be a temperature control switch in a car that allows inputs between 60 and 80 degrees Fahrenheit. The input control has “up” and “down” buttons. Provide up and down methods to change the current value. The initial value is the midpoint between the limits. As with the preceding exercises, use Math.min and Math.max to limit the value. Write a sample program that simulates clicks on controls for the passenger and driver seats. Please ensure that it works with the test class provided.Write a compareTo method that compares two Song objects based on the artist, and title within artist. For example, given the following Songobjects: "Glass Animals""Heat Waves" "Elton John, Dua Lipa""Cold Heart" "Adele""Easy on Me" "Doja Cat""Kiss Me More" "Adele""My Little Love" They will be put in the following order: "Adele""Easy on Me" "Adele""My Little Love" "Doja Cat""Kiss Me More" "Elton John, Dua Lipa""Cold Heart" "Glass Animals""Heat Waves" In which class does the compareTo method belong?Create a class Rectangle with attributes length and width with are variables, each ofwhich defaults to 1. Provide methods that calculate the rectangle’s perimeter and area.It has set and get methods for both length and width. The set methods should verify thatlength and width are each floating-point numbers (double datatype) larger than 0.0 andless than 20.0. Write a Test class to test all the methods from class Rectangle
- Create a class called “Rectangle” with properties of length and width, andincludes method to calculate the area and perimeter of the rectangle. Create aDriver class and instantiate 2 Rectangle objects that return the area andperimeter for each. Please feel free to set the length and width to values ofyour choice. for JAVAwhat is needed to be solved: Execute the rectangle class with some modifications: - add color and add other shape class like triangle with same attributes of rectangle class then upload the source files and screenshoot of the run ////////////////////////////////////////////////////////////////////////////////// this is a header file: /// Specification file for the Rectangle class.#ifndef RECTANGLE_H#define RECTANGLE_H /// Rectangle class declaration. class Rectangle{ private: double width; double length; string color; public: void setWidth(double); void setLength(double); void setColor(string); double getWidth() const; double getLength() const; string getColor() const; double getArea() const;}; #endif ///////////////////////////////////////////////////////////////////////////////////// this is a cpp file: // Implementation file for the Rectangle class.#include "Rectangle.h" // Needed for the Rectangle class#include…Write a class 'Cylinder' that has two fields: height and radius. The class should have only one parameterized constructor function to initialize these fields. The class should also have a method 'getVolume()' to calculate the volume of this cylinder. Now, create any 2 objects of this class with arbitrary values and show their volumes.