############################################################################## # Packages library(exams) library(manacc) library(tidyverse) library(knitr) library(kableExtra) library(randomNames) ############################################################################## # Initialization question_id <- "EN00000035" wdir <- getwd() parameters <- teachR::param_quest(wdir, question_id, alttype = "open", altlevel = "2 Understand") for (i in 1:length(parameters)) assign(names(parameters)[[i]], parameters[[i]]) options(xtable.comment = FALSE, xtable.floating = FALSE, xtable.timestamp = "") set.seed(seed) ############################################################################## # Preparation basepar <- manacc::income_statements(basevol = 10000, profitable = c(TRUE)) company <- basepar$company[[1]] product <- basepar$product[[1]] singular <- basepar$singular[[1]] plural <- basepar$plural[[1]] person <- manacc::make_persons(2) currentmonth <- lubridate::month(Sys.Date(), label = TRUE, abbr = FALSE) lastmonth <- lubridate::month(Sys.Date()-30, label = TRUE, abbr = FALSE) direct_material <- basepar$vol * basepar$umat direct_labor <- basepar$vol * basepar$ulab shipping_costs <- basepar$vol * basepar$uper maintenance <- basepar$fprod_comp equipment <- basepar$fprod_segm factory <- basepar$fprod_batch advertising <- basepar$fper_batch administration <- basepar$fper_segm offices <- basepar$fper_comp wages <- direct_labor + maintenance + administration rent <- factory + offices ############################################################################## # Answers if (reqexpl != "" & exasolu == "exam" & type_table != "html") lines <- paste0("\\vspace{",7.5,"cm}") else lines <- rep(" \\ ", 2) #lines <- rep("\\ ", 2) questions <- c("","","","","") solutions <- c(TRUE,FALSE,FALSE,FALSE,FALSE) explanations <- c("","","","") ############################################################################## # Randomize order (do not edit) alea <- sample(c(1, sample(2:length(questions), (alternatives-1))), alternatives) questions <- questions[alea] solutions <- solutions[alea] explanations <- explanations[alea]
r txt_question_id
r company
is a company producing and selling r product
. In r lastmonth
, it consumed the following resources:
r currencysymb
r writR::dbl(direct_material)
;r currencysymb
r writR::dbl(wages)
, including r currencysymb
r writR::dbl(direct_labor + maintenance)
for permanent workers manufacturing the products (each workers is dedicated to one specific product line) and r currencysymb
r writR::dbl(administration)
for Research and Development (R&D) personel (R&D personel designs future products);r currencysymb
r writR::dbl(factory)
and rent of R&D offices for r currencysymb
r writR::dbl(offices)
;r currencysymb
r writR::dbl(equipment)
;r currencysymb
r writR::dbl(advertising)
for brand advertising and a unit variable cost of r currencysymb
r writR::dbl(basepar$uper)
for shipping each r singular
to customers.Classify these costs based on inventoriability and traceability, naming and defining each of the four resulting categories. r reqexpl
r points
if (reqexpl == "") exams::answerlist(questions, markup = "markdown") else writeLines(lines)
Direct product costs are costs incurred to make products which can be traced to each product line:
Indirect product costs are costs incurred to make products which cannot be traced to each product line:
Direct period costs are costs not incurred to make products (but to design or sell them) which can be traced to each product line:
Indirect product costs are costs not incurred to make products (but to design or sell them) which cannot be traced to each product line:
if (reqexpl == "") exams::answerlist(ifelse(solutions, "True", "False"), explanations, markup = "markdown") else writeLines(c("\\ ","\\ "))
extype: r extype
exsolution: r exams::mchoice2string(solutions, single = TRUE)
exname: r question_id
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.