Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Step 1

Create a ManufacturedProduct class. The ManufacturedProduct class is a simplified representation of a product that is being built on an assembly line.

The data in a ManufacturedProduct object are as follows:

A private integer instance variable called productId.

A private boolean instance variable called passedInspection.

The ManufacturedProduct class should have the following additional members:

A constructor that sets the productId value. Allow the inspection variable to have a default value of your choice.

A get method for the productId value. No set method should be provided. The only way to assign the productId is with the constructor.

A toString() method that returns a String that is a report on the data in a ManufacturedProduct object.

ALSO...

Remember that the AssemblyLine array (see below) represents an actual assembly line. After a ManufacturedProduct object is finally returned by the insert method, it should be inspected to see if it has been correctly assembled.

So also give the ManufacturedProduct class a public inspection method. All it should do is generate a random number in the range zero to nineteen. If a zero is generated, set the passedInspection variable to false. Otherwise, set it to true.

Step 2

Create an AssemblyLine class. An assembly line is, of course, a good real-world representation of a queue.

The AssemblyLine class has an encapsulated ManufacturedProduct array with five elements. Each element represents a position on an actual assembly line.

Give the AssemblyLine class a public insert method that adds a ManufacturedProduct object to element zero the ManufacturedProduct array. If any objects are already in the array, shift all of them one element 'up' the ManufacturedProduct array.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93124564

Have any Question?


Related Questions in Computer Engineering

Describe 2 variables a government will look at to predict

Describe 2 variables a government will look at to predict where the economy will be in the next six months.

Maureen has preferences for two goods to be consistent with

Maureen has preferences for two goods to be consistent with the utility function. The price of good 1 is $4 each, and the price of good 2 is $12 each. For what incomes will good 1 be normal?

Scruffie the cat has 15 to spend each month on cat toys

Scruffie the cat has $15 to spend each month on cat toys, which cost $3 each, and cat treats, which cost $1.50 each. Draw a budget line to show the combination of each good that scuffie can afford if she spends her entir ...

Question 1 designing team and team identityusing the

Question: 1. Designing Team and Team Identity. Using the Internet, team should read at least 5 academically reviewed articles on designing. 2. Please do not change the wording of the original summary. Include the team me ...

Bond a is a 1-year zero-coupon bond bond b is a 2-year

Bond A is a 1-year zero-coupon bond. Bond B is a 2-year zero-coupon bond. Bond C is a 2-year 10% coupon bond that pays annually. The yield to maturity (annually compounded) on bond A is 10%, and the price of bond B is $8 ...

You are the senior information security manager for a

You are the senior information security manager for a federal agency. You received a phone call from an employee stating that his laptop was stolen from his workstation. He tells you that the laptop has at least 20 cases ...

Suppose you bought a five-year zero-coupon treasury bond

Suppose you bought a five-year zero-coupon Treasury bond with $ 1000 face value for $800. Answer the following questions: (a) What is the yield to maturity on the bond? (b) Assume the yield to maturity on comparable bond ...

Question suppose we carry out a binary search of an ordered

Question : Suppose we carry out a binary search of an ordered list of 63 items: We are searching for an item X which occurs exactly once in the list. How many comparisons are carried out i. in the worst case scenario ii. ...

Suppose you want to back up a huge file to a cd-r you can

Suppose you want to back up a huge file to a CD-R. You can do this by splitting the file into smaller pieces and backup up those pieces separately. Write a utility program named FileSplitter that splits a large file into ...

What are some examples of when a data compression utility

What are some examples of when a data compression utility can be used for information stored on a computer's hard drive?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As