##############################################################################
# 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]

Question

r txt_question_id r company is a company producing and selling r product. In r lastmonth, it consumed the following resources:

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)

Solution

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("\\ ","\\ "))

Meta-information

extype: r extype exsolution: r exams::mchoice2string(solutions, single = TRUE) exname: r question_id



NicolasJBM/manacc documentation built on Jan. 16, 2020, 1:42 p.m.