Design an application that declares an array of 10 StockTransactionobjects. Prompt the user for data for each object, and then display all the values. Design an application that declares an array of 10 StockTransactionobjects. Prompt the user for data for each object, and then pass the array to a method that determines and displays the two stocks with the highest and lowest price per share.
Q: Given a chess board, your job is to write a program that takes two squares x and y as input and then…
A: Program: #include <bits/stdc++.h> using namespace std; int dx[8]={-2, -2, -1, -1, 1, 1, 2,…
Q: Alice and Bob use the ElGamal scheme with a common prime q= 131 and a primitive root a = 6. Let…
A: The answer is
Q: 00 75 50- 25 .00 25 .50 75 .00 b A d -1.00 -0.75 -0.50 -0.25 0.00 1.00 0.05 1.00 025 050 075 100
A: Answer: Please mention your query
Q: How many spanning trees does the following graph have?
A: According to the information given:- We have to find out the total number of spanning tree of…
Q: The roots of the elements of the subtrees are smaller than the root of the heap. a) True b) False
A: The correct answer for the above mentioned question is given in the following steps.
Q: Q1/ Simplify the following Boolean functions in products of sums using K-map: a) F (w, x, y, z) =…
A: Given Query: 1. F(w,x,y,z) = Minterms(0,2,5,6,7,8,10) 2. F(A,B,C,D) = Maxterms(1,3,5,7,13,15)
Q: Explain the overall strategy for deadlock prevention and realistic deadlock prevention method
A: Introduction Deadlock is where a lot of cycles are obstructed on the grounds that each cycle is…
Q: real-time cl ach host nee 00 unique ic ne that each IPv4 addres nique ID fo
A:
Q: Exercise 3.1 Define the following terms: relation schema, relational database schema, domain,…
A: The Definition of the above following terms are given below: Relation Schema Relational database…
Q: What exactly is the notion of privacy in terms of information security? What distinguishes this…
A: According to the information given:- We have to define the notion of privacy and privacy from the…
Q: Item No. 1 Marks Rubrics Criteria Q1 Total 4. Marks ILOS 20 20 B3 Marks Obtained Q1: Create Student…
A: Here we have given solutions for the first three questions as per the guidelines.. you can find the…
Q: Discuss three persuasive reasons for the importance of software design in S/W engineering.
A: Introduction: Software design is the process of laying the groundwork for your software structure…
Q: The definition of luminance What are the main distinctions between brightness and radiance? Computer…
A: What is luminance? Luminance is related to the measure of light i.e. amount of light emitted from…
Q: Explain the following terms: Cursor, Embedded SQL, JDBC, SQLJ, stored procedure.
A: Cursor: Disables location indicator on a computer screen where the user can enter text. In an…
Q: Explain the General Structure of CPU.
A: Below is block diagram and structure of CPU. Then we are discussing it's components briefly.
Q: Consider the following normal form of the game with two players. Which of the following is the…
A: The answer is given in the below step
Q: A subroutine calling sequence is what? How does it work? What do the prologue and epilogue of the…
A: A subroutine in a computer program is a collection of programmatic commands that together carry out…
Q: What makes overloading and generics different? Why is ad hoc polymorphism sometimes used to describe…
A: Polymorphism is the process of defining a single body for methods and functions with the same name.…
Q: Let ENFA = {N | N is an NFA and L(N) = Ø}. Prove that ENFA is in P.
A: Ans
Q: Process the records and display the results formatted as a table, evenly spaced, as shown in the…
A: Solution- Programming Language - Python Make sure your csv file is stored on same location of…
Q: The roots of the elements of the subtrees are smaller than the root of the heap. a) True b) False
A:
Q: Explain the General Structure of CPU.
A: INTRODUCTION A CPU is the rationale hardware that answers and cycles the fundamental guidelines…
Q: Computer education What precisely are disruptive technologies, and how can they enable firms to make…
A: Intro The study of computers grew out of the work of engineers like Alan Turing, whose 1936 paper on…
Q: Describe the requirement for an architecture perspective and view model in terms of software…
A: Introduction: The architectural perspective is a representation of one or more components of the…
Q: The risk to information assets that remains even after current controls have been applied. Give…
A: Non-compliance with regulatory requirements, security breaches, and data breaches are all potential…
Q: Which of the following is the implementation of the ternary tree? a) AVL Tree b) Ternary Heap c)…
A:
Q: Can you explain the most significant components of an operating system? to summarise?
A: Introduction: The supervisor programme, which is mostly resident in memory, is the most important…
Q: Explain Simple classification Techniques ? 4) (discuss all 4
A: Introduction • It is the method involved with organizing information into homogeneous gatherings as…
Q: Show the output that would be generated by each of the following program fragments: for w in "Now is…
A: for w in "Now is the winter of our discontent ... ".split () split() method in Python split a string…
Q: In the Union/Find algorithm, the ranks of the nodes on a path will increase monotonically from? a)…
A:
Q: 1. You may use the source code template in h3.s found in the assignment zip archive as a starting…
A: The answer is given below.
Q: What are the applications of computers in various domains, such as education, health, and so on?
A: Introduction: The applications of computers in a variety of fields due to the fact that computers…
Q: How do smart pointers work? What function do they fulfil?
A: A smart pointer is an abstract data type that replicates a pointer and offers functions like…
Q: = Let ENFA {N N is an NFA and L(N) = Ø}. Prove that ENFA is in P.
A: ans
Q: How much time does construction of suffix tree take? a) O (log M) b) O (M!) c) Exponential to Length…
A: Following each suffix and starting with the top node, we create a suffix tree, giving…
Q: Write a C++ function named is Prime that takes a positive integer argument and returns true if the…
A: Here I have defined the function named isPrime(). Inside the function, I have used a loop to…
Q: In the Union/Find algorithm, the ranks of the nodes on a path will increase monotonically from? a)…
A: Union-find Algorithm is an algorithm which performs two important operations on such a data…
Q: Who proposed the concept of Suffix Tree? a) Weiner b) Samuel F. B. Morse c) Friedrich Clemens Gerke…
A: The answer is given in the below step
Q: It is your responsibility as a university network administrator to choose the suitable NAT…
A: Intro A network administrator is the person inside an organization who is in charge of administering…
Q: What is the role of ergonomics in the computing field? Describe the ergonomic safety precautions as…
A: Introduction: Without giving it much thought, people spend the majority of their days in front of…
Q: d framing protoc ter pattern of utput bit-string a 001101110011, fed is
A:
Q: Write a note on components of motherboard.
A:
Q: A petroleum cut has the following TBP Distillation data: Volume % distillate 0 10 30 50 70 90 95…
A:
Q: Code Example 4-2 def get_volume (width, height, length=2): volume = width * height * length def main…
A: The correct solution is given below with an explanation
Q: What will be the position of 5, when a max heap is constructed on the input elements 5, 70, 45, 7,…
A: Answer is option b) 5 will be at last level in max heap child node should be less than the…
Q: Convert this C code into MIPS Assembly Language #define WINNER_NONE 0 int check_winner(void) {…
A: Given Code: #define WINNER_NONE 0 int check_winner(void) { for (int row = 0; row <…
Q: . Consider the following recursive algorithm for computing the sum of the first n cubes.…
A: Given algorithm is a recursive algorithm which computes the sum of first n cubes and the function…
Q: What is the worst case efficiency for a path compression algorithm?
A: please check the step 2 for answer
Q: Why is the star schema a good fit for data warehouse databases?
A: Introduction: The star schema is the most basic and fundamental form of the data mart schema, and it…
Q: The amortized time efficiency for performing deletion of a minimum element is? a) O(N) b) O(log N)…
A: The amortized time efficiency for performing deletion of a minimum element :-
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Create a class containing the main method. In the main method, create an integer array and initialize it with the numbers: 1,3,5,7,9,11,13,15,17,19 Pass the array as an argument to a method. Use a loop to add 1 to each element of the array and return the array to the main method. In the main method, use a loop to add the array elements and display the result. Note: In the loops, use the array field that holds the length of the array and do not use a number for array length.Create a class named Taxpayer. Data fields for Taxpayers include Social Security number(use an int for the type, and do not use dashes within the Social Security number) and yearly gross income. Methods include a constructor that requires values for both data fields, and two get methods that return each of the data field values. B。 Write a program that declares an array of 10 Taxpayer objects. Set each Social Security number to 999999999 and each gross income to zero. Display the 10 Taxpayer objects C. Modify your program so each Taxpayer has a successive Social Security number from 1-10 and gross incomes that range from 10000 to 100000, increasing by 10000 for each successive Taxpayer.JavaDriver Program Write a driver program that contains a main method and two other methods. Create an Array of Objects In the main method, create an array of Food that holds at least two foods and at least two vegetables. You can decide what data to use. Method: Print Write a method that prints the text representation of the foods in the array in reverse order (meaning from the end of the array to the beginning). Invoke this method from main. Method: Highest Sugar Food Write a method that takes an array of Food objects and finds the Food that has the most sugar. Note that the method is finding the Food, not the grams of sugar. Hint: in looping to find the food, keep track of both the current highest index and value. Invoke this method from main.
- Write a program called ArrayOfStudents that displays information of three students. You need to use array of objects. Each element in the array need to be initialized using a constructor. Each Student will have (name, id and Specialization). The Program will display the student information by invoking the method showStudentData(). Challenge: Can You modify the program to allow the user to enter the number of students stored in the array of objects, and ask the user to insert the details of each student.Make an application that displays a series of at least five student ID numbers (that you have stored in an array) and asks the user to enter a numeric test score for the student. Make a ScoreException class, and throw a ScoreException for the class if the user does not enter a valid score (less than or equal to 100). Catch the ScoreException, display the message Score over 100, and then store a 0 for the student's score. At the end of the application, display all the student IDs and scores. public class ScoreException extends Exception { public ScoreException(String s) { } } import java.util.*; public class TestScore { public static void main(String args[]) throws Exception { Scanner input = new Scanner(System.in); int[] ids = {1234, 2345, 3456, 4567, 5678}; int[] scores = {0, 0, 0, 0, 0}; String scoreString = new String(); final int HIGHLIMIT = 100; String inString, outString = ""; for (int x = 0; x < ids.length; ++x)…Write an application that displays a series of at least five student ID numbers (that you have stored in an array) and asks the user to enter a numeric test score for the student. Create a ScoreException class, and throw a ScoreException for the class if the user does not enter a valid score (less than or equal to 100). Catch the ScoreException and then display an appropriate message. In addition, store a 0 for the student’s score. At the end of the application, display all the student IDs and scores. Save the files as ScoreException.java and TestScore.java.
- Please help me with this problem. Create a class to represent an Airplane object containing instances of the Passenger objects Airplane passengers : Passenger [ ] airplaneName : String numPassengers : int //calculated controlled variable no setter Airplane() //default array length = 100 , numPassengers = 0 Airplane(String) //default array length = 100 , numPassengers = 0 Airplane(int) //max size of array, if value is negative set to 0 Airplane(String, int) //name of airplane, max size of array, if value is negative set to 0 addPassenger(Passenger) : void getAirplaneName() : String getPassenger(int) : Passenger //return null if index is invalid getNumPassengers() : int //notice no setter… this is a controlled variable getFirstPassenger() : Passenger getLastPassenger() : Passenger getPassengers() : Passenger [ ] setAirplaneName(String) : void printAllDetails() : void // prints Airplane attributes Passenger attributes as formatted below: // "AirplaneName: %20s | Number of Passengers:…Create a class named Salesperson. Data fields for Salesperson include an integer ID number and a double annual sales amount. Methods include a constructor that requires values for both data fields, as well as get and set methods for each of the data fields. Write an application named DemoSalesperson that declares an array of 10 Salesperson objects. Set each ID number to 9999 and each sales value to zero. Display the 10 Salesperson objects.Write an application (including algorithm) that uses a class called “Book” (seedetails below). The application must perform the following tasks. Create an array of “Book” objects (i.e., array must be able to store 2books). Create 2 “Book” objects initialized as follows.o title = “C++ Textbook”; Author = “Pete Parker”; Publisher =“Cengage”, ISBN = “0123456789”; subject = “Computer Programming”;o title = “Java Textbook”; Author = “Bruce Wayne”; Publisher = “McGrawHill”, ISBN = “9876543210”; subject = “Computer Programming”; Add the two books to the array.o Assume the two publishers have merged into a new company called“BookConglomerate”. Use a loop to create statements to modify thepublisher field with the new publisher name. Display the following information for both bookso Book Title (i.e., “C++ Textbook” or “Java Textbook”)o Authoro Publishero ISBNo SubjectThe Book class must contain the following. Constructor with parameters that initialize all instance variables title, author,…
- Write a program that creates a tool box object that contains two(2) different tools, each with varying speeds. class Tools (1) A array of five(5) doubles with the initial values 7000.55, 5017.34, 9789.23, 6912.45, 345.12. This represents the initial varying speeds of the tools. (2) Method setSpeed. This contains two parameters. The first parameter is of type double and the second is of type int. If the value of the second parameter is 100, multiply each array element by the first parameter, otherwise divide each array element by the first parameter. (3) Method displaySpeed. This displays all the array elements. class ToolBox (1) Objects T1 and T2 of type Tools. (2) Method toolsInfo. This method contains two (2) parameters that are the same with setSpeed. If the value of the second parameter is 100, set first the new speeds for T1 and then display the new speeds, otherwise set first the new speeds for T2 and then display the new speeds. class try (1) one object of type ToolBox…Java a) You are writing a method named getAverage that runs in the main class and is called by the main method. Its only parameter is a 2D double array named values, and it returns a double that is the average of all the values stored in it. Write the complete method header for this method. Include the opening brace for the method. b) Given a String variable named firstName that has been declared and initialized, write the complete statement needed to make firstName all lowercase.Using jGRASP please write this code You are writing a program to convert Ounces to Grams for 3 different measurements of Ounces. Create a class called ConversionsOunces that contains the following: a data member for an array to hold 3 different measurements in Ounces. a constructor that accepts a parameter for an array that stores the 3 different measurements in Ounces a method that calculates the total Ounces input for the 3 different measurements of Ounces a method that calculates the total Grams by converting the total Ounces to total Grams. To convert Ounces to Grams, multiply total Ounces by a factor of 28.35 Create a program called ConversionsOuncesDemo that references the ConversionsOunces class that contains the following: an array to store the 3 different measurements in Ounces input by the user a for loop that prompts the user to enter the Ounces to be converted so that the user can input 3 different measurements of Ounces create an object that represents the Ounces…