Concept explainers
Repeat
Solution to Project 7
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Management Information Systems: Managing The Digital Firm (16th Edition)
SURVEY OF OPERATING SYSTEMS
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with C++ from Control Structures to Objects (9th Edition)
- 1) Implement a class Students Scores that models the scores of 30 students in four assessment components (Midterm, HWs, Labtest and Final). The class should use 2D array of double values and should provide methods to set and get the scores for any student at any assessment component. It should also provide methods to get the maximum, minimum, and average scores for any component. Your methods may look like the following: public void setScore (int studentID, String component, double temperature) public double getScore (int studentID, String component) public int getMaximumScore (String component) public int getMinimumScore (String component) public int getAverageScore (String component) 2) Document your class and produce a test program 'ScoresTester' that fill the scores with random marks and display the maximum, minimum and average scors.arrow_forwardMust be in JAVA. Please show in simplest form and with comments. The correct UML Diagram MUST be provided as well with the solution. It will be flagged if the UML Diagram is not provided.arrow_forwardPlease help me with this using JavaScriptarrow_forward
- Implement the above system using inheritance in the best possible way. Keep every object size as small as possible. Implement all methods (setter/getter/constructors and destructors) Note that the region area is 0 while the city is len*width and the country is the sum of their cities. Create array of countries called Arab of 22 countries. Write a function fill that fills the array Arab Write a method that finds the city that has the max area in a country Write a method that sorts the cities in a country from the largest to the smallest area Write a function that returns array of countries of the same area of Arab Write a function that compares between two countries. It returns true if country1 area greater than country2 area. Write a function to move a city from one country to another.arrow_forwardComplete the following Programming Assignment. Use good programming style and all the concepts covered to date. Submit the java file(s) electronically through Canvas by the due date via one (1) Zip file. Rainfall Class - Note: Do not write a class as specified regarding the array (below). Instead use two one-dimensional arrays of size 12 each (parallel arrays) and four methods to solve the problem as specified. One array will hold the names of the months and the other array will hold the rainfall in inches for the months. You will pass the appropriate array or arrays to the methods as needed. 1. Rainfall Class Write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following: • the total rainfall for the year • the average monthly rainfall • the month with the most rain • the month with the least rain Demonstrate the class in a complete program. Input Validation: Do not accept negative numbers…arrow_forwardWrite in python and please include docstring. Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It should have an init method that takes four values and uses them to initialize the data members. It should have get methods named get_name, get_ID_number, get_salary, and get_email_address. Write a separate function (not part of the Employee class) named make_employee_dict that takes as parameters a list of names, a list of ID numbers, a list of salaries and a list of email addresses (which are all the same length). The function should take the first value of each list and use them to create an Employee object. It should do the same with the second value of each list, etc. to the end of the lists. As it creates these objects, it should add them to a dictionary, where the key is the ID number and the value for that key is the whole Employee object. The function should return the resulting dictionary. For example, it…arrow_forward
- Implement the above system using inheritance in the best possible way. Keep every object size as small as possible. Implement all methods (setter/getter/constructors and destructors) Note that the region area is 0 while the city is len*width and the country is the sum of their cities. Create array of countries called Arab of 22 countries. Write a function fill that fills the array Arab Write a method that finds the city that has the max area in a country Write a method that sorts the cities in a country from the largest to the smallest area Write a function that returns array of countries of the same area of Arab Write a function that compares between two countries. It returns true if country1 area greater than country2 area. Write a function to move a city from one country to another.arrow_forwardC++ programming language Images attached are the task and targeted output. I was asked to modify "DynamicStringArray.cpp" file to make the program output the correct output. PLEASE i only have to modify the " DynamicStringArray.cpp" code to make the program right. Please help me. BELOW ARE THE PROVIDED CODES IN ORDER TO COMPLETE IT: DynamicStringArray.cpp: // Write the implementation of every method of the class// DynamicStringArray defined in DynamicStringArray.h#include "DynamicStringArray.h"//default constructorDynamicStringArray ::DynamicStringArray (){//write code body of DynamicStringArray ()}int DynamicStringArray ::sizeIs(){//write code body of sizeIs ()}void DynamicStringArray ::addEntry (string str){//write code body of addEntry ()};bool DynamicStringArray::deleteEntry (string str){//write code body of deleteEntry ()}string* DynamicStringArray::getEntry(int index){//write code body of deleteEntry ()}//destructorDynamicStringArray ::~DynamicStringArray (){//write code body of…arrow_forwardC++ programming language Images attached are the task and targeted output. I was asked to modify "DynamicStringArray.cpp" file to make the program output the correct output. PLEASE i only have to modify the " DynamicStringArray.cpp" code to make the program right. Please help me. BELOW ARE THE PROVIDED CODES IN ORDER TO COMPLETE IT: DynamicStringArray.cpp: // Write the implementation of every method of the class// DynamicStringArray defined in DynamicStringArray.h#include "DynamicStringArray .h"//default constructorDynamicStringArray ::DynamicStringArray (){//write code body of DynamicStringArray ()}int DynamicStringArray ::sizeIs(){//write code body of sizeIs ()}void DynamicStringArray ::addEntry (string str){//write code body of addEntry ()};bool DynamicStringArray::deleteEntry (string str){//write code body of deleteEntry ()}string* DynamicStringArray::getEntry(int index){//write code body of deleteEntry ()}//destructorDynamicStringArray ::~DynamicStringArray (){//write code body…arrow_forward
- Instructor note: This lab is part of the assignment for this chapter. This lab uses two Java files, LabProgram.java and SimpleCar.java. The SimpleCar class has been developed and provided to you already. You don't need to change anything in that class. Your job is to use the SimpleCar class to complete the specified tasks in the main() method of LabProgram.java Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar object that performs the following operations: Drives input number of miles forward Drives input number of miles in reverse Honks the horn Reports car status The SimpleCar class is found in the file SimpleCar.java. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 milesarrow_forwardIn Python Please use docstrings and comments for better explanation. Thanksarrow_forwardYou 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…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education