Create a class called Musicians to contain three methods string ( ), wind () and perc (). Each of these methods should initialize a string array to contain the following instruments
Q: When using the 7th option, you should create a personnel using their name and surname. When using…
A: Code is given in next steps:
Q: Part 1: Write a program that uses a 2-D array to store the highest and lowest temperatures for each…
A: NOTE: Since programming language is not mentioned. Therefore answering the question in Python…
Q: Write a program that uses a Class to store the following weather data for a particular month: Total…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args)…
Q: Please help me with this problem. Create a class to represent an Airplane object containing…
A: Airplane passengers : Passenger [ ] airplaneName : String numPassengers : int //calculated…
Q: Assume that you have an array of integers called numbers that has been declared and filled with…
A: Method name is BubbleSort Parameters are one integer array and an integer Doesn't return value
Q: Write a program that uses a Class to store the following weather data for a Total Rainfall High…
A: Required: Write a program that uses a Class to store the following weather data for a Total…
Q: Create a class called ArrayModulus, with the following methods and requirements: • Declare a 5 by 4…
A: Required:
Q: Java programming language I need to complete the "public int remove" method in the bottom. Please…
A: public class ourArray { //define an array of integers private int[] Ar; //Ar is a reference…
Q: Create a static method called createOrderArray. This function should take in a String as a parameter…
A: Here I have created an enum named order with the values as given in the question Then I have created…
Q: Write an application that displays a series of at least five student ID numbers (that you have…
A: CODE:- ScoreException.javapublic class ScoreException extends Exception{ public…
Q: you created a Card class that represents a standard playing card. Use this to design and implement a…
A: // DeckOfCards.java public class DeckOfCards { // array to store cards in deck private…
Q: Write a complete method to create an expanded String array. Method Specifications The method takes…
A: public class Main { public static String[] expandArray(String[] original) { // length of…
Q: This is the class that will contain the program's main method and use an array of Month objects. In…
A: Actually, Java is a high level programming language. And also object oriented .It. Is a platform…
Q: Write array methods that carry out the following tasks for an array of integers by creating and…
A: File name: “ArrayMethods.java” import java.util.Scanner; class ArrayMethods { private int[]…
Q: Write a method that receives an array to determine how many scores are above or equal to the…
A: Program approach: import Scanner class for input. Create a class with the name AboveEqualAvgScore.…
Q: 2. Write a class ArravClass, where the main method asks the user to enter the f num bers. Create a…
A: Java code: import java.util.Scanner;import java.util.Arrays; public class ArrayClass{ public…
Q: Assume there is a class called RaceCar. Each race car object has a private int data field named…
A: Java used to answer this question
Q: To create an array of size 10 of type a class named employee, the following statement can be used:…
A: Answer: D) Employee [ ] list = new Employee[10];
Q: In the composer array, create a statement that copies the string "Beethoven."
A: STATEMENT: This statement copies the string Beethoven into the composer array. stripy is the…
Q: Create an array of objects and initialize them and show the data using class methodsHint:( create…
A: A class is a user-defined data type that combines data members and methods for manipulating that…
Q: Java Write a Bank class with main method. In the main method, ask the user to input how many…
A: Answer: //java program for randomly generating Bank accountIDs and balance import java.util.*;…
Q: The local Driver’s License Office has asked you to write a program that grades the written portion…
A: Given data, The local Driver’s License Office has asked you to write a program that grades the…
Q: Make an application that displays a series of at least five student ID numbers (that you have stored…
A: Actually, java is a object oriented programing. It is a platform independent.
Q: For an array declartion of int number [25];, what will be the ending index? 0 1 24…
A: Elements of an array is stored in contiguous memory location. Indexing of an array starts from 0.
Q: constructor to create the books object ok bookobj): to add a new book to the arrayli
A: The program code provided below is made up of two files Library.java and Book.java. Library.java has…
Q: Question (2): Define a method called SecondLowest. We pass an array when called it and print the…
A: Answer: import java.io.*;//usefull header file to importimport java.util.*;//usefull header file to…
Q: Write a Student class which keeps track of grades and generates a final mark. You should store: 3…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that uses a Class to store the following weather data for a particular month: Total…
A: The array is a linear data structure in which the user can store the same data linearly. A user can…
Q: Exercise 2 - Numbers Create a new class called Numbers that contains a method called nextLargest.…
A: Given:
Q: Write a driver class as follows: *s) Declare an array of type GradesReport. The array size is 5. а.…
A: Note :- You have not mention the language of program , So I am doing your question in Java. You java…
Q: Create a method multiply(), that receives the 2D array you created in 2. as aninput, multiplies all…
A:
Q: create an array of "Opinion" objects called "poll" that will represent five students opinions of a…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Q: Write a program that uses a Class to store the following weather data for a particular month: Total…
A: A program is a set of instructions given to a computer in order to perform certain tasks, the tasks…
Q: Create a class called CustomerLister with a main method that instantiates an array of String objects…
A: Instantiate an array To instantiate an array, we used the syntax: arrayName = new datatype[ size ];…
Q: Write a program that creates a tool box object that contains two(2) different tools, each with…
A: As per the requirement program is completed. Note: Here the programming language is not mentioned,…
Q: 1. Write a program that calls these two methods as described below a. A void method that prints…
A: public static void method1() { for(int i = 1; i <= 5; i++) { for(int j = 1; j <= i; j++) {…
Q: Create a class called ArrayModulus, with the following methods and requirements: • Declare a 5 by 4…
A: 1. create a function to calculate the modulus.2. take the array of two dimension randomly.3. use…
Q: Please help with the following: Write a Student class which keeps track of grades and generates a…
A: Write a Student class which keeps track of grades and generates a final mark.
Q: QUESTION 2: Class Rectangle has two data members, length (type of float) and width (type of float).…
A: The correct option is option B. arrayRectangle[1].setLength(4.15);…
Q: PLease use java In this assignment, you will implement a class called ArrayAndArrayList. This class…
A: Three separate .java files are written. One for the implementation of ArrayAndArrayList class along…
Q: _7. Consider the code below: int[] scores = (50, 70, 35, 80, 75, 90, 100, 95}; The value of Length…
A: To state true or false for the given questions.
Q: To create an array of size 10 of type a class named employee, the following statement can be used:…
A: Answer: B
Q: Store data of car in a array. Car contains model(int), company (String), price(int) and…
A: Program: Program is used to interact with the computer system and solve problems. The main objective…
Q: Create another class TestCar which creates array of n number of cars, uses appropriate set methods…
A: As you have not mentioned any structure for class Car I am considering following structure. Car…
Q: Write a static method, getBigWords, that gets a single String parameter and returns an array whose…
A: Purpose: This program includes a static method "getBigWords" that receives a string (sentence)…
Q: te a class called CustomerListerwith a mainmethod that instantiates an array of Stringobjects called…
A: It is defined as programs can be asked from control statements, array, string, oops etc. Java basic…
Q: Assume that you have an array of integers called numbers that has been declared and filled with…
A: using System; namespace SortingExample { class Program { static void…
Q: Exercise 2: Write array methods that carry out the following tasks for an array of integers by…
A: The answer to the following question:-
Q: Write an application with a main method that allows you to: • Create an array of 10 films with data…
A: The program is written in Java. Please find the source code and output in the following steps.
Q: Problem 1: Write an equals method for the Car class. Two cars are equal if they have the same model…
A: public boolean equals(Car c) { if(this.model.equals(c.model) && this.color.equals(c.color))…
C++
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
- Create a class Bookwhich describes its book_titleand book_price. Follow the below steps,a.Use getter and setter methods to get & set the Books description.b.Implement createBooks and showBooks methods to create n objects of Book in an array.c.Display the books along with its description as follows,Book TitlePriceJava ProgrammingRs 350.50Let Us CRs.200.00d.Note: createBooks & showBooksshould not be member functions of Bookclass1. Create a class Employee with parameters name, id, designation, and basicSalary. Use appropriate datatypes and access specifiers. Use default constructor to create objects of employee. Write methods toset and get the values of parameters of employee. Write methods to find total salary of employee andto display the complete details of employee along with total salary. Create another class TestEmployeewhich creates array of n number of employees, uses appropriate set methods to set the values ofparameters of every employee. Display the details of each employee. (Total salary = basic salary + 80%of basic salary)Create a class Student with following data members, name, roll, and marks as private data member. Create array of objects for three students, compare their marks but make sure allocating memory to all the objects during run time only and display the records of the student who is getting highest score.
- an int variable k, an int array currentMembers that has been declared and initialized, an int variable nMembers that contains the number of elements in the array, an int variable memberID that has been initialized, and a bool variable isAMember, Write code that assigns true to isAMember if the value of memberID can be found in currentMembers, and that assigns false to isAMemberotherwise. Use only k, currentMembers, nMembers, and isAMember.1Declare an array to store objects of the class defined by the UML above. Use a method from the JOptionPane class to request the length of the array from the user. and Use a method from the JOptionPane class to request values from the user to initialize the instance variables of Election objects and assign these objects to the array. The array must be filled using this UMlWrite a program in a class FlowerCounter that computes the cost of flowers sold at a flower stand. Five kinds of flowers—petunia, pansy, rose, violet, and carnation— are stocked and cost, respectively, 50¢, 75¢, $1.50, 50¢, and 80¢ per flower. Create an array of strings that holds the names of these flowers. Create another array that holds the cost of each corresponding flower. Your program should read the name of a flower and the quantity desired by a customer. Locate the flower in the name array and use that index to find the cost per stem in the cost array. Compute and print the total cost of the sale.
- Write a Payroll class that uses the following arrays as fields:• employeeId. An array of seven integers to hold employee identification numbers. The array should be initialized with the following numbers:5658845, 4520125, 7895122, 8777541,8451277, 1302850, 7580489• hours. An array of seven integers to hold the number of hours worked by each employee• payRate. An array of seven doubles to hold each employee’s hourly pay rate• wages. An array of seven doubles to hold each employee’s gross wagesThe class should relate the data in each array through the subscripts. For example, the num-ber in element 0 of the hours array should be the number of hours worked by the employee whose identification number is stored in element 0 of the employeeId array. That same employee’s pay rate should be stored in element 0 of the payRate array. In addition to the appropriate accessor and mutator methods, the class should have a method that accepts an employee’s identification number as an argument and…10. Write a static void method named raiseAllDesksToHighest The method should accept an array of StandingDesk references. If the array reference is null, or the array is empty the method can return without doing anything. Otherwise it should adjust the heights of standing desks in the array so that they all have the height of the highest desk in the array.In JavaScript, the following statement _____.let town = { name: "Helena", county: "Shelby", population: 18500}; Question options: A creates an object containing items that are referenced by index value B instantiates a town object that the program can call Array object methods on C produces an object literal with three methods that can be called on it D creates an associative array containing three key-value pairs
- Please help with the following: Write a Student class which keeps track of grades and generates a final mark. You should store:3 quiz scores, an array of int between 0 and 20; 1 midterm score, an int between 0 and 50;1 final score, an int between 0 and 100;the overallScore (double) and letter grade (char). also create the appropriate accessor and mutator methods. Student should also include the methods: public void calculateOverallScore() { ... } Quizzes are worth 15% of the grade, Midterm is worth 35% of the grade, the Final is worth 50% of the grade. public void finalLetterGrade() { ... } 100 ~ 90: A 90 ~ 80: B 70 ~ 80: C 60 ~ 70: D 0 ~ 60: FBlackjack is a card game where the goal is to reach a score of 21. Create a java version of this game with the following requirements. Extend the JPanel class and create an array of 52 cards. Add four sets of numbers from 1 to 10. Use J for Jack, Q for queen, K for king, and A for ace. Jack through king will have a value of 10, and the ace will have a value of 11. Deal two cards to the user and two cards to the computer. Do not show the value of the computer's first two cards to the user. Add buttons Hit, Stay, and Reset. If the user selects the "Hit" button, randomly select one of the cards from the array, and give it to the user. (After selecting a card, do not reuse this index during the rest of the game.) If the dealer has less than 21, "hit" the dealer, too. When the user selects the "Stay" button, add up the card values. The winner is the person who is closest to 21 without going over. Name the class Blackjack.java.Create a class called WashingMachine with a float called CubicFeet, a string called brandName, and a method called Washing. The Washing method should return a string to the main class with the text "Now washing clothes!" In the main class create an array of WashingMachine size 5. Give each WashingMachine a different brand and CubicFeet. Use a foreach loop to display that info, call the Washing method, and display the text returned from the Washing method call. in C#