Using Java and the concepts covered in the reading, implement your class diagram. Your application will use the Accounts inheritance hierarchy designed in the Discussion Board. There are three types of sales accounts that track sales for your company: supplies, services, and paper. Create a test class that tests each subclass's constructor and display each instance created. Override the toString() method so that your object data is printed.
Select a name for your company and start a design document. You will add to this document as you move through this course, which will culminate into the Final Key Assignment. For now, include your UML class diagram and verbiage that explains your design.
Modify your implemented classes to include the overridden method, computeSales(), that computes the current sales in each of the following categories:
Intermediate-level Java programming should be demonstrated in your application:
Modify your Account superclass so that it is abstract and contains the abstract method, computeSales(). If you added default behavior in the earlier task for computeSales(), remove this default behavior.
Leave your implementation of computeSales() in the subclasses as:
Intermediate-level Java programming should be demonstrated in your application:
It is time to complete your sales tracker application. Your marketing department would like the current dollar amount of goods sold this year to be calculated. Total of the goods sold is the combined total of supplies, services, and paper sold, for all sales accounts. This information will be used to promote the success of the company.
Your application needs to be modified to allow all sales personnel to enter their sales data.
For each sales personnel in the company, complete the following:
Your application will use the Accounts inheritance hierarchy designed previously to compute the total of goods sold.
There are three types of sales accounts that track sales for your company:
Each has their own formula for computing the current sales:
Intermediate-level Java programming should be demonstrated in your application:
Preparation for what will be submitted in Discussion Board - Key Assignment Draft:
Update your design document with any final changes. Your design document must include at a minimum:
Your company is ready to market their ability to sell goods. You will need to create a graphic that includes a business logo and a dollar amount of current sales. Your logo must include at least 1 shape, defined by a geometric path, using class GeneralPath, and the name of your business. Although the logo may be a compilation of shapes, including basic shapes provided by the Graphics class (i.e., rectangle, polygon, oval, arc or line), the logo must contain at least 1 shape that is not a basic shape and the name of the business. You want to impress your customers; therefore, your logo will flash on and off at a smooth rate, like a neon sign.
Current dollars in goods sold this year should also be displayed in the graphic. Your application will use the Accounts inheritance hierarchy designed previously to compute the total of goods sold. There are 3 types of sales accounts that track sales for your company: supplies, services, and paper.
Each sales account has its own formula for computing the current sales:
Intermediate-level Java programming should be demonstrated in your application:
It is important to keep the design document up-to-date. Please add the pseudocode developed for the drawing of the logo in the Phase 5 Discussion Board to your design document.
The second part of the key assignment is a competency test that will test you on UML; inheritance and polymorphism; Java API class libraries; Java 2-D graphics with Java API methods, properties, and events; and debugging tools. Answer each question True or False.
1.Java supports multiple inheritance.
2.To say that class B extends from class A is to say that class B inherits from class A.
3.Inheritance, in UML 2.0, is denoted by a solid line drawn from the child class with a closed, unfilled arrowhead pointing to the super class.
4.In the NetBeans debugger, you can set a breakpoint on any line number including comments and nonexecutable statements.
5.To observe how variables change as a program executes, you would watch the call stack using the NetBeans debugger.
6.The step-over command in NetBeans allows you to skip a line in the program from being executed.
7.The GeneralPath class is in the java.awt.geom package.
8.The Font and Color classes are in the java.awt package.
9.Programming to an interface is another term for programming to an implementation.
10.A Concrete class has at least one abstract method.
11.An Interface contains no method implementations.
12.A benefit of inheritance is code reusability.
13.Overridden methods are a form of polymorphism.
14.Overriding the toString() method facilitates printing the current state of an object.
15.Overridden methods cannot have the same name and same signature.
16.A call to the superclass's constructor, super(), has to be the first line in a subclass's constructor.
17.In Inheritance, the more general class is the subclass and the more specialized class is the superclass.
18.All classes extend from class Object.
19.You can instantiate an abstract class as long as you have declared all methods as final.
20.Polymorphism is used to make programs easily extensible.