Make a struct LINE include appropriate data members. A line segment includes the endpoints, i.e. the points that it joins. structure should also provide a function to find the length of the Line Two lines can be compared to determine which line is shorter and vice versa. Provide function to compare two Lines Provide appropriate constructors for initialization. Note: You have to reuse struct point in line because a line can be represented in terms of two cartesian coordinate points. (starting and ending point)
Q: JAVA LAB PROGRAMMING Write a Java program to find and display all substrings of a user entered strin...
A: Code: import java.util.Scanner; public class Main{ public static void main(String args[]) { ...
Q: Given the ff. algorithm to find the greatest common divisor of n and m where n s m, determine the ti...
A: Question 1 Gcd(m,n) if n==0 then //θ(1) return m m=m-n θ(m) if n≤m return Gcd(n,m) else...
Q: Which of the ff. input string/s is/are accepted by the automaton? 1. S2 So Is 1
A: Given , a Automata We have given multiple long input string and we have asked to find which input...
Q: 11. Write a code in AVR to load the value $20 into location $1A using register R20 and substract it ...
A: The code is given below for the above given question:
Q: Your CFO has approved installing new backbone cabling on your school’s campus. One of the buildings ...
A: Answer: b. 1000Base- LX is the correct answer Explanation: For Gigabit Ethernet via optical fibre, I...
Q: Show and upload your SOLUTION. Include the starting address, ending address and limit. Code a de...
A: Segments are interpreted differently in Protected Mode vs. Real Mode: Segment register contains a ...
Q: What part does Moore's law play in supercomputing, grid computing, and cluster computing?
A: According to Moore's Law: Moore's Law is a computing or technology word that refers to the fact that...
Q: 1) Which of the following has the responsibility to determine if a system is effective or efficient?...
A: According to the information given:- We have to choose the correct option to satisfy the statement ...
Q: 9. Let M = ({4, 41, 92}, {a, b}, 8, 9o, {91}) be the NFA given by the state diagram: (a) Construct t...
A:
Q: Declare a 32-bit signed integer variable and initialize it with the value 234 (base 10). In memory, ...
A: Declare a 32-bit signed integer variable and initialize it with the value 234: var SDWORD 234
Q: Display a menu to allow the user to select an addition, subtraction, multiplication, or division pr...
A: The code is given below according to the question as 4 independent functions addition, subtraction, ...
Q: Research and find a current network threat or breach. What happened and what could have been done to...
A: Let us see the answer:- Introduction:- A cyber attack is the intentional compromise of your systems ...
Q: When you issue the ping command, what protocol are you employing to communicate with your computer?
A: When you issue the ping command, what protocol are you employing to communicate with your computer
Q: C:\app\csc544\oradata\orcl\control01.ctl C:\app\csc544\oradata\orcl\control02.ctl Show the major s...
A: Relocating is a process in which the location of the address where the element is stored or any data...
Q: Problem 12. Which of the following two initializations to 1 of a two- dimensional array (matrix) is ...
A: Given c++ program contains two initialisations and an array is initialised which contains 128 rows a...
Q: For an active low 7 segment display, write down and explain the look up table contents in case of XL...
A: If you know C, then it works like this: const uint8_t table[256] = { ...some byte constants (table d...
Q: How features provide in android supported by core libraries?
A: The solution for the above given question is given below:
Q: Consider the following algorithm: ср ALGORITHM Secret(A[0..n â^' 1]) //Input: An array A[0..n â^' 1]...
A: Given :- 1. What does this algorithm compute?2. What is its basic operation?3. How many times is the...
Q: Question 41 Given the problem of basic multiplication: Input: Two n-digit nonnegative integers, x an...
A: Time Complexity: Overall effectiveness of any multiplication or addition can be determined by its ti...
Q: For an 8-bit word sized 64K byte memory. The number of address lines required is while the number of...
A: the number of address lines required is 6 address line
Q: Write a code in assembly x86 that (a) prompts the user with initial letters of his Name, Middle name...
A: MODEL SMALL .STACK 100H .DATA MSG_1 EQU 'Enter the First letter of your name: ...
Q: Consider the following scenario: we have a byte-addressable computer that employs fully associative ...
A: Mapping in Associative Mode: It is possible to store data and refer to it using two different memory...
Q: teal your information
A: given - Enumerate and briefly discuss three tactics that an identity thief may use to steal your inf...
Q: Create a Nested Loop to display Hours:Minutes:Seconds (simulating a clock) vary the delay speed to d...
A: the java program is an given below : import java.io.*; class GFG { // Function to convert hours/...
Q: Note: The notation from this problem is from Understanding Cryptography by Paar and Pelzl. We conduc...
A: Answer it cycles through all possible 2m − 1 states within the shift register except the state whe...
Q: C programming In this task you are required implement a function that counts the number of alpha...
A: #include <stdio.h>//method that count the number of alphabetic characters in a string//then re...
Q: 1.Discuss the availability and security issues of wireless technology. Use suitable business case ex...
A: Security issues of wireless technology: Wireless local area networks (WLANs) transmit and receive d...
Q: public class ClassA { public void methodOne(int i) { } public void methodTwo(int i) { } public stati...
A: We need to answer regarding given methods.
Q: 1.Write a C# Sharp program that takes four numbers as input to calculate and print the average. Tes...
A: Given: We have to write a C# Sharp program that takes four numbers as input to calculate and print t...
Q: Create a C program using a Two-Dimensional Array that will display values below: Note: 2 rows and ...
A: here in this question we have asked to write a program which input 2D matrix size from user and prin...
Q: Write a yara rule to find PDF files with ANY of the following strings: - /JS - /JavaScript
A: What is YARA? Yet Another Recursive/Ridiculous Acronym (YARA) is a tool used to identify and classi...
Q: 1. Please create a Conceptual Data Model (using Draw.io), containing entities and their relations...
A: creating a Conceptual Data Model(Using draw.io) , containing entities and their relationships as the...
Q: A. If a minor offense is committed by a driver, a fine of GHs 50 should be charged and the driver ca...
A: Program Explanation: Declare the header files Declare and define the main function Declare a variab...
Q: Discuss your personal storage strategies and what you are doing to ensure that your data remains saf...
A: 1. Different storage strategies are; SSD Flash Drive Arrays Using only light memory, these robust st...
Q: Q4/ A- Find the complement of F=WX +YZ, then show that F.F=o and F+F=1
A: Logical gates are the basic building blocks of any digital signalling system. It takes one or more i...
Q: Given a sorted array of n comparable items A, and a search value key, return the position (array ind...
A: Algorithm Means, A computer can solve a problem using an algorithm, which is a well-def...
Q: Use recursion tree to guess a bound, then proof it using induction. Finally, use master theorem (if ...
A: Let's see the solution in the next steps
Q: Given the ff. code snippet, determine the time complexity: int f5(int n) { if (n < 10) { System.out....
A: Lets see the solution.
Q: 4 In rare cases, it's not such a great idea to "Tound prematurely." Consider the following function:...
A: We need to find the time complexity of the given code.
Q: Regional Labs is a company that conducts research and development work on a contract basis for other...
A: Regional Labs is a company that conducts research and development work on a contract basis for other...
Q: Who was the person who invented the multi-touch device?
A: the first human-controlled multi-touch device was been developed at the University of Toronto by N...
Q: What is the alpha equivalence of: (Ах. Лу.х у )у
A: ANSWER: λx. λy. x(y) is NOT α-equivalent to λx. λy. y(x). Without a doubt, assume for logical incons...
Q: - Which type of ROM takes the longest time to be era
A: Lets see the solution.
Q: Identify the errors in the following code. class A { void sum(int x, int y){ System.out.println("Sum...
A: The method sum is declared with same signature twice But the second method's usage is demonstrated a...
Q: Fix the problem with this piece of code: public class SomethingIsWrong { public static void main(Str...
A: The code never creates a Rectangle object. With this simple program, the compiler generates an error...
Q: What are some of the things to keep in mind when building a mobile application? What, in your opinio...
A: INTRODUCTION: People are spending more time on their smartphones and mobile gadgets as the digital ...
Q: One of the major concerns in using freeware is that it can be used as an instrument to compromise se...
A: Synergy is the concept that the whole of an entity is worth more than the sum of the parts. This log...
Q: Describe two different ways in which the isEmpty method of the LinkedQueue class (represents a linke...
A: Introduction: Java String is Empty () Method: Definition and Usage. The is Empty () method checks w...
Q: 6. Let M = (Q, E, 8, 90, F') be the DFA given by the state diagram: (a) Compute 8(q1, 110). (b) Dete...
A:
Q: What is the name given to an issue which arises in multiple regression when there is high correlatio...
A: Your answer is here.
- Make a struct LINE include appropriate data members.
- A line segment includes the endpoints, i.e. the points that it joins.
- structure should also provide a function to find the length of the Line
- Two lines can be compared to determine which line is shorter and vice versa. Provide function to compare two Lines
- Provide appropriate constructors for initialization.
Note: You have to reuse struct point in line because a line can be represented in terms of two cartesian coordinate points. (starting and ending point)
Step by step
Solved in 2 steps with 1 images
- 1) Define a struct to represent a product item with the fields: name, ID, price. 2) Define at least two named instances, e.g., “Jeans” 1223 50 and “Top” 1234 30. 3) Apply selector function to return the ID and price of a product item. 4) It is the January sales. Write a function that takes as argument a struct and updates the price field by giving a 30% discount to the original price. For example, given the struct “Jeans” 1223 50 as argument, the function will update the price field to 35, due to the 30% discount. Make sure to explain what the difference between mutable and immutable is, as comments in your Racket file. 5) Please make sure to submit your code as a Racket file and make sure to add an explanation of how it works as comments.) Define a struct type to represent a university student with a name, surname, course, year. 2) Define a couple of named instances, e.g., David, Pearl, Computing, Year1. 3) Apply selector function to return the course and year of your student.4) Write a function that updates the year of a student, i.e. if year is “Year1”, then update to “Year2”, if year is “Year2”, then update to “Year3”, if the year is “Year3” then updated to “Graduated”. Make sure to write what the difference between mutable and immutable is.Please just use main.cpp,sequence.cpp and sequence.h. It has provided the sample insert()function. No documentation (commenting) is required for this assignment. This assignment is based on an assignment from "Data Structures and Other Objects Using C++" by Michael Main and Walter Savitch. Use linked lists to implement a Sequence class that stores int values. Specification The specification of the class is below. There are 9 member functions (not counting the big 3) and 2 types to define. The idea behind this class is that there will be an internal iterator, i.e., an iterator that the client cannot access, but that the class itself manages. For example, if we have a Sequence object named s, we would use s.start() to set the iterator to the beginning of the list, and s.advance() to move the iterator to the next node in the list. (I'm making the analogy to iterators as a way to help you understand the point of what we are doing. If trying to think in terms of iterators is confusing,…
- (C++) Create a class Cylinder with attributes base-radius and height, each of which defaults to 1 .Provide member functions that calculate the surface area ( = 2πrh) and the volume (= πr2h) of the cylinder. Also, provide set and get functions for the base radius and height attributes. The set functions should verify that base radius and height are each floating- point numbers larger than 0.0 and less than 20.0. Use M PI from < cmath > header for π.Q. ocaml, unlike most functional languages , does not allow functions to return structured values ? - True - False Q. The Ocaml type signature val f : 'a - > ' a = <fun> indicates that function f has parameter and return value that can be any type , as long as the types of f's parameter and return value are the same. - True - FalseDefine a struct to represent a product item with the fields: name, ID, price.2) Define two named instances: “Trousers” 012 100 and “Shirt” 345 85.3) Write a function that takes as argument: one struct instance, a new value for thename (string) and new value for price field. The function will overwrite the previous values for the name field and price field in the called struct instance. For example,you create struct instance item_1 with the value from point 2 “Jeans” 1223 50. When you run the function, it will update the name and price fields with the new values from the argument of the function. Make sure to explain what the difference betweenmutable and immutable is, as comments in your Racket file.
- In C++ Define a structure called Date with month, day and year as its only integer members. Define a structure called Person with name (string) and birthDate (Date) as its only members. Define a ValidDate() function to retrun true if a Date passed to it is a valid date and false if not. Define a LeapYear() function that returns true if a year passed to it is a leap year and false if not. Define a ShowList() function that takes an array of Persons and its size and displays all its members' names and birthdates. Define a sort() function that takes an array of Persons and size and sorts the array based on their names in ascending order. Write a main() program where you declare an array of Person structures of maximum size 50, read as many Persons from the user as the user wants to enter and then display the list. Then, sort the list and display again. The user will hit the Enter key without typing anything else for the name when done. For example, if the input is the following: Robert…Using C++ Create a class Rectangle with attributes length and width, each of which defaults to 1. Provide member functions that calculate the perimeter and the area of the rectangle. Also, provide set and get functions for the length and width attributes. The set functions should verify that length and width are each floating-point numbers larger than 0.0 and less than 20.0In this task you will work with the linked list of digits we have created in the lessons up to this point. As before you are provided with some code that you should not modify: A structure definition for the storage of each digit's information. A main() function to test your code. The functions createDigit(), append(), printNumber(), freeNumber(), readNumber() and divisibleByThree() (although you may not need to use all of these). Your task is to write a new function changeThrees() which takes as input a pointer that holds the address of the start of a linked list of digits. Your function should change all of those digits in this linked list that equal 3 to the digit 9, and count how many replacements were made. The function should return this number of replacements. Provided code
- T or F -Functions are considered to be objects in JavaScript because they contain three critical attributes: data, methods that act on the data, parameters for passing the data also known as awareness. -A recursive function is a function that calls itself and eventually returns default value to break out of the recursion. -A function that is used to create a new object is called an anonymous function. -Attributes define additional characteristics or properties of the element which is the same as for the start tag. -Javascript is similar to the Java programming languageWrite the answers in c++ 1. Define a struct for a soccer player that stores their name, jersey number, and total points scored. 2.Using the struct in #1, write a function that takes an array of soccer players and its size as arguments and returns the average number of points scored by the players. 3.Using the struct in #1, write a function that takes an array of soccer players and its size as arguments and returns the index of the player who scored the most points. 4.Using the struct in #1, write a function that sorts an array of soccer players by name. 5.Using the struct in #1, write a function that takes an (unsorted) array of soccer players and its size and a number as arguments, and returns the name of the soccer player with that number. It should not do any extra unnecessary work. 6.Define a function to find a given target value in an array, but use pointer notation rather than array notation whenever possible. 7.Write a swap function, that swaps the values of two variables in…Write the definition of the function inputArray that prompts the user to input 20 numbers and stores the numbers into alpha. Write the definition of the function doubleArray that initializes the elements of beta to two times the corresponding elements in alpha. Make sure that you prevent the function from modifying the elements of alpha. Write the definition of the function copyAlphaBeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. Make sure that you prevent the function from modifying the elements of alpha and beta. Write the definition of the function printArray that prints any one-dimensional array of type int. Print 15 elements per line. Write a C++ program that tests the function main and the functions discussed in the parts above. (Add additional functions, such as printing a two-dimensional array, as needed.)