Create a base class that contains all of the properties

Assignment Help Programming Languages
Reference no: EM13760171

Assignment 1

For this assignment, you will create a class to describe the product that is being ordered. You will then modify your code to create an instance of this class and utilize it in the ordering process.

Consider the properties or attributes and methods that are related to your product. Using a Unified Modeling Language (UML) class diagram, describe these properties and methods. Consider the properties or attributes that are related to your ordering system. Use a UML class diagram to describe the ordering system class. Be certain to include appropriate get- and set-methods for each of your class properties. Be certain that all of your class instance variables are declared private. All the methods should be declared public.

Create a Java class that implements your UML class diagram for your product. You may place this class in the current Java source file or you may create or add a new file to your project. Modify your existing code to make use of your product class by moving all appropriate variables and methods into the class. You will need to create an instance of your product class in your main method so that your program runs correctly. The execution (and screen captures) of your revised program should match those of the previous week.

New Content for Week 4

The Phase 4 Individual Project deliverables are as follows:

• Save the program code that you just developed and ran successfully in a .zip file that includes all of your Java project files.
• Update the Key Assignment title page with a new date and project name.
• Update your previously completed work based on your instructor's feedback.
• Perform a screen capture of each of the ordering system dialogs that display during execution just after you have entered the requested information. Place these screen captures in Week 4: Object-Oriented Techniques.
• Create UML class diagrams and update your use case diagrams where appropriate to reflect the new organization of your program. Place your revised diagrams in this Week's section in your revised document.
• Be sure to update your table of contents before submission.
• Name your revised document "yourname_IT110_IP4.doc."
• Create a .zip file containing your project document (including screen captures) and your Java source file(s) or Eclipse project. Name your .zip file "yourname_IT110_IP4.zip."

Assignment 2

Now that your ordering system is constructed in a truly object-oriented manner, you can take advantage of this organization. Consider another product that is similar to your existing product but that has one property or attribute that is somewhat different. As a concrete example, assume that your product has a size property and that the valid values for size are large, medium, and small. A slightly different product might use size values 10", 15", 20", and 25". These two products would have names: a string. However, the value in the name field would be different for these two different kinds of products. In particular, one is an int and the other is a string.

Complete the following:

• Create a base class (also called a superclass) that contains all of the properties that are common to both of these products. Create 2 derived classes (also called subclasses) that contain different kinds of sizes. If your product does not already have a name property, you will need to add one along with appropriate get- and set-methods.

• Modify your program so that at an appropriate point in the ordering process, the program requests the name or kind of product. At that point, the correct kind of product class needs to be instantiated. Polymorphism should ensure that the correct kind of size information or method is used.

• Modify your program so that it requests 3 products. Create an array of products and save all of the product instances in this array. You might want to think about how an indefinite number of product orders might be handled. However, do not implement this extension for this course.

• You will need to change how you handle file output or input. Instead of creating or writing a new file for each product, you need to create an empty file when the program starts. Each new product should then be added to the file. You no longer need to create the confirmation dialog based on data that are read back in after each individual product is ordered. Instead, you will confirm the entire 3-product order after all 3 product orders have been completed. This can be done by reading the order file and displaying or confirming the product orders one after another.

• You must revisit your UML diagrams one last time and revise them to represent the final online ordering system in structural diagrams (the class diagrams) and in a behavioral diagram (the use case diagram).

Reference no: EM13760171

Questions Cloud

Student lab activity : Given a set of program specifications for a simple business problem that requires the use of a collection of data to solve a business problem, code and test a program that implements arrays that meet the specifications and employ best programming ..
Elastic and inelastic regions of the demand curve : At what price is revenue maximized, and what is revenue at that point? Identify the elastic and inelastic regions of the demand curve.
Plan and implement an intervention with your aggregate : Select a theory or a model that will help you to plan and implement an intervention with your aggregate. Write a 350 to 700-word paper reviewing the selected theory or model.
Data set analysis : The research questions/hypotheses address the problem as detailed by the researcher
Create a base class that contains all of the properties : Create a base class (also called a superclass) that contains all of the properties that are common to both of these products. Create 2 derived classes (also called subclasses) that contain different kinds of sizes.
What is intermodulation distortion : What is intermodulation distortion? What sorts of signals are susceptible to this form of distortion?  In addition, identify two situations in which error-free transmission is crucial to business processes.
What is your perspective in kantianism and virtue ethics : What is your perspective in Kantianism, Act Utilitarianism, Rule Utilitarianism, Social Contract and Virtue Ethics. You should back this up with one of our Ethics theories
The beginning of the description of the function : From the same code you provided me with, can you complete the following: Use pseudocoding and (optionally) flowcharting to describe the flow of the main program. If there are functions that support the main flow describe separately in sub sections of..
Define organizational structure : The actual question: use coca cola company, suggest what you believe to be the structure of it in terms of the six key elements that are used to define organizational structure.

Reviews

Write a Review

Programming Languages Questions & Answers

  Produce a store procedure to accept parameters

Produce a store procedure named spBalanceRange which accepts three optional parameters. Procedure returns the result set consisting of VendorName,

  Create a script file that generates a row vector

Create a script file that generates a row vector of 10 random numbers from 5 to 15 - Call your function using your array of random numbers and the scalar value of 22.

  Write liberty basic to make payment of current balance

Makes a payment equal to 5 percent of current balance suppose the customer makes no new purchases. Must be written in Liberty Basic.

  Program to find area-length and width of a rectangular room

Program is supposed to ask user for length and width ofa rectangular room, and then display room's area. The program should multiply width by length in order to find the area. Find the error.

  How do you rotate say a vector

How do you rotate say a vector = [ 1 2 3 4 5]  to the right [5 1 2 3 4] and if done with the expression again it would result in [4 5 1 2 3].

  Computing average net profit per sale of product

Your company bought 250,000 online advertising impressions and made average net profit per sale of product of $5.

  Write a script that inputs a numeric check amount

Write a script that inputs a dollar amount to be printed on a check, then prints the amount in check protected format with leading asterisks if necessary. Assume that nine spaces are available for printing the amount.

  Examine the merits and demerits of using mobile computing

question 1 compare and contrast monitoring of patient vital signs using mobile computing technology to in-patient

  How long will it take the program to run

How long will it take the program to run with 1000 processors, if each processor is as fast as the single processor on which the serial program was run?

  Design and draw a ladder diagram circuit

Design and draw a ladder diagram circuit suitable for a PLC which will fulfil the following control requirement and explain briefly the technique of multiplexed switching of analogue signals

  Modify the inventory program by adding a button to the gui

modify the inventory program by adding a button to the gui that allows the user to move to the first item the previous

  Use one-dimensional array to solve problem

Use one-dimensional array to solve following problem. Read in 10 numbers, each of which is between 10 and 100 inclusive.

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