Question

Desperately need help with this one thank you and I'll rate you up after thanks : ) Please let me know if any clarif...

Desperately need help with this one thank you and I'll rate you up after thanks : ) Please let me know if any clarification or additional information is needed. Compliance with the outlined project requirements is crucial.

In this question you should program something of your choice but if possible our professor said to make a program that store account number and balance thank you

Project:

Programming a project of your choice in C++.

Step 1- Program must implement a minimum of 3 classes (Ch 13).

Step 2 -You should make use of plenty of concepts (for example, arrays, looping, conditional statements, classes, pointers or references, type casting, etc).

Step 3 -Code must be commented, indented, spaced out and formatted nicely, with meaningful variable names, as we have seen in the labs.

Step 4 -Include a Makefile for compiling the code (text file).

Step 5 -You should include a readme.txt file with a short explanation of how to run the software.Include all the information that's in your mind about how to run the software in the readme file and also explain the program logic in it or put the instructions in a single line comments in your code

0 0
Add a comment Improve this question Transcribed image text
Answer #1

program:

#include<iostream>
#include<conio.h>
using namespace std;
class vehicle            /// base class
{
   public:
       int v_number;
       char v_name[20];
       float price;
      
};
class car:public vehicle        ///derived class
{
   public:
       int abag;
       void get_data()               ///get data by user
       {
           cout<<"enter the number of vehicle"<<endl;
           cin>>v_number;
           cout<<"enter the name of vehicle"<<endl;
           cin>>v_name;
           cout<<"enter the price of vehicle"<<endl;
           cin>>price;
           cout<<"enter the number of air bag in vehicle"<<endl;
           cin>>abag;
          
       }
       void disp_data()           //for displaying the data
       {
           cout<<v_number<<endl<<v_name<<endl<<price<<endl<<abag;
       }
  
};
class bike:public vehicle   ///   derived class
{
   public:
       int seat;
       void get_data()
       {
           cout<<"enter the number of vehicle"<<endl;
           cin>>v_number;
           cout<<"enter the name of vehicle"<<endl;
           cin>>v_name;
           cout<<"enter the price of vehicle"<<endl;
           cin>>price;
           cout<<"enter the number of seat in vehicle"<<endl;
           cin>>seat;
      
       }
       void disp_data()
       {
           cout<<v_number<<endl<<v_name<<endl<<price<<endl<<seat;
       }
      
};
int main()
{
   int i,vnum; //variable
   car c[3];
   for(i=0;i<3;i++) //to get data by user
   {
       c[i].get_data();
   }
   car *ptr;   //pointer to object
    ptr=c;
    for(i=0;i<3;i++)   ///to display the data of array
    {
       ptr->disp_data();
   }
   cout<<"\n enter the vehicle number to search"<<endl;
   cin>>vnum;
   for(i=0;i<3;i++)             ///for searching a vehicle
   {
       if(vnum==c[i].v_number)
       {
           cout<<endl<<c[i].v_number<<endl<<c[i].v_name<<endl<<c[i].price<<endl<<c[i].abag<<endl;
       }
   }
  
}

