Requirements For Individual Project 4

Here Below Are The Requirement Task Of Individual Project 4 And Indivi

This document presents the detailed requirements for Individual Projects 4 and 5, focusing on creating a Java application that manages product data, computes sales and shipping information, and provides a user-friendly interface with validated input. The projects involve class design, method implementation with sentinel-controlled loops, data validation, formatted output, and conducting a comprehensive design document with UML diagrams and pseudocode. Specific emphasis is placed on using NetBeans for development, ensuring the code is testable, and including screenshots for validation.

Paper For Above instruction

The development of Java applications that effectively manage product data is fundamental in creating comprehensive business management tools. These projects require a structured approach, combining class design, method implementation, and user interface development, to meet functional and technical specifications.

Designing the Product Class

The core of both projects is a 'Product' class representing individual items sold by the company. This class must include at least three private attributes, such as product ID, name, and price, with appropriate data types for encapsulation. Getters and setters are essential for accessing and modifying these attributes while maintaining data hiding principles. Furthermore, constructors—both default and parameterized—must be implemented for flexible object instantiation based on validated user inputs.

Implementing Methods for Sales and Shipping Computation

The 'computeAverageSales()' method should employ sentinel-controlled loops to facilitate multiple sales inputs until the user indicates completion. These inputs will be processed to compute an average sales value, returning a double. If the average exceeds $200.00, an alert message should notify the user of significant revenue generation. Similarly, the 'computeShippingCharges()' method utilizes sentinel-controlled repetition for accumulating shipping charges entered by the user, also returning a double value.

User Interface and Data Validation

The application must feature a user-friendly console interface, implemented with Scanner for input collection. It should prompt the user to input data for at least two product instances, with validation mechanisms to ensure data integrity. For example, if an invalid price or product ID is entered, the program should prompt re-entry until valid data is provided. Data validation extends to ensuring numeric inputs are within logical bounds, enhancing robustness.

After data entry, the application displays the product information with proper formatting, headers, and labels for clarity. The program then allows the user to invoke the 'computeAverageSales()' and 'computeShippingCharges()' methods, with outputs displayed in well-formatted manner using printf and println statements. This ensures readability and a professional appearance across the application's output.

Enhancing the Application with Sentinel-Controlled Loops

Sentinel-controlled loops are critical in allowing users to input multiple data entries—sales and shipping charges—until they decide to stop. Inside these loops, the program validates each input before processing to prevent errors and provide re-entry opportunities. For instance, if a non-numeric or negative value is entered where a positive number is expected, the program must reject and prompt again. These loops facilitate dynamic interaction, making the program scalable and user-centric.

Design Document and UML Class Diagram

Consolidating the pseudocode from earlier development phases, the design document encompasses a clear class diagram illustrating the 'Product' class with its attributes, getters, setters, constructors, and methods. Pseudocode for key methods should outline logical flow, error handling, and loop structures. The document should also include these diagrams and pseudocode, serving as a blueprint for implementation and future reference.

This document must be comprehensive, well-organized, and ready for peer review via the Week 4 Discussion Board. It should demonstrate thoughtful design considering both functional requirements and technical constraints, aligning with principles covered in the course.

Development Using NetBeans and Testing

The entire application should be developed within NetBeans IDE, ensuring compatibility and ease of testing. The source files must be executable, and once compiled, the program should operate as intended—accepting user data, validating inputs, calculating averages, accumulating shipping charges, and displaying formatted output. Developers should take screenshots capturing sample runs, including various test data entries and resulting outputs, then document these with descriptive captions to illustrate functionality and correctness.

Individual Project 5 - Extension and Enhancement

Building upon the previously developed product class and application, Project 5 focuses on comprehensive display of product data. The application must allow input for multiple products, validate data, and then display product information in a formatted and labeled presentation. Users should be able to compute average sales and shipping charges per product, with the application calling respective methods from the product class.

The interface should be intuitive, allowing multiple data entries with sentinel-controlled loops, and display outputs neatly formatted with printf and println. The design must include the UML class diagram and pseudocode for the main application and class methods, showcasing the logical flow and data validation strategies.

Documentation must include sample screenshots demonstrating successful operation, including input data, format of displayed data, and computed results, with captions explaining each step.

Summary

Both projects demand robust class design, input validation, sentinel-controlled data collection, formatted output, and comprehensive documentation. Development within NetBeans ensures a professional environment, and the inclusion of screenshots validates functionality. These projects collectively enhance understanding of Java object-oriented programming, control structures, data validation, and application design principles vital for software development.

References

  • Deitel, P. J., & Deitel, H. M. (2017). Java How to Program (10th Edition). Pearson.
  • Gaddis, T. (2018). Starting Out with Java: From Control Structures through Data Structures. Pearson.
  • Ling, K. (2020). Object-Oriented Programming in Java. O'Reilly Media.
  • Harvey, P. (2019). Java Programming for Beginners. Packt Publishing.
  • Griffiths, M. (2021). Java Fundamentals. Manning Publications.
  • Java Documentation. (2023). Oracle. https://docs.oracle.com/javase/8/docs/api/
  • Tanenbaum, A. S., & Wetherall, D. J. (2011). Computer Networks (5th Edition). Pearson.
  • Schneier, B. (2015). Applied Cryptography. Wiley.
  • Chen, M. (2019). Developing GUI Applications in Java. Springer.
  • OOP Concepts. (2022). Journal of Computing. https://journalofcomputing.org/oop-concepts