Create two enumerations that hold colors and car model types. You will use them as field types in a Car class and write a demonstration program that shows how the enumerations are used.
Q: Make any necessary modifications to the RushJob class so that it can be sorted by job number. Modify…
A: Although the it is very complex one I try to solve some of it CODE : Job.cs using System;…
Q: Create a class named PremiumSugarSmashPlayer that descends from SugarSmashPlayer. This class is…
A: Solution is in Step 2.
Q: Create a class name Taxpayer. Data fields for Taxpayer include yearly gross income and Social…
A: Let's understand step by step : 1. Create a class named TAxpayer which is two integer variables…
Q: This is the question - The developers of a free online game named Sugar Smash have asked you to…
A: The above program is trying to design and build the class named SugarSmashPlayer, holding data about…
Q: In this lab, you create a derived class from a base class, and then use the derived class in a C++…
A: Below is the complete solution with explanation in detail for the given question in C++ Programming…
Q: Modify class Rectangle to include a draw function that displays the rectangle inside a 25-by-25 box…
A: Solution: Given: Given that the rectangle inside a 25-by-25 box enclosing the portion of the first…
Q: The developers of a free online game named Sugar Smash have asked you to develop a class named…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: You will create a class that could be used to create a Text Adventure game. The class will be…
A: # As mentioned in the question we need to have a total of 3 files. 1. "Item.h", 2. "Player.h" and 3.…
Q: 1: Create a enum PizzaType, which has the following entries: PIZZA_TYPE_PLAIN,…
A: As per the Bartelby guideline we are suppose to answer only one question at a time.So please repost…
Q: The class will be called "Item" and will represent an item in the game that can be carried and used…
A: #include "Item.h" #include <iostream> #include <string> using namespace std; int main()…
Q: Create a class called Distance that has two data member feet as int type and inches as float type.…
A: A constructor is a special member of a class that has the same name as the class name. The default…
Q: Referring to the UML class diagram given above, write codes in the main application that will do the…
A: Composition is a type of relationship between two or more classes. The composition indicates that…
Q: There is a PayRoll Class that has data members for an employee’s hourly pay rate, number of hours…
A: Programming instructions for the revised version of program and PayRoll: Declare a variable named…
Q: Please make a trivia game using java gui. Please comment the code. Please also include the following…
A: Answer Code with comments import java.awt.Font;import java.awt.event.ActionEvent;import…
Q: There are 4 types of passengers in the system: Standard: This is the most common type of passenger…
A: Polymorphism in Java is the ability of an object or method to take on various forms based on the…
Q: In this lab, you create a derived class from a base class, and then use the derived class in a C++…
A: According to the information given :- We have to create a C++ program named Motorcycle.cpp…
Q: You will be writing a scheduling application allowing a convention center to schedule events. This…
A: Here I written Python Code as per your problem. I hope you like it.
Q: The current balance is $100.0 Main Menu: 1: check balance 2: deposit 3: withdraw 4: exit 2 Enter the…
A: makeSelection methodThis method does not return a value and has 2 parameters: the account index (you…
Q: Write an enumerated data type that describes types of triangles based on the number of equal sides.…
A: code along with output and code screenshot is given below.
Q: 1. The UoF ID of the student 2. The full name of the student 3. The year in which the student…
A: the java code is an given below :
Q: design a Club class and use it to create an application that simulates a soccer league tournament.…
A: Code with outputs in the following steps:
Q: Your program will have a class called FlightController that is going to be derived from two base…
A: GIVEN Your program will have a class called FlightController that is going to be derived from two…
Q: Make a declaration that sets the object's monthlyPay reference variable. array that can hold decimal…
A: The specification of an initial value for a reference variable An array is a useful tool for anyone…
Q: java program should display the elements as students’ score in tabular form. Compute and print the…
A: class Super_Mario { //data member String name; int mathScore; int engScore; int…
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: Your program must process the following four commands. Create account amount Deposit account amount…
A: /** * This class performs bank operations*/public class Account { private int accNumber;…
Q: Add three methods to the Student class that compare twoStudent objects. One method (__eq__) should…
A: Step 1 : STARTStep 2 : implement the methods equality, less than , greater than or equal toStep 3 :…
Q: Write a program that will contain an array of person class objects. The program should include two…
A: We are entrusted with writing a Java program in this programming scenario that comprises of the…
Q: you create a programmer-defined class and then use it in a C++ program. The program should create…
A: Step 1 : STARTStep 2 : declare all variablesStep 3 : set, get the length and widthStep 4 : implement…
Q: In C++ program
A: The solution is given below for the above given question:
Q: Add three methods to the Student class that compare twoStudent objects. One method (__eq__) should…
A: The question asks you to add three comparison methods to a Student class in Python. The three…
Q: Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas…
A: import java.util.*;import java.lang.*;import java.io.*; class Rental{ public final static int…
Q: Suppose you are using a jQuery animation to make an element change color when the user clicks on it,…
A: Correct Option is " a " a => Pass the function in as the first argument to the animate()…
Q: Create a class with given elements (see below). The java program should display the elements as…
A: In this question we need to create a class in java which holds the record of students. We need to…
Create two enumerations that hold colors and car model
types. You will use them as field types in a Car class and write a
demonstration
Step by step
Solved in 2 steps with 1 images
- In this lab, you create a derived class from a base class, and then use the derived class in a C++ program. The program should create two Motorcycle objects, and then set the Motorcycle’s speed, accelerate the Motorcycle object, and check its sidecar status. Instructions Ensure the file named Motorcycle.cpp is open in your editor. Create the Motorcycle class by deriving it from the Vehicle class. Use a public derivation. In the Motorcycle class, create a private attribute named sidecar. The sidecar attribute should be data type bool. Write a public set method to set the value for sidecar. Write a public get method to retrieve the value of sidecar. Write a public accelerate() method. This method overrides the accelerate() method inherited from the Vehicle class. Change the message in the accelerate() method so the following is displayed when the Motorcycle tries to accelerate beyond its maximum speed: "This motorcycle cannot go that fast". Open the file named…Make any necessary modifications to the RushJob class so that it can be sorted by job number. Modify the JobDemo3 application so the displayed orders have been sorted. Save the application as JobDemo4. An example of the program is shown below: Enter job number 22 Enter customer name Joe Enter description Powerwashing Enter estimated hours 4 Enter job number 6 Enter customer name Joey Enter description Painting Enter estimated hours 8 Enter job number 12 Enter customer name Joseph Enter description Carpet cleaning Enter estimated hours 5 Enter job number 9 Enter customer name Josefine Enter description Moving Enter estimated hours 12 Enter job number 21 Enter customer name Josefina Enter description Dog walking Enter estimated hours 2 Summary: RushJob 6 Joey Painting 8 hours @$45.00 per hour. Rush job adds 150 premium. Total price is $510.00 RushJob 9 Josefine Moving 12 hours @$45.00 per hour. Rush job adds 150 premium. Total price is $690.00 RushJob 12 Joseph Carpet cleaning 5 hours…Little debugging help The program runs correctly but doesn't follow instructions completely. Currently, I have a parameterized constructor in the circle class when it asked for default I need help to fix the circle subclass. Please Write a default constructor that initializes the name of the Circle object to "Circle". You will need to call the constructor of the parent Shape class. The program runs everything in ShapeDriver /** * Write a Circle class that extends the Shape class. Do the following:* 1. Write the class header.* 2. Write a default constructor that initializes the name of the Circle object to "Circle".* You will need to call the constructor of the parent Shape class.* 3. Write a void method printMessage() that prints the message " I have no sides".**///Your code goes herepublic class Circle extends Shape {public Circle(String myName) {super(myName);}public void printMessage() {System.out.println("I have no sides");}} /*** * Write a Rectangle class that extends the…
- Write a graphical application that contains a class named RV whose objects are the recreational vehicle designed and digitized as described in Knowledge Exercises 20 and 21 (you can design your version as well. Simple car shape is will be appreciated. The class’s private data members should be the vehicle’s body color and (x, y) location. a) Give the UML diagram for the class. It should include a three-parameter constructor, a toString method, a method to input the values of all of an object’s data members, and a show method to draw the RV at its current (x, y) location. b) Progressively implement and test the RV class by adding a method and verifying it before adding the next method. A good order to add the methods to the class is the three-parameter constructor, followed by the toString method, the show method, and finally the inputmethod. The client code should create an RV object using the three-parameter constructor to test all of the methods as they are progressively added to the…Please answer this with PYTHON LANGUAGE. thank you The developers of a free online game named Sugar Smash have asked you to develop a class named SugarSmashPlayer that holds data about a single player. The class contains the following fields: idNumber - the player’s ID number (of type int), name - the player's screen name (of type String), scores - an array of integers that stores the highest score achieved in each of 10 game levels Include get and set methods for each field. The get method for scores should require the game level to retrieve the score for. The set method for scores should require two parameters—one that represents the score achieved and one that represents the game level to be retrieved or assigned. Display an error message if the user attempts to assign or retrieve a score from a level that is out of range for the array of scores. Additionally, no level except the first one should be set unless the user has earned at least 100 points at each previous level. If a user…For your homework assignment, build a simple application for use by a local retail store. Your program should have the following classes: Item: Represents an item a customer might buy at the store. It should have two attributes: a String for the item description and a float for the price. This class should also override the __str__ method in a nicely formatted way. Customer: Represents a customer at the store. It should have three attributes: a String for the customer's name, a Boolean for the customer's preferred status, and a list of 5 indexes to hold Item objects. Include the following methods: make_purchase: accepts a String and a double as parameters to represent the name and price of an item this customer is purchasing. Create a new Item object with this info and append it to the internal list. If the customer is a preferred customer based on the Boolean attribute's value, take 10% off the total sale price. __str__: Override this method to print the customer's name and every…
- Add three methods to the Student class that compare twoStudent objects. One method (__eq__) should test for equality. A second method (__lt__) should test for less than. The third method (__ge__) should test for greater than or equal to. In each case, the method returns the result of the comparison of the two students’ names. Include a main function that tests all of the comparison operators. Note: The program should output in the following format: False: False True: True True: True False: False True: True True: True True: True True: True True: True True: TrueAdd three methods to the Student class that compare two Student objects. One method ( -_eq_- ) should test for equality. A second method ( -_lt__ ) should test for less than. The third method ( --ge__ ) should test for greater than or equal to. In each case, the method returns the result of the comparison of the two students' names. Include a main function that tests all of the comparison operators. Note: The program should output in the following format: False: False True: True True: True False: False True: True True: True True: True True: True True: True True: TrueHow do I create this class in Java? Contact Class Requirements The contact object shall have a required unique contact ID string that cannot be longer than 10 characters. The contact ID shall not be null and shall not be updatable. The contact object shall have a required firstName String field that cannot be longer than 10 characters. The firstName field shall not be null. The contact object shall have a required lastName String field that cannot be longer than 10 characters. The lastName field shall not be null. The contact object shall have a required phone String field that must be exactly 10 digits. The phone field shall not be null. The contact object shall have a required address field that must be no longer than 30 characters. The address field shall not be null.