Java inter week 5

Question

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:

  • Supplies = office supplies sold dollar amount + books sold dollar amount + apparel sold dollar amount
  • Services = number of hours * rate per hour
  • Paper = number of pounds * price per pound

Intermediate-level Java programming should be demonstrated in your application:

  • There should be implemented constructors for each class.
  • The toString() method should be overridden to provide readable string representation of each object.
  • Getters and setters need to be implemented to enforce data hiding.
  • Code should be fully commented.
  • Program flow should be logical.
  • Behavior should be encapsulated into methods avoiding all encompassing large main() methods.
  • Projects should be developed in NetBeans and zipped prior to submission.
  • Code should compile and run free of exceptions, indicating that debugging tools were used to eliminate any run time errors.

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.

Submit:

  • Zipped NetBeans project

Competency Test

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. If you do not pass this competency exam, you will not be able to proceed to the second Java course in this series, IT252. 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 superclasss constructor, super(), has to be the first line in a subclasss 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.
Details
Purchase An Answer Below

Have a similar question?