Implement a class person with two fields name

Assignment Help JAVA Programming
Reference no: EM13696586

You need to implement a class that saves the details of the person.       

Question: Implement a class Person with two fields name and age, and a class Car with three fields:

  • The model
  • A pointer to the owner (a Person*)
  • A pointer to the driver (also a Person*)

Program: Write a program that prompts the user to specify people and cars. Store them in a vector<Person*> and a vector<Car*>.

Traverse the vector of Person objects and increment their ages by one year.

Traverse the vector of cars and print out the car model, owner's name and age, and driver's name and age.

Reference no: EM13696586

Questions Cloud

Determine maximum current magnitude allowed by device : The voltage across a two terminal device is always 15.0 V. The maximum power the device can dissipate is 0.87 W - Determine the maximum current magnitude allowed by the device power rating.
Write program that uses a class named rectangle : Write program that uses a class named Rectangle. The class has floating point attributes length and width. it has member functions that calculate the perimeter and area of the rectangle. It also has set and get functions for both length and width.
Create a 2-dimensional array for the volume of concrete : Your Company constructs concrete hemispherical domes that range in diameter from 40 to 90 feet and increments of 5 feet.
Write a matlab code using for loop : Write a MATLAB code using "for" loop to compute y when n = 50,100 and 1000.
Implement a class person with two fields name : Implement a class Person with two fields name and age, and a class Car with three fields - implement a class that saves the details of the person.
Create a program that counts the number of numbers : you need to create a program that counts the number of numbers between 150 and 200 - Can you write this program in c language? You need to implement a function that counts the numbers.
Difference between these two ways of initializing variables : What is the difference between these two ways of initializing variables - Can you explain this question and show the difference between the ways of initializing variables?
Write a marie program : Write a Marie program - Given a numbers in memory, labelled V, reverse its sign - You can halt your program once the Result is determined.
Different types of digital modulation schemes : How can we compare the performance of two or more different types of digital modulation schemes?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Shows the users name and program name

Java program, the program has a page that shows the users name and program name. a second jpanel that shows 4 buttons (circle square rectangle and oval) the problem i am having is that my program is not dropping where i click and the shapes are not s..

  Integer expression evaluator

You must implement a bounded generic Stack class. Represent your Stack using an array to hold the stack content - Integer Expression Evaluator

  It should have an if statement

The following are hints given: It should have an if statement. This add method determines what number greater than or less than the other number, than it adds the positive or negative. I think this should be a private method.

  Java application to display multiple choice questions

Write down the application which displays series of TEN(10) multiple choice questions: questions must cover all the Java. Each question must have four possible answers and only one answer must be correct.

  Create listener objects for each jcombobox

Create listener objects for each JComboBox that set the background color of the panel when the user selects an integer. Use the current values supplied by the JComboBox objects to determine the background color.

  1 introductionin order to debug an application it is

1 introductionin order to debug an application it is sometimes useful to know where a given object comes from or where

  How many numbers do you want to enter

Write a program that asks the user "How many numbers do you want to enter?" With that value, create an array that is big enough to hold that amount of numbers (integers).

  User session mgr - socket and thread programs

User Session Mgr - Socket and Thread Programs

  Create java applet to input miles driven and gallons used

Create the Java applet which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display miles per gallon obtained for each tankful.

  Write the bubble sort

The village of Marengo conducted a census and collected records that have household data, including the number of occupants in each household.

  Questions1 write a programme that computes the rental

questions1. write a programme that computes the rental charge given the type of moped when it is rented weekday or

  Definition of a method named copy receives

Write the definition of a method named copy receives a reference to a Scanner object associated with a stream of input. The method reads all the Strings remaining to be read from the stream and displays them

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd