Question 11a write the class ingredient to contain the

Assignment Help Software Engineering
Reference no: EM13348809

Question 1

1.(a) Write the class 'Ingredient' to contain the following:-

(i) Integer variable: ingredient_id
(ii) String variables: ingredient_name, type
(iii) double-precision variable: quantity
(iv) Set methodfor each of the variables
(v) Get method for each variable

(b) Write the class 'Vegetable' to contain following-

(i) Integer variable: vegetable_id
(ii) String variable: vegetable_name
(iii) double-precision variable: cost
(iv) Set method for each data member
(v) Get method for each data member

(c) Write the class 'Recipe' to include the following-

(i) Integer variable: recipe_id
(ii) String variables: recipe_name, preparation_procedure
(iii) double-precision variable: preparation_time
(iv) An object of type Ingredient
(v) An object of type Vegetable
(vi) set method for the data members- recipe_id, recipe_name, preparation_procedure and preparation_time
(vii) Get methods for the variables- recipe_id, recipe_name, preparation_procedure an preparation_time

(d) Write the class 'CookMeal' to perform the following-

(i) Generate an object of type 'Recipe'
(ii) Request user to enter value for each data member of 'Recipe' using the input dialog of JOptionPane.
(iii) Enter values for each data member of 'Ingredient' object contained in 'Recipe'
(iv) Enter values for each variable of 'Vegetable' object contained in 'Recipe'
(v) Show the values using the message dialog of JOptionPane

Question 2

(a) Make different between following Object-Oriented concepts using suitable examples-

(i) no-argument constructor v/s overloaded constructor
(ii) Public v/s private
(iii) Concrete class v/s abstract class
(iv) Single inheritance v/s multiple inheritance
(v) subclassing v/s polymorphism
(vi) Encapsulation v/s abstraction

(b)(i) describe purpose of the keyword 'super' in programs.
(ii) Describe how it is used in object-oriented programs using appropriate examples.

Reference no: EM13348809

Questions Cloud

Question 1project management is considered to be a process : question 1project management is considered to be a process and there are four key elements of process namely-1.
Question 1in view of growing number of deaths on the road : question 1in view of growing number of deaths on the road the police department plans to introduce more speeding
Question 1 a inscribe detailed notes related to : question 1 a inscribe detailed notes related to object-oriented concepts on the following-i class and object
Question 1a write class weather to contain the following-i : question 1a write class weather to contain the following-i data members- humidity airpressure atmospherictemperature
Question 11a write the class ingredient to contain the : question 11.a write the class ingredient to contain the following-i integer variable ingredientid ii string variables
Question 1read the excerpt attached carefully and answer : question 1read the excerpt attached carefully and answer the following questions-ai two roles of hrm namely i boosting
Question 11a you are about to undertake the development of : question 11a you are about to undertake the development of a system for a small businesswhich system development life
Question selected accounts of the weinstein musical society : question selected accounts of the weinstein musical society a nongovernment not-for-profit organization for the year
Question 50the phipps company produces and sells over 100 : question 50the phipps company produces and sells over 100 different products. for the past year the master budget

Reviews

Write a Review

Software Engineering Questions & Answers

  Create flow chart which gets customer account data

Create the flow chart which gets customer account data which comprises the account number, customer name, and balance due.

  Design of the software

Report of the software design and implement the software as per the design, and demonstrate it

  Creating a modularized body mass index program

Create a modularized Body Mass Index (BMI) Program which will compute the BMI of a team player.

  Which is the summation of all the given numbers

Suppose you have a procedure that can partition a set of positive integers into two equal weight subsets. How could you use this procedure to solve the subset-sum problem?

  Explain commercial applications development

Eight clubs compete in a tenpin bowling competition. There are ten frames (sets of pins) and two balls are available if required by each competitor in each frame to knock down all pins. A "strike" is when all pins are knocked down with the first b..

  What is the standard error

If you have five critical errors, two main faults, and five minor errors, what is the standard error

  Explain the following command lines

For example, sed 's/fox/ox/g' file will replace all occurance of fox with ox and not the just the first one in file.

  Create the entity relationship diagram for hospital

Create the Entity Relationship Diagram(ERD) for following hospital scenario. For Patient entity illustrates its attributes. Highlight key attribute in red.

  Develop flowchart to prompt user to enter sales tax rate

Develop pseudocode and flowchart for program which does the following: Prompt user to enter sales tax rate. Prompt user to enter a price.

  Creating an ipo chart for programming problem

A contractor requires a program that computes and shows the volume of a rectangular pool of constant depth. Complete an IPO chart for this problem.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Formal software development approaches

An aspect of the preferred procedure for almost all formal software development approaches is to do some design before coding.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd