I. let's we have a class named Distance having two private data members such as feet(integer),...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
I. let's we have a class named Distance having two private data members such as feet(integer), inches(float), one input function to input values to the data members, one Display function to show the distance. The distance 5 feet and 6.4 inches should be displayed as 5'- 6.4". Then add the two objects of Distance class and then display the result (the + operator should be overloaded). You should also take care of inches if it's more than 12 then the inches should be decremented by 12 and feet to be incremented by 1. II. Write a program to print the following details Assign and print the ID of each employee, • Phone number and Address of two staff members having names 'ali" and "asif" respectively by creating two objects of the class 'Employee'. throw an exception in case the phone number of employee is inserted in float , double or char value. • throw an exception in case the ID of an employee is inserted in float , double or char value. I. let's we have a class named Distance having two private data members such as feet(integer), inches(float), one input function to input values to the data members, one Display function to show the distance. The distance 5 feet and 6.4 inches should be displayed as 5'- 6.4". Then add the two objects of Distance class and then display the result (the + operator should be overloaded). You should also take care of inches if it's more than 12 then the inches should be decremented by 12 and feet to be incremented by 1. II. Write a program to print the following details Assign and print the ID of each employee, • Phone number and Address of two staff members having names 'ali" and "asif" respectively by creating two objects of the class 'Employee'. throw an exception in case the phone number of employee is inserted in float , double or char value. • throw an exception in case the ID of an employee is inserted in float , double or char value.
Expert Answer:
Related Book For
Systems analysis and design
ISBN: ?978-1118808177
5th edition
Authors: Alan Dennis, Barbara Haley Wixom, Roberta m. Roth
Posted Date:
Students also viewed these programming questions
-
Write a Java program that functions as an address book. It should have entries containing at least the following information: first and last name, phone number, date of birth, address, and email...
-
Write a Super class interface employee has name and id number. Write manager and labour derived from employee class. Manager class has member data qfunction and qualification and manager allowance...
-
Let A be an array holding n distinct integer values. We say a tree T is a pre-order realization of A if T holds the values in A and a pre-order traversal of T visits the values in the order they...
-
The two roots of a quadratic equation ax 2 + bx + c = 0 can be obtained using the following formula: b 2 - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation...
-
Consider the general linear model in which the observations Y1, . . . , Yn are independent and have normal distributions with the same variance 2 and in which E(Yi) is given by Eq. (11.5.1). Let the...
-
You drive your car in a straight line at 15 m/s for 10 kilometers, then at 25 m/s for another 10 kilometers. (a) Is your average speed for the entire trip greater than, less than, or equal to 20 m/s?...
-
The current price of a stock share that pays no dividend is \( 50\). The price follows a GBM with drift \(12 \%\) and volatility \(35 \%\); the continuously compounded risk-free rate is \(5 \%\)....
-
During the current month, Tomlin Company incurs the following manufacturing costs: (a) Purchased raw materials of $16,000 on account. (b) Incurred factory labor of $40,000. Of that amount, $31,000...
-
Darren applies a mark-up on cost of 40% to his purchases. (a) How much will his gross profit be if Darren's sales for the year are 98,000? (b) What would the cost of sales be if the mark-up is 25%?
-
You are entering the widget business. It costs $500,000, payable in year 1, to develop a prototype. This cost can be depreciated on a straight-line basis during years 15. Each widget sells for $40...
-
Describe the major elements of the budgeting process presented in the book From your personal experiences indicate the extent to which you believe you would be successful performing each of the...
-
Identify (at least)two critical success factors for implementing program and portfolio management (at minimum,one per each discipline). Explain why the critical success factor is important and what...
-
Identify at least three (3) types of minority groups in the workplace. How the above mentioned minority groups are affected in everyday life in the workplace. Provide at least three (3)...
-
Three objects with masses m = 3.0 kg, m = 11 kg, and m3 = 17 kg, respectively, are attached by strings over frictionless pulleys as indicated in the figure below. The horizontal surface exerts a...
-
On January 1, the company granted 150,000 stock options to key employees. Each option allows an employee to buy one share of $1 par common stock for $25, which was the market price of the shares on...
-
A force F, of magnitude 6.50 units acts on an object at the origin in a direction 0 = 53.0 above the positive x-axis. (See the figure below.) A second force F, of magnitude 5.00 units acts on the...
-
For each of these installment purchases, show the total monthly payments, installment price, the finance charge, the amount financed, the finance charge per $100 of the amount financed, and the...
-
Sandcastles, Inc.s management has recently been looking at a proposal to purchase a new brick molding machine. With the new machine, the company would not have to buy bricks. The estimated useful...
-
Create a set of use cases for the following health club membership system: When members join the health club, they pay a fee for a certain length of time. Most memberships are for one year, but...
-
The Hatcher Company is in the process of developing a new inventory management system. One of the event handling processes in that system is Receive Supplier Shipments. The (inexperienced) systems...
-
How would you motivate adoption if you were the developer of a new executive information system designed to provide your organizations top executives with key performance measures and economic trend...
-
Describe the issues that you considered in each of these facets when you made a recent important purchase.
-
The area of a rectangle is calculated according to the following formula: Design a function that accepts a rectangles width and length as arguments and returns the rectangles area. Use the function...
-
Design a program that gives simple math quizzes. The program should display two random numbers that are to be added, such as: The program should allow the student to enter the answer. If the answer...
Study smarter with the SolutionInn App