Create a complex program that applies control structure, iterative, array .
The National Bank of the Caribbean wants to have a car loan calculator designed and implemented using C++. You have been asked to design a class that will determine the monthly payment on a motor vehicle based on the total years allotted for the loan. The monthly payment with interest compounded monthly can be calculated as follows: loan* rate 0/12 * term , where term = 1+ rate /12 !"∗ %&'() Payment = the monthly payment Loan = the dollar amount of the loan Rate = the annual interest rate Years = the number of years of the loan The class should have member functions for setting the loan amount, interest rate, and number of years of the loan. It should have member functions for returning the monthly payment amount and the total amount paid to the bank at the end of the loan period. Implement the class in a complete program (loan.h, loan.cpp, driver.cpp)
The following program has some problems with input data. Rewrite the following program in such a way to validate the input data.
Run your program with the following inputs:
95
150
-66
77
B
45
$$
69
Submit screenshots with all the output runs
You have been contracted by Toyota Zambia to design a system that can make the Toyota Mark
X a smart vehicle. The company has proposed to install four infrared radars on the car, just
below each light set, to use as sensors. Each sensor has a range of 20m. The company wants the
car to be able to avoid collisions at the rear, and the front, and to be able to auto accelerate to a
recommended spend if the course is clear or when collision is eminent at the rare and the front is
clear, and to be able to overtake a vehicle on the road without causing any accident. The sensors
can pick human body heat at a distance of 15m, and a vehicle body heat at 20m.
a. Using a pseudocode, show the algorithm for the car system, an remember that it
is using four sensors, one at each vehicle corner. With swaying to the right if the
left is not clear and vice versa, till it stops or it continues to correct its paths if the
course is clear.
b. Using C++, write a source code for the car smart system
Write a C++ program which takes multiple Employees information (records) as inputs from the
user and save them on a file using class. Writing in file should be done using setters. Perform
following operations on the data saved in the file:
• Read data from file
• Search an employee’s information in the file
• Count the number of employees having salary more than 50,000.
Write a C++ program which takes 5 students’ information (records) as inputs from the user and
save them on a file. Your program should have two options: writing and searching.
When a user selects writing option, you are required to take three inputs from the user: student
name (string type), student age (int type). After reading these data-items write to the file named “student.txt”. Please note: write data using append mode otherwise previous information will be lost.
Your program should have a search function. The search function should provide three options
for searching: by name, by age, or by registration number. After selection of the search option
by the user, please take input (name, age, or registration number) and search that student from the
file and display its record on the screen.
1) All the banks operating in India are controlled by RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set minimum interest rate applicable to a saving bank account to be 4% annually; however, banks are free to use 4% interest rate or to set any rates above it.
Write a program to implement bank functionality in the above scenario. Note: Create few classes namely Customer, Account, RBI (Base Class) and few derived classes (SBI, ICICI, PNB etc). Assume and implement required member variables and functions in each class.
Please write in C++ a solution to the following problem. Having a list of words (which are sequences of small letters), one word per one line, sort them according to the following order: word_1 is smaller that word_2 if word_1 contains more letters ‘a’, and in the case of the equal number of ‘a’ letters in both words, consider the number of letter ‘b’, and as a smaller word take word with bigger number of letter ‘b’, and so on. In the case of two words have the same number of equivalent letters, take into account lexicographic order between them. For example: baabca is bigger that ccaaaa (3 x ‘a’ vs 4 x ‘a’), and xababx is smaller than abacd (2 x ‘a’ in both words, but 2 x ‘b’ in the first one vs 1 x ‘b’ in the second one word). Word bbaaxx is smaller than xxaabb. An example input and output. Input: ale james john ela alexander kamil Output: alexander james ale ela kamil john
Create the class Employee that has the following member data: employee id, employee name, gender, date of birth, address, contact number, date hired, employee type, position, and salary rate. Define all the accessors and mutators needed for the member data of this class. Test the class by creating an object in the main function and try changing or displaying the values of its member data through its accessors and mutators.
Improve the Product.cpp in Figure 7.7 such that the main program will create an array of 10 product objects. Ask for the all values of the member data of each of the product object. After all the data entry of the 10 products, the program will display the product details in a table form.
Write a program that reads a group of numbers from the user and places them in an array of type int. Once the numbers are stored in the array, the program should average them and print the result.