CST8116-Exercise 3( yuvraj singh )
.docx
keyboard_arrow_up
School
Algonquin College *
*We aren’t endorsed by this school
Course
8116
Subject
Computer Science
Date
Feb 20, 2024
Type
docx
Pages
6
Uploaded by ColonelYakMaster1015
CST8116 Introduction to Computer Programming
Lab Exercise 03 Sample Solution (21S)
Assessment: Exercise 03
Student Name: Yuvraj singh Lab Professor Name: Jinal Jadav
Lab Section Number: 3
Due Date: Part 1
Understand the problem:
1) I need to create a program for a startup company that be used to compare the
Price of grocery items across the different grocery Stores, and they want to track grocery items, Stores and Price of the items.
2) For this program, I would need to use Constructors, Accessors(getter) and Mutators(setter).
3) I would need to generate a report showing the grocery item, Store and Price separated by commas.
4) UML class diagram :-
LAB3 - Name: String
-Store: String
-Price: double
+ Lab3(Name: String, Store: String, Price: double)
+ getName( ): String
+ getStore( ): String
+ getPrice( ): double
+ setName( Name: String): void
+ setStore( Store: String): void
+ setPrice( Price: double): void
+ generateReport(): String
+ main(args: String[]): void
Part 2
• A) Pseudocode.
class Lab3
//Declaring variables
string Name;
String Store; double Price;
//Constructor Function lab3 (Name,Store,price):
This.Name = Name
This.Store = Store
This.Price = Price
// Accessors function getName():
return Name
function getStore():
return Store
function getPrice():
return Price
//Mutators
function setName(Name):
this.Name = Name
function setStore(Store):
this.Store= Store
function setPrice(Price):
this.Price=Price
// Method to generate report
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Q3:Your company has just acquired a smaller company that sells office automation software. The smaller company's spreadsheet software has a large market share, with many satisfied users (the major reason for the acquisition was that these existing users are potential customers for your company's other products). Unfortunately, no documentation for the spreadsheet software can be found, and the source code is not commented. How would you go about maintaining this software to keep the customers happy?
arrow_forward
TOPIC: Football League Management System
DESCRIPTION: Write a python solution that can be used to
manage a Football League
Your system should, among many other features, be able to
and/ or have and/ or apply:
· Register teams to league
Capture venues (stadiums)
Prepare fixtures (home and away)
· Cater for clubs sharing stadiums
Capture results
· Produce log table at any stage (table sorted from team
with most points down to team with least points)
Log table rules 3 points for a win, 1 point for a draw, 0
point for a loss
arrow_forward
Python please
arrow_forward
Please answer #3
arrow_forward
Computer Science: Describe some data scrubbing tools and find the tool which is suitable for the given insurance company.
arrow_forward
Please answer #1
arrow_forward
10
arrow_forward
Read the interactive session and discuss the following questions below.
Source: 5-A U.S. ARMY AND MARINE CORPS BATTLEFIELD LOGISTICS by Alan Dennis.
Shortly after the Gulf War in 1991 (Desert Storm), the U.S. Department of Defense realized that there were significant problems in its battlefield logistics systems that provided supplies to the troops at the division level and below. During the Gulf War, it had proved difficult for army and marine units fighting together to share supplies back and forth because their logistics computer systems would not easily communicate. The goal of the new system was to combine the army and marine corps logistics systems into one system to enable units to share supplies under battlefield conditions.The army and marines built separate as-is process models of their existing logistics systems that had 165 processes for the army system and 76 processes for the marines. Both process models were developed over a 3-month time period and cost several million…
arrow_forward
Computer Science
Using a set of spotify data, where there is different singers, songs, liveness, danceability, etc, how would you pull out one specific artist to make another playlist on Spotify? Please show an example using python.
Using the same data from above how would you make a plot for liveness and danceability? Please show an example using python.
arrow_forward
Note: Write a C Language program:
arrow_forward
Review:
PVF manufactures high-quality wood furniture and distributes it to retail stores throughout the United States. Its product lines include dinette sets, stereo cabinets, wall units, living room furniture, and bedroom furniture. In the early 1990s, PVF’s founder, Alex Schuster, started to make and sell custom furniture in his garage. Alex managed invoices and kept track of customers by using file folders and a filing cabinet. By 1994, business expanded and Alex had to rent a warehouse and hire a part-time bookkeeper. PVF’s product line had multiplied, sales volume had doubled, and staff had increased to 50 employees. By 2000, PVF moved into its third and present location. Due to the added complexity of the company’s operations, Alex reorganized the company into the following functional areas:
Manufacturing, which was further subdivided into three separate functions—Fabrication, Assembling, and Finishing
Sales
Orders
Accounting
Purchasing
PINE VALLEY FURNITURE
Alex and…
arrow_forward
Explain dimensional modeling
arrow_forward
Dynamic-new memory locations are determined before the program execution. TRUE FALSE
arrow_forward
Assignment/Lab 9
In this lab, your task is to develop a simple address book tool. The tool maintains contact information of people. For each person, the tool maintains name and date of birth. Contact information consists of physical address and phone number. For physical addresses, the system must be able to maintain current and previous addresses. Current/active address information should have starting date and no end date, previous addresses must have a starting date and an ending date. A person cannot have multiple active physical address. For phone number, the system must maintain active phone numbers only, no previous phone numbers. For implementation, use MySQL database system. MySQL is open source and is available for Linux as well as Windows. For software application, use Python. The tool/application must support the following functionality:
1- Search current contact information by last name, the user enters last name, the system must locate active physical address and phone…
arrow_forward
Write ARM Assembly program to do:
- ISBN Checksum Validator
Use Keil uvision software to write and simulate an ARM assembly program that checks the validity
of a given ISBN by verifying the checksum
Helping Information to solve program :
1. An ISBN consists of nine digits plus a validation digit.
2. The digits are numbered from right to left as d1, d2 .. d10, with d1 being the validation digit.
3. You can define the ISBN number in a 10-byte array in the memory. Each digit is stored in a
byte.
4. To check whether the ISBN is valid or not, the following calculations are performed:
Result = (10 x d10 + 9 x d9 + ... + ix di + ... + 2 x d2) % 11
Calculate d1 11 - Result
If the calculated d1 equal to the d1 in the input ISBN then it is valid
If d1 = 10, it is written 'X'
For example, given the following ISBN:
ISBN = 5123487654
ISBN= 5 1 2 3 487654 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1
Result = x 10 + x 9 + x 8 + x 7 + x 6 + x 5 + x 4 + x 3 + x 2 mod 11
= 216 mod 11
=7
d1 = 11 - Result
= 11 -7
=4
,…
arrow_forward
Assembly code
arrow_forward
display SQL query with screenshots
arrow_forward
An operating system is a resource allocator, as shown by the following illustration. [Bibliography required] [Bibliography required]
arrow_forward
Data processing that is done in groups is called "distributed data processing." How does it work?
arrow_forward
A multivalued dimension is a dimension that has many values.
arrow_forward
Create a business processing model using the Business process modeling notations for the following: It can be done on paper or digitally does not matter Providing a Quote for SafeDriver Auto Insurance A customer considering new automobile insurance decides to call the SafeDrive insurance salesperson to obtain a quote for automobile insurance. The customer provides their name, address and phone number, and drivers ID number to the SafeDrive insurance sales person. The salesperson receives the customer’s data and places two parallel requests. The first request is for the customer’s driving history from the state’s department of motor vehicles (points for accidents, tickets, etc.) and the second request is for the customer’s insurance accounting (how much has the insurer received in previous claims) from the insurance payment clearing house, an insurance industry not-for-profit that maintains insurance data shared by all insurance firms in the U.S. The state’s department of motor vehicles…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Related Questions
- Q3:Your company has just acquired a smaller company that sells office automation software. The smaller company's spreadsheet software has a large market share, with many satisfied users (the major reason for the acquisition was that these existing users are potential customers for your company's other products). Unfortunately, no documentation for the spreadsheet software can be found, and the source code is not commented. How would you go about maintaining this software to keep the customers happy?arrow_forwardTOPIC: Football League Management System DESCRIPTION: Write a python solution that can be used to manage a Football League Your system should, among many other features, be able to and/ or have and/ or apply: · Register teams to league Capture venues (stadiums) Prepare fixtures (home and away) · Cater for clubs sharing stadiums Capture results · Produce log table at any stage (table sorted from team with most points down to team with least points) Log table rules 3 points for a win, 1 point for a draw, 0 point for a lossarrow_forwardPython pleasearrow_forward
- 10arrow_forwardRead the interactive session and discuss the following questions below. Source: 5-A U.S. ARMY AND MARINE CORPS BATTLEFIELD LOGISTICS by Alan Dennis. Shortly after the Gulf War in 1991 (Desert Storm), the U.S. Department of Defense realized that there were significant problems in its battlefield logistics systems that provided supplies to the troops at the division level and below. During the Gulf War, it had proved difficult for army and marine units fighting together to share supplies back and forth because their logistics computer systems would not easily communicate. The goal of the new system was to combine the army and marine corps logistics systems into one system to enable units to share supplies under battlefield conditions.The army and marines built separate as-is process models of their existing logistics systems that had 165 processes for the army system and 76 processes for the marines. Both process models were developed over a 3-month time period and cost several million…arrow_forwardComputer Science Using a set of spotify data, where there is different singers, songs, liveness, danceability, etc, how would you pull out one specific artist to make another playlist on Spotify? Please show an example using python. Using the same data from above how would you make a plot for liveness and danceability? Please show an example using python.arrow_forward
- Note: Write a C Language program:arrow_forwardReview: PVF manufactures high-quality wood furniture and distributes it to retail stores throughout the United States. Its product lines include dinette sets, stereo cabinets, wall units, living room furniture, and bedroom furniture. In the early 1990s, PVF’s founder, Alex Schuster, started to make and sell custom furniture in his garage. Alex managed invoices and kept track of customers by using file folders and a filing cabinet. By 1994, business expanded and Alex had to rent a warehouse and hire a part-time bookkeeper. PVF’s product line had multiplied, sales volume had doubled, and staff had increased to 50 employees. By 2000, PVF moved into its third and present location. Due to the added complexity of the company’s operations, Alex reorganized the company into the following functional areas: Manufacturing, which was further subdivided into three separate functions—Fabrication, Assembling, and Finishing Sales Orders Accounting Purchasing PINE VALLEY FURNITURE Alex and…arrow_forwardExplain dimensional modelingarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks ColeEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage Learning
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning