Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write the code for the following problem using either C or C++. If there are 8 cars with its car number {11,10,34,56,68,89,65,78} parked in a parking area, then you are looking for a car number 68 by checking every car sequentially from the beginning.


A small business wants to create a file to store its customer information. Each record in the file is to

contain the following data: customer ID number, first name, last name, city, zip code, and account balance.

Write a program to create such a customer file named “customer.txt”. Write the file with space-separated

fields.

Write another program that displays the contents of the file “customer.txt” in column form with

appropriate column headings.



A moving contractor wants you to write a program that he can use to estimate the cost

of moving a residential customer. The charge for moving is based on two factors.

First, the labor cost is estimated by charging $4.00 for every 100 pounds of furniture to

be moved.

Second, the travel charge is $50.00 plus $1.75 for each mile the furniture is to be moved.

The program should prompt the user for the estimated weight of the furniture and the

distance the furniture is to be moved.

Finally, the program should display the labor charge, the travel charge, and the total

charge.



Create a file manually with the file name and contents shown below. The file contains records of student

name, age, sex, and favorite subject unit code.

Record.txt

Wong 18 M ATGE3022

John 19 M ATGE2222

Shirley 20 F ATGE2053

Tan 20 F ATGE1234

Lee 21 M ATGE2053

Chin 18 F ATGE2053

Chan 21 M ATGE2053


Write a program that reads the contents of the file and display the following result on the screen:

i) Total numbers of female whose favorite subject unit code is ATGE2053

ii) Total numbers of male whose favorite subject unit code is ATGE2053


Create a class which stores account number, customer name and balance. Derive two classes from ‘Account’ class: ‘Savings’ and ‘Current’. The ‘Savings’ class stores minimum balance. The ‘Current’ class stores the over-due amount. Include member functions in the appropriate class to:-

  • Deposit money
  • Withdraw [For saving account minimum balance should be checked.]

&,[For current account overdue amount should be calculated.]

  • Display balance

Create a class which stores employee name, id and salary. Derive two classes from ‘Employee’ class: ‘Regular’ and ‘Part-Time’. The ‘Regular’ class stores DA, HRA and basic salary, which is to be given during the run-time. The ‘Part-Time’ class stores the number of hours and pay per hour, which is also to be given during the run-time. Calculate the salary of a regular employee and a part-time employee. 


Execute this code with THREE pushes and ONE pop
stack<int> s;
s.push(1);
s.push(2);
s.push(3);
cout << s.pop( );
Suppose that s is represented by a linked list. Draw the state of the private member
variables of s after the above code:
_______
head_ptr| |
|_______|
Execute this code with THREE pushes and ONE pop:
stack<int> s;
s.push(1);
s.push(2);
s.push(3);
s.pop( );
Suppose that s is represented by a partially filled array. Draw the state of the private
member variables of s after the above code:
_______ __________________________________
used| | data| | | | | |
|_______| |______|______|______|______|______|
[0] [1] [2] [3] [4]
The Linked List contains certain Nodes containing data of integer type, You cannot use any
other type of Array or data structure neither doubly Linked List. Use only singly linked list,
Implement a function which can reverse the List. Write down the code take dummy data to
test and take snap shot to show output paste it in document.
Int to Stack: Given a non- negative integer, Parse the integer and push it in a stack
then push to another stack in such a way that while storing all numbers should be
in ascending order. Store in back to unsigned integer in the order they can be
popped, it will give you a new integer.
The rules of the are:
 The only permitted ADT is stack.
 Stack rules should not be violated
 You are not permitted to use and store data in any other variable other than
the variable storing initial non- negative number
 You can use than variable to store the final result.
 The variable storing non-negative number is not allowed to use again to store
any numbers
Hint:
 Unsigned int x = 69815
 Parse and Store in stack as |6|9|8|1|5|
 Sorted numbers |1|5|6|8|9|
 Unsigned int x = 98651
LATEST TUTORIALS
APPROVED BY CLIENTS