Placeholder

Visual Logic and Design 8th Edition Chapter 7 Maintenance

$7.99

Description

This solutions below just need to be built in Visual Logic:
// Marian Basting takes in small sewing jobs.
// She has two files sorted by date.
// (The date is composed of two numbers — month and year.)
// One file holds new sewing projects
// (such as “wedding dress”)
// and the other contains repair jobs
// (such as “replace jacket zipper”).
// Each file contains the month, day, client name, phone number,
// job description, and price.
// Currently, this program merges the files to produce
// a report that lists all of Marian’s jobs for the year
// in date order.
// Modify the program to also display her total earnings
// at the end of each month as well as at the end of the year.

start
Declarations
num newMonth
num newDay
string newName
string newPhone
string newDescription
num newPrice
num repairMonth
num repairDay
string repairName
string repairPhone
string repairDescription
num repairPrice
num newDate
num repairDate
string bothAtEof = “N”
num HIGH_MONTH = 99
InputFile newJobs
InputFile repairJobs
num oldMonth
num total = 0
num grandTotal = 0

getReady()
while bothAtEof = “N”
detailLoop()
endwhile
finish()
stop

getReady()
open newJobs “NewJobs.dat”
open repairJobs “RepairJobs.dat”
input newMonth, newDay, newName, newPhone,
newDescription, newPrice from newJobs
if eof then
newMonth = HIGH_MONTH
endif
input repairMonth, repairDay, repairName, repairPhone,
repairDescription, repairPrice from repairJobs
if eof then
repairMonth = HIGH_MONTH
endif
if newMonth = HIGH_MONTH AND repairMonth = HIGH_MONTH then
bothAtEof = “Y”
endif
if newMonth > repairMonth then
oldMonth = repairMonth
else
oldMonth = newMonth
endif
return

detailLoop()
if newMonth <> oldMonth AND repairMonth <> oldMonth then
output oldMonth, total
grandTotal = grandTotal + total
total = 0
if newMonth > repairMonth then
oldMonth = repairMonth
else
oldMonth = newMonth
endif
endif
newDate = newMonth * 100 + newDay
repairDate = repairMonth * 100 + repairMonth
// This arithmetic turns each date into a 3- or 4-digit number
if newDate > repairDate then
output repairMonth, repairDay, repairName, repairPhone,
repairDescription, repairPrice
total = total + repairPrice
input repairMonth, repairDay, repairName, repairPhone,
repairDescription, repairPrice from repairJobs
if eof then
repairMonth = HIGH_MONTH
endif
else
output newMonth, newDay, newName, newPhone,
newDescription, newPrice
total = total + newPrice
input newMonth, newDay, newName, newPhone,
newDescription, newPrice from newJobs
if eof then
newMonth = HIGH_MONTH
endif
endif
if newMonth = HIGH_MONTH AND repairMonth = HIGH_MONTH then
bothAtEof = “Y”
endif
return

finish()
output oldMonth, total
grandTotal = grandTotal + total
output “Grand total “, grandTotal
close newJobs
close repairJobs
return
SCREENSHOTS
SOLUTION
PAYMENT
The solution includes a visual logic program
Attachments [Move over files to preview content of those files]
Visual_Logic_and_Design_8th_Edition_Chapter_7_Maintenance.zip (130.01 KB)
Chapter-7-Maintenance-Screenshot-1.png
Chapter-7-Maintenance-Screenshot-2.png
Chapter-7-Maintenance-Screenshot-3.png
Maintenance.docx
Visual Logic program
Visual Logic and Design 8th Edition Chapter 7 Maintenance.vls
Price: $9
Buy Now
Checkout
Added to cart
Add to Cart
Checkout
Added to cart
Note: We offer a discount for buyers who purchase multiple items.
You May Also Like:
Programming Logic and Design 8th Chapter 7 Exercise 1
Programming Logic and Design 8th Chapter 7 Exercise 2
Programming Logic and Design 8th Chapter 7 Exercise 4
Programming Logic and Design 8th Chapter 7 Exercise 5
Visual Logic and Design 8th Edition Chapter 7 Debug Program

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.