Create an object-oriented application to handle inventory

Assignment Help Programming Languages
Reference no: EM13968906

Question 1

Based on the data definition class identified below, which of the following statements shows the correct way to represent the instance variable, name, within a UML class diagram?

(+) String : name
(+) name : String

None of the other answers are correct.

(-) String : name
(-) name : String

Question 2

Using the data definition class and implementation class identified below, assume the following code is added after Line 5 in the implementation class:

JOptionPane.showMessageDialog(null, aTextbook.wholesaleCost);

Based on the addition of this line of code, which of the following will occur when attempting to compile and run the code?

The code will compile, but cause a runtime error because the value of the wholesaleCost attribute has not been set.

None of the other answers are correct.

The code will compile and output 0.0.

The code will fail to compile.

The code will compile, but cause a logic error when running it because the value of the wholesaleCost attribute has not been set.

Question 3

Based on the data definition class and implementation class identified below, which of the following statements is legal/allowed to be added into implementation class after Line 5?

double cost = purchaseCost();
JOptionPane.showMessageDialog(null, "The textbook name is: " + name);
aTextbook.setName("Big Java");
aTextbook.name = "Big Java";
None of the other answers are correct.

Based on the data definition class identified below, which of the following statements shows the correct way to represent the method signature for setWholesaleCost within a UML class diagram?

(-) setWholesaleCost (boolean) : wholesaleCost : double
(+) setWholesaleCost (wholesaleCost : double)

None of the other answers are correct.

(+) setWholesaleCost (boolean) wholesaleCost : double
(-) setWholesaleCost (wholesaleCost : double) : boolean

Question 5

Working at the GMU Used Car Dealership, you need to create an object-oriented application to handle inventory. To start, you create a detailed UML diagram that helps to plan your solution. Based on the detailed UML diagram below, translate the class definition into a .java file, making sure it compiles.

You do not need to create an implementation class.

Your code must compile using the jGrasp IDE. If your code does not compile using jGrasp (for any reason), a grade of 0 will be earned. No exceptions!

Reference no: EM13968906

Questions Cloud

Develop a java application to calculate the monthly paycheck : Develop a Java application to calculate the monthly paychecks for a number of different types of employees. The employee types are created in a subclass array based on parent base class Employee. Does this ring a bell?
Compare circuit and packet-switched networks. : Provide examples of what currently available systems can be enhanced and where additional opportunities exist.
How a lot of employees cheat a little at work : How a Lot of Employees Cheat a Little at Work. Take your inspiration from Dan Ariely's Ted Talk, "Our Buggy Moral Code" and concepts from Chapters 1-4 to create a Slideshare about unethical workplace behavior. You may focus on one or several uneth..
Name two of the computer components and their functions : Use two resources (Wikipedia sources are not permitted) and list each resource used at the end of paper in the reference list section.
Create an object-oriented application to handle inventory : Working at the GMU Used Car Dealership, you need to create an object-oriented application to handle inventory. To start, you create a detailed UML diagram that helps to plan your solution.
Design a gui class that should be hand-coded : The program should consist of three classes. The first class should define the GUI and should be hand-coded and not generated by a GUI generator.
How does policy impact the discussion to disclose a breach : What does the current law say about companies having to release information / statements on a security breach?
Describe some important sources of conflict : In an essay, describe some important sources of conflict and the effects they can have on team performance. Then explain what you would do as a team leader to manage conflict in order to help your team achieve its goals
Problem regarding the negative exponential distribution : Suppose that the life expectancy X of each member of a certain group of people is an r.v. having the Negative Exponential distribution with parameter l = 1/50 (years). For an individual from the group in question, compute the probability that

Reviews

Write a Review

Programming Languages Questions & Answers

  Progarm to calculate unit price for products sold

Manager of Super Supermarket would like to be able to calculate unit price for products sold there. To do this, program must input name and price of the item and its weight in pounds and ounces.

  Sql statement that displays the isbn-title and profit

Provide a SQL statement that displays the ISBN, TITLE and PROFIT for all books where the COST is greater than or equal to $10.00 and less than or equal to $40.00. (The PROFIT is the difference between RETAIL and COST.) Include only those books tha..

  Explain about lexical analyzer

Explain about Lexical Analyzer

  Create the calculate and exit buttons on the form

Make sure the application accepts and calculates decimal values

  Program calculate average number of days employee are absent

Write a program that calculates the average number of days a company's employees are absent. The program should have the following functions: a function called main that asks the user for the number of employees.

  Program to read from an input file

Write a program to read from an input file for 15 students, that contains each individual student ID, the course code, letter grade, and credit hours for five courses.

  Create program which calculate distance travelled by boat

Create a program which calculate distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river.

  Write program to bounce blue ball inside jpanel

Write a program which bounces the blue ball inside JPanel. Ball must begin moving with the mousePressed event. When ball hits edge of JPanel, it must bounce off edge.

  What is well-formedness and validity in the context of xml?

What is well-formedness and validity in the context of XML?

  Matlab integration techniques

Use MATLAB integration techniques to determine the total Axial Elongation and explain the theory of Simpson 1/3 rule for integration in detail. Use appropriate examples to demonstrate how it works and how the integration result is computed.

  Implement a program that prompts the user for an integer

Implement a program that prompts the user for an integer n and prints the nth Fibonacci number, using the above algorithm.

  Write program to reads student-s name with test scores

Write down a program which reads student's name together with his or her test scores. Program must calculate the average test score for each student and allot the suitable grade.

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