Create a class named Taxpayer. Data fields for Taxpayer include yearly gross income and Social Security number (use an int for the type, and do not use dashes within the Social Security number). Methods include a constructor that requires values for both data fields, and two methods that each return one of the data field values. Write an application named UseTaxpayer 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. Save the files as Taxpayer.java and UseTaxpayer.java.
Q: Create a class called Name that represents a person's name. The class should have fields…
A: Class is a user-defined data type. The object is an instance of a class. The object contains the…
Q: You are required to design an item class which has following attributes String name;…
A: The program is written in java
Q: Create a file named StudentArrayList.java, within the file create a class named StudentArrayList.…
A: ANSWER:-
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: Create a class named CarRental that contains fields that hold a renter's name, zip code, size of the…
A: Here is the code for the above problem:-
Q: Next, create class Lab14A with a main method or driver which should do the following: • Create two…
A: Solution: Given,
Q: Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths,…
A: ANSWER:-
Q: Q. Create a class 'Student' with three data members which are name, age and address. The constructor…
A: //C++ program #include<iostream> using namespace std; //Student class class Student{…
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: For each object class include the following: displayPromotion () method which can be used to…
A: public class Game { //declaring instance variables protected String gameCode; protected String…
Q: Override the parent class ToString() method to include the child class’s additional data. Create a…
A: Program coding is done in C#. Please find the program below
Q: panyName, color, maxSpeed (Not more than 150) and category. Use appropriate data types and access…
A: Create a class Car with parameters companyName, color, maxSpeed (Not more than 150) andcategory. Use…
Q: Write a static method called updateEmpCommission() to receive the array and update the commission of…
A: the code is an given below:
Q: Write an application that creates at least five Apartment objects. Then prompt a user to enter a…
A: import java.util.*;class Apartment { int aptNumber; int bedrooms; double baths; double…
Q: Create an Employee data type, and then create three employee objects. Each employee object has…
A: Create an Employee data type, then create three employee items. Each employee protestedhas his name,…
Q: B. Menl Clas 1. The meal class is defined by two properties: a. Name b. An ArrayList of Food objects…
A: ArrayList is a collection available in util package getCalories() method in Food class will give us…
Q: In previous chapters, you have created programs for the Greenville Idol competition. Now add a…
A: Here is the detailed explanation of the solution
Q: Which of the following Student class methods must be implemented in the Student class to make this…
A: The Correct solution is given below with code and explanation
Q: Create an application named ShapesDemo that creates several objects that descend from an abstract…
A: public abstract class GeometricFigure { //declaring instance variables protected double height;…
Q: Write a program named DemoJobs for Harold’s Home Services. The program should instantiate several…
A: This programs defines a class named DemoJobs that insantiaties an array of three objects. The class…
Q: With reference to the classes defined question #1, write a method called identifyPersons() that…
A: In this Java application, the following classes are created: Class Person Attributes: name,…
Q: Using the Automobile class you created Chapter 10, Programming Exercise 5A as a base, derive a…
A: using System; using System.Collections.Generic; using static System.Console; class AutomobileDemo2 {…
Q: Create an application named SalesTransactiobDemo that declares several SalesTransaction objects and…
A: Since the language to be used is not given in the question, the answer is provided in the Java. If…
Q: B. Meal Class 1. The meal class is defined by two properties: a. Name b. An ArrayList of Food…
A: java code for the given problem :- Note :- Code indention might be lost while pasting the code…
Q: Write Rectangle class to represent a rectangle. The class contains: a. Two double data fields named…
A: public class Rectangle{ //instance variables private double width; private double height;…
Q: This is the question - Create a class named Apartment that holds an apartment number, number of…
A: Program Plan: Define a class called Apartment. The class contains the constructor to set the…
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: Create a class named Taxpayer. Data fields for Taxpayers include Social Security number(use an int…
A: A. Sample Response: //Class definitionpublic class Taxpayer{ //instance variable declaration…
Q: Suppose you operate several Eat Street (city university startup) stands distributed throughout town.…
A: Given: Define a class named as Eat Street that has data members like idnumber and a count variable…
Q: This assignment uses the same account class created in Lab #4 with a more generally useful…
A: This program is written in C++. Please find the program below.
Q: Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have…
A: public class Main{ public static void main(String[] args) { Complex c1=new Complex();…
Q: 1. TestScores Class Write a class named TestScores. The class constructor should accept an array of…
A: ALGORITHM: 1) Create two classes TestDemo.java and TestScores.java 2) In TestDemo class create a…
Q: Encapsulate the Name class. Modify the existing code shown below to make its fields private, and add…
A: Following Code Given below
Q: are to develop a program to define and test an object class whose instances will be used to store…
A: It is defined as an interpreted, object-oriented, high-level programming language with dynamic…
Q: Radio station KJAVA wants a class to keep track of recordings it plays. Create a class named…
A: Here, you need to create object of 'Recording ' class. Then you need to prompt user to enter input…
Q: Create a class named MSUPackage with data fields for course, mode, and insurance package. The mode…
A: The requirement is to solve the given problem in Java language where the below files will be…
Q: You are to develop a program to define and test an object class whose instances will be used to…
A: In the case of the basketball analytics community, BasketballReference.com is a goldmine of data,…
Q: alues for all fields. Save this class as Apartment.java. b. Write a class named showApartment that…
A: Create classes Apartment, showApartment and Renter according to the given specifications. Run the…
Q: Design a class named AutomobileLoan that holds a loan number, make and model of automobile, and…
A: Note: Programming language is missing in the question. So we will answer this program in Java. If…
Q: Create a class for invoice item having attributes invoice id (it’ll be unique for every invoice…
A: class Invoice{ private String partNumber; private String partDescription; private int…
Q: You have been provided with a QTCreator project called Project7_Student. Open the project…
A: Objective: This program implements a Student class along with certain instance variables like name,…
Q: You are given a Restaurant class below, which represents restaurant information scraped from online…
A: Given 100 Restaurant objects, we need to write code to calculate average rating
Q: Q#6: Create a class for invoice item having attributes invoice id (it'll be unique for every invoice…
A:
Q: Q3) Write Javascript code to create an object called student, where this object has the following…
A: In HTML (HyperText Markup Language), create appropriate tags for the HTML webpage document. In that,…
Q: Create a class named CarRental that contains field's for: renter's name, zip code,size of car,…
A: Program: //imported Scanner import java.util.Scanner; //imported text class import java.text.*;…
Q: Create an application named ShapesDemo that creates several objects that descend from an abstract…
A: Solution: As per the requirement submitted above , kindly find the below solution. Here a new…
Q: Create a class called Musicians to contain three methods string ( ), wind () and perc (). Each of…
A: Program: // C++ version 14# include<iostream># include<cstring>using namespace std;//…
Q: You have been provided with a QTCreator project called Project7_Student. Open the project…
A: // iostream in C++ is the standard library which implement stream based input/output capabilities…
Q: Create a class named Salesperson. Data fields for Salesperson include an integer ID number and a…
A: Objective: we need to create a Salesperson class that has an id number and annual sales mount.Also…
Q: Creates a class called CourseClass with 6 attributes: a. name: the course name; b. maxStud: a…
A: Java program to accept the Student detail in the CourseClass using different attributes. We have use…
Using java, solve the problem.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 7 images
- Write a PaypalAccount class to include both balance and accountID as the instance variables. Make sure each instance of this account will have a unique accountID. In other words, different account object should have different accountID (hint: class variable). 2.Write a Bank class with main method. In the main method, ask the user to input how many accounts (say numOfAccount) to be generated in the bank (assuming less than 1000). Then create an array to hold these numOfAccount of Account objects. For each Account object, generate a random balance in the range of 0.0-1000.0. a. Assume that your GSU campus ID is abc-de-fghi; search the array to see if there is an account with accountID as abc (the first three digits of your campus ID). If there is not an account with accountID as abc, then set the accountID of the last account in the array as abc; transfer all the balance of the first account to the account with accountID of abc b. Set the balance of the account with accountID of abc to…With reference to the classes defined question #1, write a method called identifyPersons() that receives an array of Person objects and then displays for each object the following information: name, birthdate, office hours (if the person is Faculty), title (if the person is Staff), class status (if the person is Student), the class name the object belongs to (Person, Employee, Student, Faculty, or Staff). Write a main method to test identifyPersons(). Make sure to call the method and pass array reference containing at least one object from each class.This is the question that is confusing me - A. Create a CollegeCourse class. The class contains fields for the course ID (for example, CIS 210), credit hours (for example, 3), and a letter grade (for example, A). Include get and set methods for each field. Create a Student class containing an ID number and an array of five CollegeCourse objects. Create a get and set method for the Student ID number. Also create a get method that returns one of the Student’s CollegeCourses; the method takes an integer argument and returns the CollegeCourse in that position (0 through 4). Next, create a set method that sets the value of one of the Student’s CollegeCourse objects; the method takes two arguments—a CollegeCourse and an integer representing the CollegeCourse’s position (0 through 4). B. Write an application that prompts a professor to enter grades for five different courses each for 10 students. Prompt the professor to enter data for one student at a time, including student ID and course…
- IN JAVA LANGUAGE Write an ATM class with an ArrayList of Account objects as an attribute. In the constructor, add 3 Account objects to your ArrayList. They can all have a start balance of $100 and an annual interest rate of 0.12. Include two methods, menu and makeSelection as outlined below. Please note that since both methods get user input, create a Scanner attribute to use in both. menu method This method does not have any parameters and does not return a value. It should: Get the account number from the user. This corresponds to the index of the items in the ArrayList. Since there are 3 elements in your ArrayList, you are going to ask them for a number between 1 and 3, but keep in mind that the indices of the ArrayList are 0-2, so you'll have to adjust the value you get from the user accordingly. Present the user with a main menu as shown below: Get their menu selection Call the makeSelection method, passing it the account index obtained in step 1 and the menu selection…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.Write a class, XXXX_TestVehicle, which does the following:1. Creates one Car object from information entered by the user.2. Creates one Truck object from information entered by the user.3. Creates an Array of Vehicles that can hold 10 objects.4. It creates up to 10 Vehicles objects from information entered by the user
- 1. Create a class called Student, with the following attributes/variables:a. studentName (String)b. studentNumber (int)sc. regYear(long)d. faculty(String)e. department(String)2. Add the following methods in Student:a. accessors and mutators for all variablesb. toString methodi. Formulate your toString so that it only shows studentName,studentNumber and faculty3. Create a class called MyFriends, with the following attributes variables:a. studentArray(Student[])4. Add the following methods in MyFriends:a. fillArrayi. Using scanner ask how many students does the user want to inputii. Capture user input for all of his friends(Of course we are assuming all your friends would be similarUWC students, go ask around and meet new friends, alsopreferably not in the same Computer Science department … ifpossible … only if possible)b. maini. Call the fillArray methodii. Count how many Computer Science studentsiii. If half or more students are Computer Science students, thendisplay “You … need more…Using the Automobile class you created Chapter 10, Programming Exercise 5A as a base, derive a FinancedAutomobile class that contains all the data of an Automobile, plus the following field: AmtFinanced - The amount financed (a double) Override the parent class ToString() method to include the child class’s additional data. Create a program named AutomobileDemo2 that contains an array of four FinancedAutomobile objects. Prompt the user for all the necessary data, and do not allow duplicate ID numbers and do not allow the amount financed to be greater than the price of the automobile. Sort all the records in ID number order and display them with a total price for all FinancedAutomobiles and a total amount financed. For example, the output should be in the following format: Summary: FinancedAutomobile 1 2017 Honda Price is $26,000.00 Amount financed $12,000.00 FinancedAutomobile 4 2019 Honda Price is $36,000.00 Amount financed $0.00 FinancedAutomobile 5 2016 Toyota Price is $30,000.00…Using the Automobile class you created Chapter 10, Programming Exercise 5A as a base, derive a FinancedAutomobile class that contains all the data of an Automobile, plus the following field: AmtFinanced - The amount financed (a double) Override the parent class ToString() method to include the child class’s additional data. Create a program named AutomobileDemo2 that contains an array of four FinancedAutomobile objects. Prompt the user for all the necessary data, and do not allow duplicate ID numbers, and do not allow the amount financed to be greater than the price of the automobile. Sort all the records in ID number order and display them with a total price for all FinancedAutomobiles and a total amount financed. For example, the output should be in the following format:
- 1. 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 Car with parameters companyName, color, maxSpeed (Not more than 150) andcategory. Use appropriate data types and access specifiers. Use default constructor to create objectsof cars. Write methods to set and get the values of parameters of car. Write methods to find categoryof car and to display the complete details of car along with category. Create another class TestCarwhich creates array of n number of cars, uses appropriate set methods to set the values of parametersof every car. Display the details of each car. (If max speed is between 120 and 150 then category is“High speed” otherwise “Normal”) (JAVA)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…