学分计算器是一款可以帮助在校大学生计算学分与绩点的计算工具,它是由吾爱破解论坛网页分享提供的,学分绩点是以学分与绩点作为衡量学生学习的量与质的计算单位,使用本软件就能够根据你的课程学分和成绩计算出你的学分绩点。欢迎下载使用。
国内大部分高校通用的计算方法是:绩点=分数/10-5,学分绩点=学分×绩点=学分×(分数/10-5)
每科的课程学分绩点=课程学分×课程权重系数×课程绩点
标准计算方法是将大学成绩的加权平均数乘以4,再除以100。比较常见的方法还有把各科成绩按等级乘以学分求和再以总学分除之。
本程序基于.NET 4.0制作,可以计算课程学分以及达标所需学分
课程数据存于txt文件
types.txt用于存放课程类别,课程类别.txt用于存放各类别的课程数据,格式:课程名+空格+学分(实验学分) tips:实验学分可空
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace PointCalc
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public struct Course
{
public string name;
public double point;
public double? point2;
public override string ToString()
{
return point2 == null ? name + " " + point : name + " " + point + "(" + point2 + ")";
}
}
double allPoint = 0;
double allPoint2 = 0;
List<Course> courses = new List<Course>();
FileStream fs;
StreamReader sr;
string content;
private void Form1_Load(object sender, EventArgs e)
{
fs = new FileStream("types.txt", FileMode.OpenOrCreate, FileAccess.Read);
sr = new StreamReader(fs, Encoding.Default);
content = sr.ReadLine();
while (content != null)
{
comboBox1.Items.Add(content);
content = sr.ReadLine();
}
sr.Close();
fs.Close();
if (comboBox1.Items.Count != 0)
comboBox1.SelectedIndex = 0;
toolStripStatusLabel1.Text = "";
}
private void checkBox_CheckedChanged(object sender, EventArgs e)
{
content = (sender as CheckBox).Text;
int index = int.Parse(content.Substring(0, content.IndexOf('.'))) - 1;
if ((sender as CheckBox).Checked)
{
allPoint += courses[index].point;
if (courses[index].point2 != null)
allPoint2 += (double)courses[index].point2;
}
else
{
allPoint -= courses[index].point;
if (courses[index].point2 != null)
allPoint2 -= (double)courses[index].point2;
}
Updata();
}
private void Updata()
{
label1.Text = "当前学分:" + allPoint.ToString("f1");
label2.Text = "当前括号学分:" + allPoint2.ToString("f1");
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
label1.Text = "当前学分:0";
label2.Text = "当前括号学分:0";
courses.Clear();
fs = new FileStream(comboBox1.SelectedItem.ToString() + ".txt", FileMode.Open, FileAccess.Read);
sr = new StreamReader(fs, Encoding.Default);
content = sr.ReadLine();
while (content != null)
{
string[] infos = content.Split(' ');
Course course = new Course();
course.name = infos[0];
if (infos[1].Contains('('))
{
course.point = double.Parse(infos[1].Substring(0, infos[1].IndexOf('(')));
var temp = infos[1].Substring(infos[1].IndexOf('('));
course.point2 = double.Parse(temp.Substring(1, temp.Length - 2));
}
else
{
course.point = int.Parse(infos[1]);
}
courses.Add(course);
content = sr.ReadLine();
}
sr.Close();
fs.Close();
RefreshPanel();
toolStripStatusLabel1.Text = "";
}
private void RefreshPanel()
{
flowLayoutPanel1.Controls.Clear();
for (int i = 0; i < courses.Count; ++i)
{
AddCheckBox(courses[i], i);
}
}
private void AddCheckBox(Course course, int i)
{
CheckBox checkbox = new CheckBox();
checkbox.Text = i + 1 + "." + course.ToString();
checkbox.Size = new Size(210, 16);
checkbox.CheckedChanged += checkBox_CheckedChanged;
checkbox.CheckedChanged += Calc;
checkbox.ContextMenuStrip = contextMenuStrip1;
this.flowLayoutPanel1.Controls.Add(checkbox);
}
private void button1_Click(object sender, EventArgs e)
{
string newType;
Form2 form2 = new Form2();
if (form2.ShowDialog() != DialogResult.OK)
{
return;
}
newType = form2.result;
fs = new FileStream("types.txt", FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs, Encoding.Default);
sw.WriteLine(newType);
comboBox1.Items.Add(newType);
sw.Close();
fs.Close();
fs = new FileStream(newType + ".txt", FileMode.Create, FileAccess.Write);
fs.Close();
comboBox1.SelectedIndex = comboBox1.Items.Count - 1;
}
private void button3_Click(object sender, EventArgs e)
{
Course newCourse;
Form3 form3 = new Form3();
if (form3.ShowDialog() != DialogResult.OK)
{
return;
}
newCourse = form3.course;
fs = new FileStream(comboBox1.SelectedItem.ToString() + ".txt", FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs, Encoding.Default);
sw.WriteLine(newCourse.ToString());
sw.Close();
fs.Close();
AddCheckBox(newCourse, courses.Count);
courses.Add(newCourse);
}
private void button2_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("确定删除?", "删除", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dialogResult != DialogResult.OK)
return;
File.Delete(comboBox1.SelectedItem.ToString() + ".txt");
int oldIndex = comboBox1.SelectedIndex;
comboBox1.Items.RemoveAt(comboBox1.SelectedIndex);
fs = new FileStream("types.txt", FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs, Encoding.Default);
foreach (var item in comboBox1.Items)
{
sw.WriteLine(item.ToString());
}
sw.Close();
fs.Close();
comboBox1.SelectedIndex = oldIndex - 1;
}
private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
{
content = (((sender as ToolStripMenuItem).GetCurrentParent() as ContextMenuStrip).SourceControl as CheckBox).Text;
courses.RemoveAt(int.Parse(content.Substring(0, content.IndexOf('.'))) - 1);
fs = new FileStream(comboBox1.SelectedItem.ToString() + ".txt", FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs, Encoding.Default);
foreach (var item in courses)
{
sw.WriteLine(item.ToString());
}
sw.Close();
fs.Close();
RefreshPanel();
}
private void Calc(object sender, EventArgs e)
{
double needPoint = 0;
double needPoint2 = 0;
if (!string.IsNullOrEmpty(textBox1.Text))
{
double goalPoint = double.Parse(textBox1.Text);
if (goalPoint > allPoint)
needPoint = goalPoint - allPoint;
}
else
return;
if (!string.IsNullOrEmpty(textBox1.Text))
{
double goalPoint2 = double.Parse(textBox2.Text);
if (goalPoint2 > allPoint2)
needPoint2 = goalPoint2 - allPoint2;
}
if (needPoint == 0 && needPoint2 == 0)
{
toolStripStatusLabel1.Text = string.Format("学分已足够!");
toolStripStatusLabel1.ForeColor = Color.Green;
}
else
{
toolStripStatusLabel1.Text = string.Format("距离目标学分还差:{0:N1}({1:N1})", needPoint, needPoint2);
toolStripStatusLabel1.ForeColor = Color.Red;
}
}
}
}
加载全部内容
小明计算器去广告版v4.0 破解版1M3人在玩小明计算器无广告破解版是专为喜爱小明计算器用户提供的修改版本,在此版本中没有讨厌的广告打扰,让你更加舒心,有需要的用户赶快下载吧!
下载Easy Equation Solver(在线方程式计算器)v1.8 官方版2.4M3人在玩EasyEquationSolver在线方程式计算器是专门针对需要方程式计算的用户开发的一款实用小工具。该软件能够帮助用户轻松计算包括二次方程式、一元三次方程、二未知二次方程、三未知三次方程、2X2行列式、3X3行列式、4X4行列式等方程式。
下载多重计算器v2018 绿色版7KB1人在玩多重计算器是一款功能强大专业且小巧的多重积分计算器。软件绿色无需安装,使用方便,可以帮助用户快速计算多重积分,还可以计算出十二进制等,有需要的用户赶快下载吧!
下载鸿业防排烟计算软件v1.0 官方版49.4M0人在玩鸿业防排烟计算软件,一款强大的建筑防排烟计算软件。设计人员通过这款软件可以便捷计算准确完整的防烟系统,极大减轻设计人员的工作压力,非常好用,欢迎下载体验!
下载海淘运费计算器v1.0 绿色版9KB0人在玩海淘运费计算器也叫做海淘关税计算器,现在很多用喜欢海淘购物,毕竟有些国外的商品性价比确实不错,不过海淘需要付相应的关税和运费,海淘运费计算器就是你帮你一键计算出所需费用的软件。
下载加法神器v1.0 绿色版22KB0人在玩加法神器也叫做叠加计算工具,软件界面简洁,操作简单,支持多种公式计算,是财务、统计必备工具,有需要的用户可以直接进行下载。
下载角度计算器v1.0 绿色版366KB0人在玩三角函数角度计算器是一款绿色免费的函数计算器,能够帮助用户快速进行三角函数的计算,正弦、反正弦计算等,非常的方便。
下载频率频点计算器v1.0 绿色免费版14KB0人在玩频率频点计算器是一款绿色无需安装,但功能齐全的频率频点计算工具。能够帮助用户轻松计算出对应的频率、频点,软件界面简洁,使用方便,有需要的用户可以直接进行下载。
下载能源类常用计算软件v1.0 免费版106KB0人在玩能源类常用计算软件是一款工业类常用计算软件。软件绿色小巧,无需安装即可使用,功能十分全面,具有管道计算,饱和参数,加热器计算等功能,一个软件多种用途。
下载CRC计算工具v1.001 绿色版57KB0人在玩CRC计算工具有哪些?CRC计算工具是一款绿色小巧的专门用于CRC计算的软件。如何计算CRC校验码?CRC计算工具可以轻松帮助你计算出来,非常的方便。
下载