Author Archives: graceliana@gmail.com

Chapter 5: Goodies Lesson 10

5.11 Student Presentation

Make a short video explaining your code and running the system for two business cycles.

Every partner has to talk about the code and become a shopper and/or business manager. 

Show all the functionalities your system has.

Show your UML class diagram.

Required Submission:

Either the file or a link to the file. If the link is from google drive, make sure that everyone with the link has access to it.

Chapter 5: Goodies Lesson 8

5.9 Final Implementation

  1. Submit a compressed project (the folder with all your files) to this post. Do not copy and paste your programs. Make sure your folder has the initials of the group members.
  2. Copy and paste the output from each of the following steps:

a. Start your application, copy and paste the output. The raw data file will be used here and only once: The Business’s first Operation ever. Subsequent starts of the application will not use this file.

b. Select the “Business” option and paste the output.

c. Select the “Inventory” option and paste the output.

d. Without restarting your program, go back to the main menu and select the “Shopper” option and paste the output.

e. Select the number for “Pop Corners” and buy 3 units. Paste the output.

f. Without restarting your program, go back to the main menu and select “Business” option and paste the output.

g. Select the “Inventory” option and paste the output.

h. Close your application and show any message it displays if you have one.

i. Start your application again and do parts “a” through “c” above.

j. Close your application and show any message it displays if you have one.

The raw data file is attached.

Raw data file format:

Drinks

Sunkist,45,16,1.25

Coke,45,18,1.25

Brisk,45,17,1.25

Gold Fish,45,18,0.75

Sprite,45,17,1.25

Water,45,22,1.00 …..

Snacks

Chips,45,25,0.75

Pop corn,45,22,0.75 …..

A sample session from previous years is attached. Keep in mind that it is only one sample. Yours might look different but the essence of the application should be pretty similar. Make sure you satisfy all requirements. You can add more features if you like it but the requirements must be met. The same goes for “documentation”.

Just like in the HugeInteger assignment: BE AWARE that

25% of the grade is based on documentation. Indicate with a comment the code that handles each operation and how it does it.

25% of the grade is based on thorough testing.

25% of the grade is based on well-organized and readable code

25% of the grade is based on the working code.

data.txt  Download data.txt

SessionSample.txt  Download SessionSample.txt

SessionSampleExplained.txt  Download SessionSampleExplained.txt

Chapter 5: Goodies Lesson 6

5.7 Final Implementation Draft

WARNING: the output might be too long to paste it on the  “text entry” tab  😕So, you need to copy and paste the output to a text file as you go through the session.

  1. Start with the original data.txt file. 😀
  2. Submit the text file from the output.

Follow these steps:

a. Start your application, copy and paste the output. The raw data will be used here and only once while the application is running: The Business’s first Operation. At the end of each business cycle, the data file should be updated so subsequent starts of the application will have the current state of the inventory.

b. Select the “Business” option and paste the output.

c. Select the “Inventory” option and paste the output.

d. Without restarting your program, go back to the main menu and select the “Shopper” option and paste the output. e. Shoppers activity:

Shopper 1 –Sunkist – 2 units –Coke — 3 units

Shopper 2 –Chips — 4 units –Oreo Cookies — 1 unit

Shopper 3 –Water — 2 units –Nutrigrain Bar — 3 units

Shopper 4 –Fruit Snack — 5 units

Copy and paste the output to the text file.

f. Without restarting your program, go back to the main menu and select “Business” option (copy and paste the output).

g. Select the “Inventory” option (copy and paste the output).

h. Close your application and show the end of the business message (copy and paste the output).

i. Start your application again and do parts “a” through “c” above (copy and paste the output).

j. Close your application and show the end of the business message (copy and paste the output).

data.txt  Download data.txtdata.txt  Download data.txt 

Chapter 5: Goodies Lesson 5

Website (Links to an external site.)

Reading from the data file can be part of the Final Implementation. At this stage, it is more important that you implement the Business aspect of the application.

a. Start your application by reading the raw data from the data.txt file to the content array.

b. Display the raw data line by line.

c. Display the content of the array in well-aligned rows and columns 

Chips               45   25   0.75

Popcorn          45   22   0.75

Pop Corners    45   22   0.75

…

The data in this file is as follows:
The name of the item, the available quantity, the cost per case of 45, and the sale price of the item.

d. Select the “Business” 

e. Select the “Inventory” 

data.txt  Download data.txt 

Required Submission

Copy and paste the terminal activity including the display of the raw data and array content in the Text Entry. A grade of zero will be given if this item is not in the Text Entry tab.

  • Include documentation in any file you create.
  • Your files do not need to have your initials. Only the zip file requires the name of the project with your initials.
  • Your static main method can not be a method in the ADT. You need to create a tester/driver class.

Header:

  • Assignment description ( you can copy and paste the assignment itself)
  • All authors’ names and the business name.
  • Language and version
  • Date of completion

Help with formatting printing:

printfexample.png
printftable.png

If you have to print multiple fields, here is an example:

