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...
-
One of the most important ideas promoting free trade was GATT's "most-favored-nation" clause. Explain.
-
Explain the similarities and differences between creating an EOP in a small city and a large city.
-
Explain why finance has been globalised over the past 20 years.
-
Samantha Green owns and operates Twigs Tree Trimming Service. Recall from Chapter 3 that Samantha has a degree from a forestry program, and recently opened her business in Winnipeg. Her business...
-
Coolibah Holdings is expected to pay dividends of $ 1 . 2 0 every six months for the next three years. If the current price of Coolibah stock is $ 2 2 . 6 0 , and Coolibah's equity cost of capital is...
-
Forecasting with the Parsimonious Method and Estimating Share Value Using the ROPI Model Following are income statements and balance sheets for Cisco Systems. Cisco Systems Consolidated Statements of...
-
Provide the IUPAC name for the compound below.
-
3. What will be the output after running the following initial blocks? //Initial block A initial begin x = 1; $display ("Hello, x=%d, t=%t", x, $time); #15; x = 2; $display ("Hello, x=%d, t=%t", x,...
-
Consider a MAC scheme where a MAC tag for a message m is generated as MACK(m) = H(K||m), where H: {0,1}* {0,1}' is a hash function and secret key K is random: i.e., K
-
Imagine that you are in training and development for a global organization. You have been tasked with the creation of a cultural diversity training course that all employees will be required to take....
-
(Consider the encryption function for a symmetric cryptosystem described by the table below, where K = M = C = {0, 1, 2, 3} k 0 m 1 03 0 2 1 1 3 0 22 1 0 30 2 3 2 3 1 2 3 1 (i) Give the corresponding...
-
A deck of 52 playing cards is shuffled. What is the probability of drawing two red cards (hearts or diamonds) in succession without replacement? Express your answer as a fraction.
-
The Award Plus Company manufactures medals for winners of athletic events and other contests. Its manufacturing plant has the capacity to produce 10,000 medals each month. Current production and...
-
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...
-
Calculate the value of Maxwell-Stefan diffusivity for ethanol water at \(40^{\circ} \mathrm{C}\) for ethanol mole fractions of \(0.0,0.2,0.3,0.4,0.7\), and 1.0 . The Fickian diffusivities are...
-
A crystal particle of pure \(\mathrm{NaCl}\) is dissolving in an aqueous liquid (water) solution at \(18^{\circ} \mathrm{C}\). The dissolution of the particle is controlled by mass transfer. The...
-
A \(2 \mathrm{~cm}\)-diameter, \(19 \mathrm{~cm}\)-long tube is placed touching a pool of liquid. The end away from the liquid pool \((\mathrm{z}=0.19 \mathrm{~m})\) is in an air stream (component C)...
Study smarter with the SolutionInn App