Write a program for reuse class. For this program use the above room class' program. Give source code and output also
Q: reate and implement class Stats to compute mean and standard deviation of a set of numbers entered…
A: Since no programming language was mentioned, the solution provided is in Java progarmming language.
Q: Can you help me write a program for this please: Create a class of songs. The class should be…
A: Here's an implementation of the Song class as described in the first question, with standalone…
Q: To be answered in (0) Minutes/5 Marks Write a Java program that takes the year the user was bom in…
A: Start input birthyear define two function public static int age(int y){ int age =2019 - y;…
Q: Use the compareTo method to write code that reads two names from the console and prints the one that…
A: The compareTo() method is used for string handling in which it compares two strings…
Q: (what the output is suppose to look like in pictures with all the animals ) (you don't have to…
A: class Pet { private String name; private LocalDate birthdate; private double price;…
Q: File Factorials.java contains a program that calls the factorial method of the MathUtils class to…
A: Factorial of a number Factorial of a number is define as the product of all the numbers starting…
Q: 5.8 (Find the highest score) Write a program that prompts the user to enter the num- ber of students…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: Use JAVA to create a card game in which the dealer shuffles the deck and deals 13 cards out of the…
A: Step 1: Declare class CardGame1 that extends JFrame. Add an instance of JPanel, JButton and…
Q: Write a program that opens the file, reads all the numbers from the file, and calculates the…
A: Program description : The c++ program, main.CPP opens an input file, Random.txt .The program will…
Q: Rules of Movement Our robot can only move in one of the following directions: right(r), left(1),…
A: We use java.awt.Robot class to capture pixels of screen. It provides method like createScreenCapture…
Q: I am having trouble with this: Implement the convertString method based on its specification. Here…
A: As per the given question, we need to implement convertString() method. Algorithm for convertString…
Q: Java Proram ASAP Please look closely at the circled parts in the failed test case. It says 1 out of…
A: Import necessary Java libraries: The code starts by importing the required libraries, including…
Q: For this task, you are to write code that handles the transfer of virtual coins between players in a…
A: Code: # create a class named Player class Player: # constructor def __init__(self, name,…
Q: I need help with a java problem: Write a program that reads the student information from a tab…
A: Initialize Variables:Declare variables for the file name, arrays for student information (lastNames,…
Q: A).In order to call another method in the same class, it must be declared before (above) the method…
A: As per our company guidelines, we are supposed to answer three subparts of a post and kindly…
Q: Update code so that each participant gets to purchase for another random participant. Meaning the…
A: We can acquire the required output by implementing a small modification in the program. After…
Q: Your cousin owns an automotive maintenance shop that performs routine maintenance on cars. He has…
A: The required methods will be defined as follows: carMaintenace method: This method will take the…
Q: How to solve this exercise? COP2002: Programming Logic & Design with Python Project 6 Project:…
A: Step 1 The code is given in the below step with an output screenshot
Q: asks the user what make car they want to buy validates that the user answers this (i.e. doesn't just…
A: Please find the answer below :
Q: Write code that uses any type of loop. The code should continually ask for a user input and sums all…
A: As the language is not specified answer written in c++ language
Q: Can you please show the input and output of the code it would help very much. There is also a text…
A: main.cpp - #include <iostream>#include <vector>#include <string>#include…
Q: Store name The name of the input file will be supplied using command-line arguments. If no…
A: import java.util.*; class Store { public static void main(String[] args) { Scanner sc =…
Q: Can you please Write a return method called highest CommonFactor() that returns the highest common…
A:
Q: Modify the CharacterInfo class shown and included in the code editor to the right so that the tested…
A: We use a Scanner object to take user input for the character to be tested.After retrieving the…
Q: You work for the county and need a program to calculate a traffic citation report based on the type…
A: FOLDER NAME: If Program 02 FILE NAME: Traffic.java import java.util.Scanner; public class Traffic{…
Q: (a) A short description of your algorithm, where you explain the dynamic programing approach (see…
A: In the dp array, we store the length of the longest increasing subsequence that…
Q: JAVA PPROGRAM I have provided the failed test cases and the inputs as a screenshot. Please Modify…
A: Algorithm: Symmetrical Name Matcher1. Start the program.2. Initialize a Scanner object for user…
Q: Program is not running or is coming bback as blank, no errors are brought up. Am I missing…
A: Python code: Rectangle.py # Rectangle.py class Rectangle(object): # Declare public methods…
Q: Question P Print person1's kids, call the incNumKids() method, and print again, outputting text as…
A: //import the required packagesimport java.util.*;//define the class PersonInfoclass PersonInfo{…
Q: I need a flowchart for this * RockNRollah.java * Write an application to simulate the rolling…
A: Java Programming which refers to an object oriented programming languages. It is used to run on the…
Q: Please help me fix this program. It is constantly saying I have duplicates of class main and many…
A: Java is the programming language that are used to create and develop applications , websites etc.,…
Q: JAVA PROGRAM PLEASE PLEASE PLEASE MODIFY THIS PROGRAM SO WHEN I UPLOAD IT TO HYPERGRADE IT RUNS AND…
A: The goal is to make precise changes to the provided Java application so that it can pass a test case…
Q: Implement the design of the Patient class
A: Given :- In the above question, the statement is mention in the above given question Need to…
Q: Invoking time.time() returns the elapsed time in seconds since midnight of January 1, 1970. Write a…
A: Python is an object-oriented programming language, it is used to develop web browser applications…
Q: Initially, you will prompt the user for the names of two files: one will contain Customer…
A: import csvimport sys # ask the user for the file namescustomer_info = input("Enter the file name…
Write a

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images

- Using a Counter-Controlled whileLoop Summary In this lab, you use a counter-controlled while loop in a Java program provided for you. When completed, the program should print the numbers 0 through 10, along with their values multiplied by 2 and by 10. The data file contains the necessary variable declarations and some output statements. Instructions Ensure the file named Multiply.java is open. Write a counter-controlled while loop that uses the loop control variable to take on the values 0 through 10. Remember to initialize the loop control variable before the program enters the loop. In the body of the loop, multiply the value of the loop control variable by 2 and by 10. Remember to change the value of the loop control variable in the body of the loop. Execute the program by clicking Run. Record the output of this program.For this task, you are to write code that handles the transfer of virtual coins between players in a video game. Instructions As this task relates to tranferring coins between players, a Player class has been provided, which supports adding and subtracting coins. Also provided is an interactive loop for testing the transfer of coins between players. Part A You are to write a function called transfer_coins with three parameters: the number of coins to transfer, the player from which coins will be taken (the "giver"), and the player which the coins will be given to (the "receiver"). It should use the appropriate instance methods on each of the player objects to update them as required. Part B If you tested your solution thoroughly in the previous part, you probably came across a logic error in the program---there's nothing to stop us from taking more coins from a player than they have! You are to fix this problem by raising an exception instead of completing the…Java Proram ASAP Please look closely at the circled parts in the failed test case. Improve and adjust the program which is down below with the futher moddifications because it does not pass the test cases in Hypergrade. Please remove /n from the program and for test case 4 after this line: Please re-enter the file name or type QUIT to exit:\n quitENTER there needs to be nothing. Also, I do not need file quit is no found in the program. import java.io.*;import java.util.Scanner;public class ConvertText { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); System.out.println("Please enter the file name or type QUIT to exit:"); while (true) { String input = sc.next(); if (input.compareTo("QUIT") == 0) { break; } else { // Get the absolute path of the current directory String filePath = new File("").getAbsolutePath(); filePath =…
- You are responsible for adding the appropriate testing code to your main. a. The getValedictorian method returns the valedictorian of the class, that is the student with the highest grade point average. Implement this new method. b. The getHonorsPercent method returns the percentage of students in the class who are in the honors program. Use 3.75 as the cutoff GPA. Implement this method. Also print the list of students, by using the isHonor method, in the Honors program. c. An alternate implementation for the School class is being considered, in which the students are stored in an ArrayList instead of an array. Show how the declaration of the data field students would look in this alternate design. MAIN CLASS: import java.util.ArrayList; public class Main { public static void main(String[] args) { System.out.println("Unit07Project2 by Your Name"); System.out.println(); int size = 10; School onw = new School(size); /* Add the code…Use C++. This lab will help you practice simple data processing from a file where you don't know the amount of information in the file ahead of time. (It also provides some refresher in basic statistics.) (classes may or may not be of use here...you decide!) Write a program that calculates basic statistics for a set of numbers stored in a file. Make sure to allow the user to tell you the name of their file and to check for file open errors. The data in the file will be a space-separated list of numbers. You won't know the length of the list ahead of time. You'll need to calculate the average and standard deviation of the list as well as determining the maximum and minimum for the data. To refresh your memory, the standard deviation is the square root of the variance. And the variance? Well, it is found as discussed in this brief paper. You can choose the actual values to use for the data. Make sure to do enough different sets of data to test your program well! Remember that your…For this project you will use the file included in the attached zip file. It is a series of fictional exam records. You must create a Python application that reads this file, assigns a letter grade to each student based on the scale below, outputs the student name, grade, and letter grade to the screen, and outputs that same information into a comma separated values file. You must use functions, parameters, returns, loops, collections and conditions, and some kind of design (pseudocode or flowcharts). Naming and organization counts. Functions to consider: opening a file, closing a file, reading records, writing records, determining letter grade, and writing to console. Grade scale to use in the application: A: >95% A-: >91 and <95 B+: >87 and <91 B: >83 and <87 B-: >80 and <83 C+: >78 and <80 C: >75 and <78 D: >70 and <75 F: <70
- JAVA PPROGRAM Please Modify this program with further modifications as listed below: ALSO, take out and change the following in the program: System.out.println("Program terminated."); because the test case does not need it And change this in the program: Please enter the file name or type QUIT to exit:\n so it reperats once for every test case because it repeats twice in every case as shown in the screenshot. I only need it once. I have provided the failed the test cases and the inputs as a screenshot. The program must pass the test case when uploaded to Hypergrade. import java.io.*;import java.util.ArrayList;import java.util.Scanner;public class SymmetricalNameMatcher { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String fileName; do { // Prompt the user to enter a file name or 'QUIT' to exit. System.out.print("Please enter the file name or type QUIT to exit:\n"); fileName =…In this assignment, you will create a Java program to search recursively for files in a directory.• The program must take two command line parameters. First parameter is the folder to search for. Thesecond parameter is the filename to look for, which may only be a partial name.• If incorrect number of parameters are given, your program should print an error message and show thecorrect format.• Your program must search recursively in the given directory for the files whose name contains the givenfilename. Once a match is found, your program should print the full path of the file, followed by a newline.• You can implement everything in the main class. You need define a recursive method such as:public static search(File sourceFolder, String filename)For each subfolder in sourceFolder, you recursively call the method to search.• A sample run of the program may look like this://The following command line example searches any file with “Assignment” in its name%java FuAssign7.FuAssignment7…You will build a program to manage a race car in this assessment. The code will consist of a for-loop method that will run a car around a race track and cause “wear and tear” on the car. The car will perform x number of laps and will have to make pitstops when it either runs out of gas or needs a tire replacement. The for loop will be simple def wear_tires(car): tire -=1 def use_gas(car): gas -=1 c = Car() # You need to make this part for i in range(100): if the car needs a pitstop: perform pitstop else: wear_tires(c) use_gas(c) # Display the current cars wear in a much better format print(c.tire) print(c.gas) print(“Current Lap is: “ , i) For this task, you will have to use this for loop and build out the two methods in the main Python program. To use the above code, you must build two pieces of information. An abstract Vehicle class A Car class A RaceCar class Each with its methods and variables. This programming will involve using inheritance and abstraction to make a race car…
- Can someone please help me with this project for my Java Programming class? If you could correct my mistakes for me that would be great.Look at the image for the expected output. Use if class, scanner class, return class to do this program. Look image for the valid user input.In c++. The instructions are in the image. Please do not change existing code below just add to what is needed. I am very confused. Can you please show the input and output of the code it would help very much. There is also a text file which is named "input.txt" and it reads. Different solutions i have seen but i keep getting errors and errors i am still confused. Movie 11Genre1Movie 22Genre2Movie 33Genre3Movie 44Genre4Movie 55Genre5 main.cpp #include <iostream>#include <vector>#include <string>#include "functions.h" int main(){vector<movie> movies; char option; while (true){printMenu();cin >> option;cin.ignore();switch (option){case 'A':{string nm;int year;string genre;cout << "Movie Name: ";getline(cin, nm);cout << "Year: ";cin >> year;cout << "Genre: ";cin >> genre;//call you addMovie() herecout << "Added " << nm << " to the catalog" << endl;break;}case 'R':{ string mn;cout << "Movie…