System.out.printf(“%8.3f%10s”, Math.PI,”Hello”);

Output:

   3.142     Hello 

Chapter 5: Goodies Lesson 4

5.5 First Implementation Draft

First Shopper’s experience

At this stage, your application should be able to have

1. A menu for the customer.

2. The customer selects the following products and your application should display information relevant to the purchase and the interaction with the shopper.

          Shopper 1 –Sunkist – 2 units –Coke — 3 units

3. After the purchase is done, it prints messages related to what is updated in the background/backend. These are only messages and I am not expecting the updates to take place yet. 

Assumptions:

The product structure(s) for your application is fully loaded from the raw data file (use this data in your application):

Chips,45,25,0.75
Pop corn,45,22,0.75
Pop Corners,45,22,0.75
Cheeze it,45,18,0.75
Gold Fish,45,18,0.75
Oreo Cookies,45,30,0.75
Fruit Snack,45,15,0.25
Trail Mix,45,22,0.50
Nutrigrain,45,31,0.50
Peanut Bar,45,16,0.50
Coke,45,18,1.25
Sprite,45,17,1.25
Sunkist,45,16,1.25
Brisk,45,17,1.25
Ginger Ale,45,21,1.25
Water,45,22,1.00
Capri Sun,45,15,0.75
Ice cream,45,20,1.00
Klondike Bars,45,15,1.25
Italian Ice,45,10,1.25
Ice pop,45,16,0.25

data.txt  Download data.txt 

Reading and writing files code, at the end of this website (Links to an external site.)

Required Submission

  1. Copy and paste the terminal activity, that should include the shopper experience and the messages for the updates in the Text Entry
  2. Zip/compress your project with your business name. Submit the (zipped/compressed) file.
  3. Instructions on how to run your application.
  4. If your project is on github.com, copy/paste the link here. You have the option to upload the screenshot(s) in your github.com repository.
  • Include documentation in any file you create.
  • Your files do not need to have your initials. Only the zip file requires the name of the project with your initials.
  • Your static main method can be a method in the ADT. Otherwise, you need to create a tester/driver class.

Header:

  • Assignment description ( you can copy and paste the assignment itself)
  • All authors’ names and the business name.
  • Language and version
  • Date of completion

Testing:

Your testing must be thorough. This means that you need to test all possible scenarios that would execute every line of code.

Chapter 5: Goodies Lesson 3

5.4 A Day’s Activity

The application starts.

The raw data file will be used here and only once: The Business’s first Operation ever. Subsequent starts of the application will not need to use this file.

These are activities that might take place on a given day:

a. “Business” is selected.

b. “Inventory” is selected. 

c. Without restarting the application, it goes back to the main menu.

d. “Shopper” is selected:

Shopper 1 –Sunkist – 2 units –Coke — 3 units

Shopper 2 –Chips — 4 units –Cookies — 1 unit

Shopper 3 –Water — 2 units –Veggie-Sticks — 3 units

Shopper 4 –Fruit Snack — 5 units

e. Without restarting the application, it goes back to the main menu and the “Business” option is selected.

f. Business manager ends the business cycle and your application writes back to the database the current state of the vending machine.

g. Next business cycle starts and the business manager checks the inventory reflects the current state of the vending machine.

NOTHING TO SUBMIT.

Chapter 5: Goodies Lesson 2

5.3 The Goodies Co. – Phase 2


Website (Links to an external site.)

Reminders:
1. Absolutely NO CODE
2. Methods description is important
3. This is an abstraction. Only related details are considered.
4. Be clear to distinguish the class(es) from the methods.
5. Be clear to distinguish the responsibilities between the methods and the class(es).
6. Include images if they are needed in your narrative about the public interface

Warning: purchasing snacks and drinks doesn’t need to behave like a vending machine. It is a better experience for the buyer to purchase multiple products and then pay the total amount. Look at the example on the website.

Classwork/Homework:
1. Use your homework as a guide to define the signature of every class’s method.
2. Draw a UML class diagram for your entire application. Make sure you follow the rules for UML.

NOTE:Each group member must turn in the same UML as well as the same document with the “Feedback” from the previous 2 assignments. You are working as a business and as such, you can only submit ONE preliminary development that represents your COMBINED work.

Class Digram phase 2-2.png
UMLBasics arrows.png

Chapter 5: Goodies Lesson 1

5.2 The Goodies Co. – Phase 1

Phase 1: Understanding the business operations 

A computer-based system is to be implemented for a vending machine company, Goodies Co. Work with your partner. Your partner’s name must be included in your submission.

In this first part of the project, you will be having an imaginary interview with the owner of the Goodies Co. To prepare for the interview

1st. Assuming the Goodies Co. sells snacks and drinks, create a document with a list of questions for your “client” to help outline the initial draft for the different classes.

2nd. After interviewing Mrs. Goody and you fully understanding how her business operates include the answers in the document you previously created.

NOTE: you may ask me questions about the Goodies business.

Submit the document with the questions and answers. Make sure your partner’s name is included.

Website with example