Java代写 | Programming Fundamentals COSC 2531

本次Java代写是开发一个仓库管理程序

Programming Fundamentals
COSC 2531

1. Overview
The objective of this assignment and progress checks is to develop your problem-solving skills gradually as you are
exposed to new constructs and paradigms throughout the semester. The short programming exercises which you are
required to demonstrate in the labs are designed to help you learn experientially, both algorithmic and object-oriented
concepts, and how they can be combined to solve simple problems. The first three progress submissions focus on
developing simple algorithmic skills using control structures and arrays while the remaining three progress submissions
require you to demonstrate your understanding of object-oriented concepts encapsulation, inheritance and
polymorphism. Another reason for having the progress marks (aligned to the teaching order) is to ensure you develop
the foundational skills in a timely manner. Programming concepts taught in the first few weeks have a high
interdependency between themselves and research has shown failing to grasp the initial foundational concepts can block
any further progress leading to poor learning outcomes.
The assignment to be submitted in week 12 requires you to demonstrate your ability to combine algorithmic and objectoriented skills you have developed throughout the semester. 6 out of 30 marks is allocated for quality related rubrics to
ensure that you follow good coding principles and practices and refactor your designs. Note you are also required to
include short reports reflecting your learning experience and comparing merits of procedural and object-oriented
paradigms for solving complex problems. If you run into problems, you must test and isolate the part leading to the
problem and post them via the relevant Canvas discussion board.

2. Learning Outcomes
This assessment relates to all of the learning outcomes of the course which are:
• Demonstrate knowledge of basic concepts, syntax and control structures in programming
• Devise solutions to simple computing problems under specific requirements
• Devise solutions to simple computing problems under specific requirements
• Encode the devised solutions into computer programs and test the programs on a computer
Section A: Progress Check 1 Week 3 ( 2 marks)
Problem Solving with variables and selection
Overview: This short exercise gets you to store product unit prices and customer discounts in a number of different
variables before computing the price for a specific purchase based on product, customer and quantity.
Aim: This section is designed to familiarize you with the use of variables, if statements and methods. It is hoped you will
realize the need for arrays as use of separate variables for related data is not scalable and very cumbersome.
You are required to complete the program below to compute the purchase cost for products taking into account product
unit cost, quantity-purchased and the discount offered to customers. Assume there are only three products, and only
two customers are offered discounts. The variables p1UP, p2UP and p3UP store the unit prices for the three variables
storing the product names in variables p1Name, p2Name and p3Name respectively. Similarly, the variables c1DRate,
c2DRate are used for the discount rates for the variables storing the customer names in c1Name and c2Name
respectively.
Note the variables declared outside methods can be accessed by all the methods. The method setProductData() prompts
the user to enter values for String variables p1Name, p2Name, p3Name and double variables p1UP, p2UP and p2UP.
Similarly, the method setCustomerData() prompts the user to enter values for String variables c1Name and c2Name and
double variables c1DRate and c2DRate. You are required to use the values stored in these variables and the values
supplied for the product being purchased, quantity purchased and the customer to compute the purchase cost in the
method computeCost(). If the product specified does not exist then an appropriate message should be displayed. If the
customer specified does not exist then the price will be computed without any discount.

Section B: Progress Check 2 Weeks 5 (2 marks)
Problem Solving with arrays, selection and repetition
Overview: This short exercise gets you to refactor the previous exercise by storing product unit prices and customer
discounts in arrays before computing the price for a specific purchase based on product, customer and quantity. The
program should ensure only existing customers can purchase existing products.
Aim: This section is designed to familiarize you with the declaration and use of arrays as well as input validation.
Description
In this part you are required to compute the purchase cost for a product as before but using product name, product unit
price, customer name and customer discount rate details stored in four different arrays. Note the arrays are created
dynamically based on the number of elements specified, before prompting and storing the values in the arrays.
You are required to complete the method computeCost() to compute the total cost taking into account product name,
quantity and customer name. You are also required to perform some input validation; if the specified product or customer
names does not exist, you should ask the user to reenter until valid names are entered.

Section C: Progress Check 3 Week 6 (10 marks)
Problem Solving involving Menus and Input Validation
Overview: This exercise requires to you to extend last exercise to track additional information related to products and
customers using arrays and provide a menu driven program.
Aim: This section is designed to familiarize yourself to the use of methods, arrays, control structures and simple
algorithms using a menu driven program.
Description
This exercise to be demonstrated requires you to extend the program to track the current balance of each customer and
the current stock level for the products. Customer can purchase only when they have adequate funds and the warehouse
has the required stock level. In the initial stage all the arrays should be initialized with customer specified values. Separate
menu options should be provided for purchasing, replenishing products, initializing and topping up customer balances.