ASDV-Java/Semester 2/Assignments/lab2_CalebFontenot/TrueFalseQuestion.html
2023-01-26 12:27:29 -06:00

110 lines
6.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TrueFalseQuestion.java</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
<!--
body {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
pre {color: #a9b7c6; background-color: #2b2b2b; font-family: monospace}
table {color: #888888; background-color: #313335; font-family: monospace}
.comment {color: #808080}
.whitespace {color: #505050}
.ST0 {color: #808080; font-family: monospace; font-weight: bold}
.literal {color: #cc7832}
-->
</style>
</head>
<body>
<table width="100%"><tr><td align="center">/home/caleb/ASDV-Java/Semester 2/Assignments/lab2_CalebFontenot/src/main/java/com/calebfontenot/lab5_calebfontenot/TrueFalseQuestion.java</td></tr></table>
<pre>
<span class="comment">/*</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license</span>
<span class="comment"> * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template</span>
<span class="comment"> */</span>
<span class="literal">package</span> com.calebfontenot.lab5_calebfontenot;
<span class="literal">import</span> java.util.Date;
<span class="comment">/**</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">caleb</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">class</span> TrueFalseQuestion {
<span class="literal">private</span> String question;
<span class="literal">private</span> <span class="literal">boolean</span> isTrue;
<span class="literal">private</span> Date whenLastUsed;
<span class="literal">public</span> TrueFalseQuestion(){}
<span class="literal">public</span> TrueFalseQuestion(String question, <span class="literal">boolean</span> isTrue, Date whenLastUsed) {
<span class="literal">this</span>.question = question;
<span class="literal">this</span>.isTrue = isTrue;
<span class="literal">this</span>.whenLastUsed = whenLastUsed;
}
<span class="comment">/**</span>
<span class="comment"> * </span><span class="comment">Get</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">whenLastUsed</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@return</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">whenLastUsed</span>
<span class="comment">*/</span>
<span class="literal">public</span> Date getWhenLastUsed()
{
<span class="literal">return</span> whenLastUsed;
}
<span class="comment">/**</span>
<span class="comment"> * </span><span class="comment">Set</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">whenLastUsed</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@param</span> <span class="comment">whenLastUsed</span> <span class="comment">new</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">whenLastUsed</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">void</span> setWhenLastUsed(Date whenLastUsed)
{
<span class="literal">this</span>.whenLastUsed = whenLastUsed;
}
<span class="comment">/**</span>
<span class="comment"> * </span><span class="comment">Get</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">isTrue</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@return</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">isTrue</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">boolean</span> isIsTrue()
{
<span class="literal">return</span> isTrue;
}
<span class="comment">/**</span>
<span class="comment"> * </span><span class="comment">Set</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">isTrue</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@param</span> <span class="comment">isTrue</span> <span class="comment">new</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">isTrue</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">void</span> setIsTrue(<span class="literal">boolean</span> isTrue)
{
<span class="literal">this</span>.isTrue = isTrue;
}
<span class="comment">/**</span>
<span class="comment"> * </span><span class="comment">Get</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">question</span>
<span class="comment"> *</span>
<span class="comment"> * </span><span class="ST0">@return</span> <span class="comment">the</span> <span class="comment">value</span> <span class="comment">of</span> <span class="comment">question</span>
<span class="comment">*/</span>
<span class="literal">public</span> String getQuestion()
{
<span class="literal">return</span> question;
}
<span class="comment">/**</span><span class="comment">Sets</span> <span class="comment">the</span> <span class="comment">question</span> <span class="comment">to</span> <span class="comment">a</span> <span class="comment">new</span> <span class="comment">question</span><span class="comment">.</span>
<span class="comment"> * </span>
<span class="comment"> * </span><span class="ST0">@param</span> <span class="comment">question</span> <span class="comment">the</span> <span class="comment">new</span> <span class="comment">question</span>
<span class="comment">*/</span>
<span class="literal">public</span> <span class="literal">void</span> setQuestion(String question)
{
<span class="literal">this</span>.question = question;
}
}
</pre></body>
</html>