Describe purpose of the keyword super in programs

Assignment Help Software Engineering
Reference no: EM132756

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: EM132756

Questions Cloud

Explain most important aspect of project management : Explain most important aspect of project management.
What would be stakeholders in a project : What would be stakeholders in a project
Difference between private, public and protected variables : Difference between private, public and protected variables
Create a weather object using the no-argument constructor : Create a 'Weather' object using the no-argument constructor
Describe purpose of the keyword super in programs : Describe purpose of the keyword super in programs
Quality of work life : Explain the following non-financial motivators used by organisations to motivate their employees Quality of work life
What are the functions of an information systems : What is the difference between an information system and a strategic information system. What are the functions of an information systems.
Purpose the statement of activity for the society : Purpose the Statement of Activity for the Society
Calculate a sales mix variance and sales quantity variance : Calculating a sales mix variance and sales quantity variance

Reviews

Write a Review

Software Engineering Questions & Answers

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

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

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

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