in C++ Write a function that allows you to modify a Planet in the SolarSystem class. You can choose to pass a Planet into this function, or have the function prompt for planet information. Either way, you need to be able to specify the Planet at a specific index to be modified. This is an example of how it could potentially look in the main: // code that declared a SolarSystem the_system // and assigned planets Planet p("X", 2000, 4000); int index = 2; the_system.changePlanet(p, index);
Q: Give us four obvious benefits that a distributed system offers. There are a number of drawbacks to…
A: Scalability: Distributed system offer the scalability hence the system can be scaled based on the…
Q: Write a class called Ave method that contains a main method and method called threeAve( method name)…
A: Ask the user to input three numbers (double type). Call the threeAve method and pass in the three…
Q: Explain what a Web app consists of and how information moves through it.
A: A web application (web app) is an application program that is stored on a remote server and…
Q: Please describe the Control Unit and the ALU, two of the many crucial parts of a central processing…
A: The Control Unit (CU) and Arithmetic Logic Unit (ALU) are two crucial parts of the central…
Q: import java.util.LinkedList; public class IntTree { private Node root; private static…
A: Start with the root node and a current depth of 0. If the current node is null or the current depth…
Q: Problem Y takes an undirected graph G and an integer k, and asks if G contains an archipelago whose…
A: Dear learner, hope you are doing well, I will try my best to answer this question. Thank You!!
Q: Thank you for that, it works great. I didn't realize the ' ' being such an issue. I just reread my…
A: The issue in your second file is that you are trying to call the num() function from the convert…
Q: 9.23 City Search (Part C, Binary Search) In this part, we will extend our code to also implement…
A: Algorithm: START Define a function named linear_search that takes two parameters, a list of cities…
Q: Mention three (3) types of Java FX layout pane
A: JavaFX is a framework for creating rich, cross-platform graphical user interfaces (GUIs) in Java. It…
Q: What benefits and drawbacks come with incorporating a gateway into an existing network?
A: Network The network is the group of devices, such as computers, printers, and servers, that are…
Q: How does the linker choose which of these two actions to prioritise
A: A linker is a program that combines multiple object files generated by a compiler to create an…
Q: When talking about computers, "buses" refer to interconnected networks of wires used to transmit…
A: When talking about computers, the word "bus" refers to a cable network that allows for various types…
Q: d contrast the Broker Pattern versus the Client/Server Pattern archit
A: In the field of software architecture, there are multiple architectural patterns that help in…
Q: J ← E a {x} B where is all markup in word - EcX C Import bookmarks... Getting Started AINSY…
A: Import the random module to generate a random number. Create a list of cities by assigning it to the…
Q: write a java program to print the mirror image of right angled in x-direction after taking number of…
A: Write a Java program to print the mirror image of right-angled in x-direction after taking a number…
Q: What are the benefits of doing healthcare-related research in cyberspace? What are the technical…
A: The pros and cons of each approach should be weighed to determine which is best for each patient or…
Q: The key to sellotape method of data entry has the primary
A: Data entry is a crucial process in any organization, and various methods can be used to record and…
Q: Using quadratic probing, create a hash table HT[0..8, 0..2] for the collection of keys 17, 9, 34,…
A: To construct the hash table using quadratic probing, we need to first initialize an empty table of…
Q: Do you believe app developers should need private information before downloading and using their…
A: The use of mobile applications has increased dramatically over the years, with millions of people…
Q: Do apps ultimately replace the web? In your own words, please explain why you think this is a good…
A: Apps for mobile devices are becoming increasingly popular, and it's true that many people prefer to…
Q: Implement a hash table example as shown in class ( insert, delete, display, initialize, search) Data…
A: This implementation uses separate chaining to handle collisions. The table array holds pointers to…
Q: Analyse the impact Web Engineering has had on various markets. Think about how much effort it takes…
A: Web engineering is a branch of software engineering that deals with the development, design,…
Q: Computer ethics covers security, crime, privacy, social interactions, and government. How firmly do…
A: In today's digital age, data protection and privacy have become critical issues. As technology…
Q: Question 1: Add a member function to Linked List called insertAfter. The function should insert a…
A: ''Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: truly distributed systems modeled?
A: Distributed system model are as follows - Architectural Models Interaction Models Fault Models
Q: Can the inner workings of a computer be described using this? After that, I anticipate that we will…
A: Computers are become a necessary component of our lives. Life, from basic chores like checking…
Q: What matters most during batch-to-serial processing?
A: The process's nature should be given the greatest weight when switching from the batch to serial…
Q: What separates public cloud services from private? Why would you advocate another option?
A: Cloud computing has become an increasingly popular option for businesses and individuals looking to…
Q: Consider the challenges you'll face when building the framework, then examine each solution's…
A: Dear learner, hope you are doing well, I will try my best to answer this question. Thank You!!
Q: The OSI model assumes more layers than most computer systems. Because computer systems are inherent.…
A: The OSI (Open Systems Interconnection) model uses a seven-layer structure to provide a comprehensive…
Q: Problem 1 print("Problem 1") Create a function named problem1.| Create a dictionary named spring23…
A: Dear Student, As no programming language is mentioned, I am assuming it to be Python. The code below…
Q: 9.23 City Search (Part C, Binary Search) In this part, we will extend our code to also implement…
A: Here's a brief explanation of the code: linear_search(city_list, city): This function performs a…
Q: Write the compareTo method for a class describing a person whose name is stored as two Strings:…
A: Here is the implementation of the compareTo method for a Person class in Java: public class Person…
Q: Manage Kampala's crime prevention efforts on your own. Artificial intelligence (AI) can be used to…
A: AI technology can be employed to analyze and learn from data related to crime patterns,…
Q: Write a macro that will convert a temperature reading in degrees Celsius to degrees Fahrenheit,…
A: Note: programming language is not specified here, we are providing answer in c++ since macro concept…
Q: Look for a method that, given a linked network with even-degree vertices, can generate an Eulerian…
A: To generate an eulerian cycle in a linked network with even-degree vertices in O(n+e) time, use…
Q: Should output Ex: If targetValue is 0.3333 and sensorReading is (1.0/3.0), output is:.
A: This is a Java program that reads in two double values from the user using the Scanner class. The…
Q: The figure below shows the DFD model for a customer purchasing an electronic article from an online…
A: Online ordering system (different from your regular website). These usually provide HTML code for…
Q: When it comes to email security, do network administrators have any moral or ethical considerations?
A: We have to explain that, when it comes to email security, do network administrators have any moral…
Q: Answer the given question with a proper explanation and step-by-step solution. Answer yes or no…
A: Graph isomorphism is a concept in graph theory that refers to the existence of a one-to-one…
Q: a hash table for a given set of keys using the chaining method of handling overflows. Maintain the…
A: Implement a hash table for a given set of keys using the chaining method ofhandling overflows.…
Q: Use examples to illustrate the differences in functionality between the two forms of memory.
A: Primary memory, sometimes referred to as random access memory or RAM, and secondary memory, also…
Q: Why utilise cache memory if RAM uses transistors? Is one memory type sufficient?
A: RAM and cache memory have diverse functions and are optimised for various kinds of data access.…
Q: A modem is an accessory used to link a phone to a modem. Why would you need this thing?
A: In the modern era of technology and connectivity, it is crucial to understand the devices that play…
Q: HREE distinct computer settings that are pertinent to our subject in your own words.
A: Computer settings refer to the various configurable options and preferences that control the…
Q: Virtualization will impact operating systems in several ways:
A: Introduction Virtualization technology has revolutionized the way computing resources are managed…
Q: Cloud computing has the potential to enhance society and the environment in a number of ways. His…
A: When data and computing services are stored and accessed online, this is called cloud computing.…
Q: Android question: Suppose you have a table named ‘food’ with the following attributes: Id: int…
A: Android is defined as an open-source operating system for mobile devices such as smartphones and…
Q: You should know how a Web app is put together and how data is transferred between its many…
A: Web applications are designed to provide users with access to information, services, and…
Q: e how a FUSE filesystem wo
A: Filesystem in Userspace (FUSE) is a software interface that allows developers to create and…
in C++
Write a function that allows you to modify a Planet in the SolarSystem class. You can choose to pass a Planet into this function, or have the function prompt for planet information. Either way, you need to be able to specify the Planet at a specific index to be modified.
This is an example of how it could potentially look in the main:
// code that declared a SolarSystem the_system // and assigned planets Planet p("X", 2000, 4000); int index = 2; the_system.changePlanet(p, index); |
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
- in c++ Write a function named createTwoNames that will do the following: - Read in a word and its definition - Create the Word object for that word and definition - Read in an item’s name and its price - Create the Item object for that item - It will return an array of two pointers pointing to these newly created Word and Item objects. It will use try-catch statement to handle the exception. If the user enters an empty or all-blank word or definition or item’s name, it will not create the object(s) and return null for that object only. In another words, it may create 0, 1 or 2 objects. Whenever the error occurs, it must print out the correct error reason: empty or blank (but not both). Note that this function can and will use cin and cout to read in values from the user.In C++ Write the definition of a void function that has two parameters: an array, and an integer parameter that specifies the number of elements in the array. The functions swaps the first and last elements of the array.in C++ Write a function named “createVariableObject” that will read in the variable name, description anda value (string) from the user and create a dynamic Variable or VariableString depending on the value: if the user provides an empty string value, it will create a Variable object, otherwise it will create a VariableString object. It will return the pointer of the newly created object. This function must handle all error cases for invalid variable names entered by theuser: starting with a non-alphabet letter or containing blanks by handling exception usingtry-catch. It will print out proper error message and continue to ask the user forthe new value until it is correct name.Please show how this function is being tested andprint out the correct variable information.
- (In C++) This program should be designed and written by a team of students. Here are some suggestions: You may work on a single class. The parameter and return type s of each function and class member function should be decided in advance. The program will be best implemented as a multi-file program, (header file, the main program,..) You need to print all output to an output file and submit it to the instructor during the final exam. Design a generic class to hold the following information about a bank account: Balance Number of deposits this month Number of withdrawals Annual Interest Rate Monthly service charges The class should have the following member function: Constructors Accepts arguments for the balance and annual interest rate. deposit a virtual function that accepts an argument for the amount of the deposit. The function should add the argument to the account balance. It should also increment the variable holding the…In C++Write the header file (.h file) of a class Counter containing: A data member counter of type int. A data member named counterID of type int. A static int data member named nCounters. A constructor that takes an int argument. A function called increment that accepts no parameters and returns no value. A function called decrement that accepts no parameters and returns no value. A function called getValue that accepts no parameters and returns an int. A function named getCounterID that accepts no parameters and returns an int.In C++ , Write a program that creates an EvenNumber object for value 16 and invokes the getNext() and getPrevious() functions to obtain and displays these numbers. The program must contain the following, **please also implement the class A data field value of the int type that represents the integer value stored in the object. A no-arg constructor that creates an EvenNumber object for the value 0. A constructor that constructs an EvenNumber object with the specified value. A function named getValue() to return an int value for this object. A function named getNext() to return an EvenNumber object that represents the next even number after the current even number in this object. A function named getPrevious() to return an EvenNumber object that represents the previous even number before the current even number in this object.
- C++ Write a function named “createPayStub” that accepts the number of hours(integer), and the hourly payrate (double). It will return the pointer to a newlycreated PayStub object. If the given hours or payrate is negative, it will returnnullptr. In addition, it also returns the total payout amount to the caller (in theoutput parameter).Please show how this function is called and returning the proper information.The program has to be in c++ Can someone help with this program?Create a Student class with member-data name and average success and member-functions• Designers• get & set• member-function (method), returning the first letter of the student's nameWrite external functions with a vector parameter from students• To read a list of Student objects (vector <Student>) from a file (the file is submitted as a second parameter)• To display a list of students on the screen• To calculate the average success of a list of students Write two sorting functions - by name and by average success.In main (), create an empty vector of students and illustrate the application of the written external functions (they in turn use the member functions of the Student class).in C for STM32F446RE microcontroller Write a source library that contains the with the following public functions: void keypadInit(void); /Initiallized the GPIO to read the keypad. uint16_t readKeypad(void); //Returns the state of all of the keypad buttons in the return value at the moment the function is called. void decodeKeypad(uint16_t, char *); //Takes the state of the keypad and returns (by reference) an array of the key's pressed. The library should work with the following main: int main (void) { uint16_t key; char carray[17]; keypadInit(); while(1) { while(!(key = readKeypad())); /*Get which keys pressed*/ decodeKeypad(key, carray); /*What are those keys*/ printf("%s\n",carray); /*Print those keys to screen*/ while(readKeypad() == key); /*Wait for the keypad to change*/ }} Problem 1: Write a library that works with the following pin assignments R0 -> PC0 R1 -> PC2 R2-> PC4 R3 ->…
- (C PROGRAMMING ONLY) 4. Pyramid Schemesby CodeChum Admin They said pyramids were created by aliens, so if you can make a pyramid you might be able to qualify as an alien. Instructions: In the code editor, you are provided with a main() function that asks the user for an integer input n, and passes this value to the function call of the generatePattern() function.Your task is to implement this generatePattern() function which has the following description:Return type - voidFunction name - generatePatternParameters - 1 integer nDescription - this function prints a triangular pattern of letter T's based on the value of n. For more information, refer to the output in the test casesDO NOT EDIT ANYTHING IN THE MAINInput 1. Integer n Output Enter n: 4TTTTTTTTTTC++YOU ONLY NEED TO EDIT date.h, dateOFYear.h, and dateOFYear.cpp date.h | date.cpp | dateOfYear.h | dateOfYear.cpp | dateTest.cpp You have been provided a Date class. Each date contains day and month parameters, a default and a custom constructor, mutator and accessor functions for the parameters, and input and output functions called within operator >> and <<. You will be writing a DateOfYear class, which expands on the Date class by adding a year parameter. This will be achieved via inheritance – DateOfYear is the derived class of the Date base class. In DateOfYear, will need to write… The include guards for the class A default constructor that initializes all parameters to 1 A custom constructor that takes in a month, day, and year to initialize the parameters Mutator and accessor for the year parameter Redefined versions of inputDate and outputDate that takes into account the new year parameter. The driver program, dateTest.cpp, is already set for use with both Date…In C++ Please Write a program that accepts two integer values, called "arraySize" and "multiplier", as user input. Create an array of integers with arraySize elements. Set each array element to the value i*multiplier, where i is the element's index. Next create two functions, called PrintForward() and PrintBackward(), that each accept two parameters: (a) the array to print, (b) the size of the array. The PrintForward() function should print each integer in the array, beginning with index 0. The PrintBackward() function should print the array in reverse order, beginning with the last element in the array and concluding with the element at index 0. (Hint: for help passing an array as a function parameter, see zybooks section 6.23) As output, print the array once forward and once backward. Sample Input 3 2 Sample Output 0 2 4 4 2 0