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

  Program to displays the sum of the integer numeric values

Design a program that displays the sum of the integer numeric values stored in two arrays, in a tabular format. The design defines two arrays of the same size (each array has 10 elements).

  Develop a program to determine the final scores

In this project, you will develop a program to determine the final scores, letter grades, and rankings of all students in a course. All records of the course will be stored in an input file, and a record of each student will include the first name..

  Write program that takes input arithmetic expression

Write a program that takes as input an arithmetic expression. The program outputs whether the expression contains matching grouping symbols.

  Imagine you are a marketing consultant brought in to help a

imagine you are a marketing consultant brought in to help a company who has a product that is so successful they cannot

  Write a program to calculate the volume flow rate

Write a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second.

  Write a c# application that generates a 3-digit random no

Every 10th number you should display a String consisting of a any phrase of your choice concatenated with the current random number.

  Define the primary keys and foreign keys for tables

Define the following primary keys and foreign keys for these two tables. Use multiple DDL statements for this

  Write a procedure make-accumulator

Write a procedure (make-queue) that produces independent first-in-first-out queue objects, using a message-passing style.

  Write program which will accept list of student-s name

Write a program which will accepts list of student's name, individual scores for quiz1, quiz2 and quiz3. Your program must then compute for average of 3 quizzes.

  Write program which reads in weight in pounds and ounces

Write the program which reads in the weight in pounds and ounces and putputs equivalent weight in kilograms and grams. Utilize at least three functions.

  Calculate the total cost with a function procedure

The program should request the quantity of each item ordered in a Sub procedure, calculate the total cost with a Function procedure, and use a Sub procedure to display an itemized bill.

  Write program to open file for reading

Write the program to open file for reading which has twenty (20) rows and in each row there are three (3) columns. After reading each row call user-defined function to display each row.

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