Visual basic (Console) Edit the source code by adding a class that computes for the area of 3 rectangle and display results. Source Code Module Module1 Sub Main() Dim length As Single = 0.0F Dim breadth As Single = 0.0F Dim area As Single = 0.0F Console.Write("Enter the length of rectangle: ") length = Single.Parse(Console.ReadLine()) Console.Write("Enter the breadth of rectangle: ") breadth = Single.Parse(Console.ReadLine()) area = length * breadth Console.WriteLine("Area of ractangle: {0}", area) End Sub End Module
Q: 3. Create a text-based, menu-driven program that allows the user to choose whether to add, subtract,…
A: #include <iostream>using namespace std; //Function Prototypesvoid add(double, double);void…
Q: Write a c++ program Class student contains roll number, name and course as data members and…
A: #include <iostream>using namespace std; class student{ public: int roll_no; string…
Q: What is a Namespace? What does the line of code “using namespace std;” do? Where should this line of…
A: A namespace is a declarative region that provides a scope to the identifiers (names of the types,…
Q: Write a code in c++ Maintain a bookshelf that initially contain 2 books. Now you purchased three…
A: In this program we will use stack data structure as the statement says the last book that will be…
Q: Language: C++ Design and write an object oriented program for the computation of the volume of boxes…
A: ANSWER:-
Q: The main function creates 5 pixels with random red, green, and blue values. Complete the id_color…
A: So you create a pixel inside the main function five times (using for loop) and you call the…
Q: Write a program to add members of two different classes using friend Function.
A: A friend function is a function that is specified outside a class but has the ability to access the…
Q: What is displayed as a result of executing the code segment?
A: The given is an algorithm that uses boolean data variables a, b, c with a while loop. The…
Q: rite a program about triangles. You need two files, a module file and an executable file with a main…
A: import mathdef isRightTriangle(side1, side2, side3): if math.sqrt(side1 * side1 + side2 * side2)…
Q: Functionality Write Java program to convert numbers in one number system to others. Requirement…
A: Your java program is given below as you required with an output .
Q: Q.1 Write C# program and Create multiple objects of one class. Q. 2 Write C# program and create…
A: Ans)1. public сlаss Рersоn{ рubliс string Nаme { get; set; } рubliс int Аge…
Q: The Postfix notation is used to represent algebraic expressions. The expressions written in postfix…
A: A postfix expression (also called Reverse Polish Notation) is a single letter or an operator,…
Q: Final - Patient Charges Create pseudocode, flowchart and python code for the Patient Charges…
A: Lets see the solution in the next steps
Q: Java !! Overview In this task, you should start from the images GuessTheNumber.java output. The…
A: Here I have taken input from the user for min and max value and then I have generated the random…
Q: In this c# program please fix the height and inches, for example "Enter your Height in feet followed…
A: The modified code is given in the below step
Q: write a program which will accept one integer argument and returns count of digits of that argument…
A: First, we pass the argument to function Digitcounter using the main function. Using while loop l…
Q: Read your student number on the command line when you call the program executable. Example:…
A: Now, have to read the number using the command line. Step 1.) Argv arrays are used for command-line…
Q: 2. Call-by-reference parameters pass values: a. By making the variable global. b. By passing the…
A: Call by reference parameter pass values.
Q: In CORAL LANGUAGE please and thank you! Summary: Given integer values for red, green, and blue,…
A: integer r integer b integer g integer min r = Get next inputb = Get next inputg = Get next…
Q: A plus sign is the symbol used for addition in Mathematics. Usually, the plus sign is written as a…
A: #include <iostream> #include <GL/glut.h> #include <math.h> using namespace std;…
Q: 2.15 (Geometry: area of a hexagon) Write a program that prompts the user to enter the side of a…
A: Given: To write a python program to find the area of hexagon.
Q: Create a simple 5-question quiz with three (3) choices that will display the score of the user. The…
A: Code and output screenshots:
Q: C++ Language Write a program that prints a custom conversion table from Celsius temperatures to…
A: Objective: This program receives a lower temperature, upper temperature, and incremental value from…
Q: Write a program about triangles. You need two files, a module file and an executable file with a…
A: import mathdef isRightTriangle(side1, side2, side3): if math.sqrt(side1 * side1 + side2 * side2)…
Q: Java only Design, implement and test a Java class that processes a series of triangles. For this…
A: Here, we have to provide a java code for the above question.
Q: 1- Three variables : side, volume, area 2- One constructor function to input data of side 3- One…
A: The solution involves usage of OOPS concepts. NOTE: The solution is written in C++ language.
Q: Use unary and arithmetic operators, control flows, arrays for basic mathematical operations • Use…
A: Answer: Our guideline is answer first three subpart from first question. so I have answered in java…
Q: Write C++ program to create Three Students objects of a class
A: Program: #include <iostream> using namespace std; //Parent class class Student { public:…
Q: Constants in Java are: O Words that are reserved for use by the Java language O Symbolic names made…
A: I have given an answer in step 2.
Q: Answer in Swift language please: Urgent Class design and implementation. create a command line in…
A: Executable Swift Code: // Define class Fractionclass Fraction{ // Declare variables var…
Q: Example on writing 2 dimensional arrays code with form in Visual Basic by using private sub .
A: Two dimensional arrays can be declared in Visual Basic using the following command: Dim…
Q: General Instructions: 1. Exam part will be available for the whole day. 2. Program will be graded as…
A: - We have to the last sum divisibility problem.
Q: Explain the code according to comment line shown below. The Explanation must contain the flows of…
A: For Example i take the values as X=5, Y=6,Z=8 and T=4 #include <stdio.h>//Prototypesvoid…
Q: Coding question (LANGUAGE: C) I built a game in C that uses WSAD for input to move. However,…
A: We need to solve the issue of game stopping when different character is pressed.
Q: Using JAVA language f. Create the principal program, which will complete the following tasks : a.…
A: Details of the student are ID, name, semester, gender, age, modules list, assessment in each module.…
Q: Instructions 1. Write a console application that initializes at least five (5) variables or…
A: How to make a console application in C# Open the C# application in Visual Studio. Then go to File…
Q: PYTHON GUI - Tkinker) Write a Python program GUI that reads the following information from user,…
A: user = strend = "0"hours = round(40,2)print("One Stop Shop Payroll Calculator")while user != end:…
Q: LAB 7-5 Desk-Check The code shown in Figure 7-45 should display the numbers 2, 4, 6, 8, 10, and 12…
A: #include<iostream> using namespace std; int main(){ for(int number=2;…
Q: # Python code to draw snowflakes fractal. 2 import turtle 3 import random # setup the window with a…
A: answer is
Q: Write a console application that uses at least five(5) different methods of Math class. Provide a…
A: In C#, Math class It is used present mathematics operation which contains static methods and…
Q: C++ Language Please fill in the blanks for the following statements: The file extension…
A: Explanation: In C++, “.cpp” file contains the class definitions. “cpp”, stands for C Plus Plus. The…
Q: Create a class “Student” with data members such as roll number, name and branch. Create another…
A: Algorithm: Start Define a class Student with data members roll number,name,branch and constructor…
Q: Define a class called token number that incorporates a token’s number (which is equal to 744) and…
A: Below is the required C++ code. Program Approach: Include necessary header files and use namespace…
Q: C++ Election Day Write a program that compiles the result of an election. You will read the…
A: PROGRAM: //Header files #include <iostream> #include <string> #include <iomanip>…
Q: Hi pleas help me i need the solv by uesing online java compiler Create the principal program,…
A: Below is the required Java program: - Approach: - Define the class StuDetails. Declare the…
Q: Instructions: Input one number (integer or decimal), an operator (+, -, *, /), and another number…
A: Java printf statement to print the value up to two decimal values. For a float or double decimal…
Q: Data Structure & Algorithum Java program Design and implement a one-person guessing game that…
A: According to the Question below the solution: Output:
Q: Geometry: area of a pentagon) Write a program that prompts the user to enter the length from the…
A: Declare double type variables to store side and area of pentagon. Read distance from centre to…
Q: program that Read a file The file contains data about the students : first name, last, name, email,…
A: #include <stdio.h> #include <stdlib.h> #include <stdbool.h> //certain compilers…
Visual basic (Console)
Edit the source code by adding a class that computes for the area of 3 rectangle and display results.
Source Code
Module Module1
Sub Main()
Dim length As Single = 0.0F
Dim breadth As Single = 0.0F
Dim area As Single = 0.0F
Console.Write("Enter the length of rectangle: ")
length = Single.Parse(Console.ReadLine())
Console.Write("Enter the breadth of rectangle: ")
breadth = Single.Parse(Console.ReadLine())
area = length * breadth
Console.WriteLine("Area of ractangle: {0}", area)
End Sub
End Module
Step by step
Solved in 3 steps with 1 images
- Python question please include all steps and screenshot of code. Also please provide a docstring, and comments throughout the code, and test the given examples below. Thanks. Implement function heads() that takes no input and simulates a sequence of coin flips.The simulation should continue as long as 'HEAD' is flipped. When the outcome of a flipis 'TAIL', the function should return the number of 'HEAD' flips made up to that point.For example, if the simulation results in outcomes 'HEAD', 'HEAD', 'HEAD', 'TAIL', thefunction should return 3. NOTE: Recall that random.choice(['HEAD', 'TAIL']) returns'HEAD' or 'TAIL' with equal probability.>>> heads()0 # TAIL is the outcome of the first coin flip>>> heads()2 # The coin flips were HEAD, HEAD, TAIL>>> heads()1 # The coin flips were HEAD, TAIL>>> heads()5 # The coin flips were HEAD, HEAD, HEAD, HEAD, HEAD, TAILC++ Language Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and Newton (Links to an external site.) temperatures. The formula for the conversion from Celsius to Fahrenheit is : F=9/5*C+32 F is the Fahrenheit temperature, and C is the Celsius temperature. The formula for the conversion from Celsius to Newton is C = 100/33*N N is the Newton Temperature and C is the Celsius temperature Your program should prompt the user for a lower value and upper value for a range of temperatures in Celsius. It should then prompt the user for the amount they want to increment by. Then use a loop to output to a file named conversion_table.txt a table of the Celsius temperatures and their Fahrenheit and Newton equivalents within the range of values using the increment given by the user. Make sure to format your output to 2 decimal places. INPUT VALIDATION: Ensure the second number is greater than the first number, and make sure the increment is greater…Grey lines (start - 20 & 22-end of code) can NOT be edited. New JAVA code must be in between theses as show on line 21 in image.
- Java- Please Do the following way. Don't change anything. Need only 6 lines to compelete this. if you can not do following way then please reject this question. I will attached the question. import acm.graphics.*;import acm.program.*;import java.awt.*;import tsl.TextGraphicsProgram; public class Target extends TextGraphicsProgram {/** Size of the centered rect */private static final double OUTER_RADIUS_PIXELS = 200;private static final double OUTER_RADIUS_RATIO = 1.0;private static final double MIDDLE_RADIUS_RATIO = 0.65;private static final double INNER_RADIUS_RATIO = 0.3; /*** Returns a circle. * This method is defined for you and it takes 4 arguments:* centerX: the x coordinate of the center of the circle.* centerY: the y coordinate of the center of the circle.* radius: the radius of the circle, in pixels.* color: the color of the circle.*/private GOval getCircle(double centerX, double centerY, double radius, Color color){// You do not need to modify this method, but you should…Use Iterator design pattern to Write a java Gui application that can iterate through saved files.USE PYTHON PROGRAMMING LANGUAGE(OOP) 1. (Geometry: n-sided regular polygon) An n-sided regular polygon’s sides all have the same length and all of its angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon that contains: ■ A private int data field named n that defines the number of sides in the polygon. ■ A private float data field named the side that stores the length of the side. ■ A private float data field named x that defines the x-coordinate of the center of the polygon with a default value 0. ■ A private float data field named y that defines the y-coordinate of the center of the polygon with a default value 0. ■ A constructor that creates a regular polygon with the specified n (default 3), side (default 1), x (default 0), and y (default 0). ■ The accessor and mutator methods for all data fields. ■ The method getPerimeter() returns the perimeter of the polygon. ■ The method getArea() returns the area of the…
- In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Set the length of the rectangle to 24 and the width to 30.In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Print out the area of the rectangle.#Write your class code here using python print("Box 1")b1 = box([10,10,10])print("=========================")print("Height:", b1.height)print("Width:", b1.width)print("Breadth:", b1.breadth)print("-------------------------")print("Box 2")b2 = box((30,10,10))print("=========================")print("Height:", b2.height)print("Width:", b2.width)print("Breadth:", b2.breadth)b2.height = 300print("Updating Box 2!")print("Height:", b2.height)print("Width:", b2.width)print("Breadth:", b2.breadth)print("-------------------------")print("Box 3")b3 = b2print("Height:", b3.height)print("Width:", b3.width)print("Breadth:", b3.breadth)
- JAVA CODE- Write a Java code that creates a pong game where whenever the ball hits the paddles or the left and right walls when it does the ball, paddles, and background change color randomly, but not have them be the same color to let the player still be able to see the paddles. Preferably two-player pong with one player using the w and s keys and the other using the up and down keys.-Include 2 java files(FreezeBoil and FreezeBoilDriver) -Include UML diagram -Please Include Pseudecode -also some comments in the code if you canPython exercice. consider the atttached file for further details. Old-fashioned photographs from the nineteenth century are not quite black and white and not quite color, but seem to have shades of gray, brown, and blue. This effect is known as sepia, as shown in the figures below. Original Sepia Original Image & Sepia Image Write and test a function named sepia that converts a color image to sepia. This function should first call grayscale to convert the color image to grayscale. A code segment for transforming the grayscale values to achieve a sepia effect follows.Note that the value for green does not change. (red, green, blue) = image.getPixel(x, y)if red < 63: red = int(red * 1.1) blue = int(blue * 0.9)elif red < 192: red = int(red * 1.15) blue = int(blue * 0.85)else: red = min(int(red * 1.08), 255) blue = int(blue * 0.93) images.py To instantiate an image from a file, enter image = Image(aGifFileName) To…