Add a comment
Know the answer?
Add Answer to:
Desperately need help with this one thank you and I'll rate you up after thanks : ) Please let me know if any clarif...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You need to implement a queue based on the doubly linked list. (In C++) **PLEASE follow...

    You need to implement a queue based on the doubly linked list. (In C++) **PLEASE follow the format** **Don't worry about the readme.txt** THANK YOU SO SO MUCH! You have to implement the doubly linked list in DList.h and DList.cpp and the queue in the LinkedQueue.h and LinkedQueue.cpp; all as template classes. You have to provide the main.cpp file as we discussed in class to allow the user to interact with your queue using enqueue, dequeue, front, back, size, empty,...

  • Hi could you guys help me with this one! thank you and yes I'll rate you...

    Hi could you guys help me with this one! thank you and yes I'll rate you up! thank you Design a class Contact with the data and functionality for one made up contact person ( Don't use actual contact). As data it should store a name, email, and phone. The functions should include getter (accessor) and setter (modifier) functions for each of these data items. Write a small main function that initializes an array of size 10 with: 3 Contact...

  • Hi, anyone can help me? thank you so much Step 7K: Create a Program Create a...

    Hi, anyone can help me? thank you so much Step 7K: Create a Program Create a small program to turn on and off the conveyor utilizing buttons/tags on the HMI, not the hardwired switch Remember you SHOULD NEVER energize an "Input" data file bit, or use it as an internal relay. You will be utilizing your "binary" data file to create internal relays Use two buttons, 1 for start, 1 for stop Latching of the operation is required, but not...

  • i need this in C# please can any one help me out and write the full...

    i need this in C# please can any one help me out and write the full code start from using system till end i am confused and C# is getting me hard.I saw codes from old posts in Chegg but i need the ful complete code please thanks. Module 4 Programming Assignment – OO Design and implementation (50 points) Our Battleship game needs to store a set of ships. Create a new class called Ships. Ships should have the following...

  • 3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your...

    3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your implementation must use C/C++ and your code must run on the Linux machine general.asu.edu. Please refer to the programming guide (available under the Assignments folder on Blackboard) for using the general.asu.edu server, as well as compiling and running C/C++ code under Linux For this question, you need to provide a Makefile that compiles your program to an executable named a3 that runs on the...

  • Please help! I'll rate you after if question is right. Thank you. Question that got cut...

    Please help! I'll rate you after if question is right. Thank you. Question that got cut off said Is there sufficient evidence to support the claim that there is a linear correlation between the weights of bears and their chest​ sizes? Choose the correct answer below​ and, if​ necessary, fill in the answer box within your choice. Fifty-four wild bears were anesthetized, and then their weights and chest sizes were measured and listed in a data set. Results are shown...

  • Step One This is the Measurable interface we saw in class; you will need to provide...

    Step One This is the Measurable interface we saw in class; you will need to provide this class; this is it in its entirety (this is literally all you have to do for this step): public interface Measurable double getMeasure(); Step Two This is the Comparable interface that is a part of the standard Java library: public interface Comparable int compareTo (Object otherObject); Finish this class to represent a PiggyBank. A PiggyBank holds quarters, dimes, nickels, and pennies. You will...

  • I need help with this code, I'm stuck on it, please remember step 4, I'm very...

    I need help with this code, I'm stuck on it, please remember step 4, I'm very much stuck on that part. It says something about putting how many times it appears Assignment #1: Sorting with Binary Search Tree Through this programming assignment, the students will learn to do the following: Know how to process command line arguments. 1 Perform basic file I/O. 2. Use structs, pointers, and strings. Use dynamic memory. 3. 4. This assignment asks you to sort the...

  • Please run the program and show the result with screenshots after. Thank you (Java Eclipse) Customer...

    Please run the program and show the result with screenshots after. Thank you (Java Eclipse) Customer Data: Area Codes Assume you work for a company that tracks customer information, including name, gender and phone numbers Your company has a file called customers.txt which contains the following information: Jiming Wu F 4082123458 James Brown M 8315678432 Leanna Perez F 4087654433 Xing Li M 8313214555 Stacey Cahill O 8312123333 Mohammed Abbas M 4083134444 Kumari Chakrabarti F 4086667777 Shakil Smith M 4082123333 Jung...

  • please help me to solve this question, show the specific steps for me, thanks a lot ! Start of Checkpoint 25 The Task...

    please help me to solve this question, show the specific steps for me, thanks a lot ! Start of Checkpoint 25 The Task Add the following class to the Practical04 project. public class Prac4 public static int max3 (int numl, int num2, int num3) return-1; It contains a method stub called max3 which is supposed to return the largest of its three integer parameters. For example, int st Prac4.max3 (9,3, 4) System.out.println (st); // outputs "9" (without the quotes) Do...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT